Inventory_Presser_Template_Provider::replace_content_with_shortcode_single( string $content )
Filter callback. Returns the output of the shortcode regardless of what is passed in.
On This Page
Parameters Parameters
- $content
-
(string) (Required) The post content as provided by the the_content filter.
Return Return
(string) The output of the shortcode
Source Source
File: includes/class-template-provider.php
public function replace_content_with_shortcode_single( $content ) {
/**
* Avoid running the shortcode more than necessary by checking if
* this stylesheet is already enqueued. Some themes, like
* GeneratePress, apply filters to the_content a few times.
*/
if ( wp_style_is( 'invp_single_vehicle' ) ) {
// Remove the filter we're in to avoid nested calls.
remove_filter( 'the_content', array( $this, 'replace_content_with_shortcode_single' ) );
}
return do_shortcode( '' );
}
Expand full source codeCollapse full source codeView on Github