Skip to content
Docs
Get RestroPress

Filter

rpress_load_head_styles

Updated
On this page

Filters whether the inline fooditem head styles are printed.

Applied in RP_Frontend_Scripts::rp_head_styles() on wp_head when a theme or child theme provides an rpress css template file. Returning false skips the inline style block.

Parameters#

ParameterTypeDescription
$loadboolWhether to print the head styles, true by default.

Return value#

bool. False to skip the inline styles.

Example#

function my_load_head_styles( $load ) {
	return false;
}
add_filter( 'rpress_load_head_styles', 'my_load_head_styles' );

Notes#

Not applied when the disable styles setting is on or when no matching template stylesheet is found.

Source#

Applied in:

  • includes/class-rpress-frontend-scripts.php (line 897), in RP_Frontend_Scripts::rp_head_styles()
Was this page helpful?