Filter
restropress_container_class
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#
| Parameter | Type | Description |
|---|---|---|
$class | string | Escaped 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), inRP_Shortcodes::shortcode_wrapper()
Was this page helpful?
