Inventory_Presser_Template_Provider::replace_content_with_shortcode_single( string $content )
replace_content_with_shortcode_single
Contents
Description Description
Filter callback. Returns the output of the [invp-single-vehicle] shortcode regardless of what is passed in.
Parameters Parameters
- $content
-
(string) (Required) The post content as provided by the the_content filter
Return Return
(string) The output of the [invp-single-vehicle] shortcode
Source Source
File: includes/class-template-provider.php
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( '[invp-single-vehicle]' ); }
Expand full source code Collapse full source code View on Github