Inventory_Presser_Template_Provider::replace_content_with_shortcode_single( string $content )

Filter callback. Returns the output of the [invp_single_vehicle] shortcode regardless of what is passed in.


Parameters

$content

(string) (Required) The post content as provided by the the_content filter.


Return

(string) The output of the [invp_single_vehicle] shortcode


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( '[invp_single_vehicle]' );
		}