Filter
rpress_enqueue_styles
On this page
Filters the list of stylesheets enqueued on RestroPress pages.
Returned by RP_Frontend_Scripts::get_styles(). The array is keyed by style handle and each entry holds src, deps, version, media and has_rtl. The styles are enqueued on RestroPress pages. Remove an entry to drop a stylesheet or add one to load your own.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$styles | array | Styles keyed by handle. Each entry has src, deps, version, media and has_rtl. |
Return value#
array. The styles to enqueue.
Example#
function my_enqueue_styles( $styles ) {
unset( $styles['font-awesome'] );
$styles['my-rpress-tweaks'] = array(
'src' => plugins_url( 'css/tweaks.css', __FILE__ ),
'deps' => array(),
'version' => '1.0.0',
'media' => 'all',
'has_rtl' => false,
);
return $styles;
}
add_filter( 'rpress_enqueue_styles', 'my_enqueue_styles' );
Source#
Applied in:
includes/class-rpress-frontend-scripts.php(line 1962), inRP_Frontend_Scripts::get_styles()
See also#
Was this page helpful?
