Skip to content
Docs
Get RestroPress

Filter

restropress_container_class

Updated
On this page

Filters the CSS class of the wrapper div around shortcode output.

Applied in RP_Shortcodes::shortcode_wrapper() while building the opening restropress div, unless the caller supplied its own before markup. The value is the wrapper class, already passed through esc_attr(), which is empty for the fooditems shortcode. The result is printed as is.

Parameters#

ParameterTypeDescription
$classstringEscaped wrapper class.

Return value#

string. The class attribute value.

Example#

function my_container_class( $class ) {
	return trim( $class . ' my-restaurant-wrap' );
}
add_filter( 'restropress_container_class', 'my_container_class' );

Notes#

The returned value is not escaped again, so escape it yourself.

Source#

Applied in:

  • includes/class-rpress-shortcodes.php (line 74), in RP_Shortcodes::shortcode_wrapper()
Was this page helpful?