Inventory_Presser_Template_Provider::maybe_provide_template( string $template )


Description Description

This method decides whether or not to add filters to the_content and has_post_thumbnail by examining the template file. If the theme does not have templates for vehicle singles and archives, the filters are added and shortcodes provide the templates instead. I stole this technique from WooCommerce, and it's kind of beautiful.

Top ↑

Parameters Parameters


(Required) The template file to load

Top ↑

Return Return

(string) The same template file that was passed in

Top ↑

Source Source

File: includes/class-template-provider.php