Inventory_Presser_Template_Provider::maybe_provide_template( string $template )
maybe_provide_template
Contents
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.
Parameters Parameters
- $template
-
(Required) The template file to load
Return Return
(string) The same template file that was passed in
Source Source
File: includes/class-template-provider.php
Expand full source code Collapse full source code View on Github