alexrah/wp-page-template-loader
最新稳定版本:1.2.0
Composer 安装命令:
composer require alexrah/wp-page-template-loader
包简介
Helper Classes to inject page templates & template parts
README 文档
README
Helper class meant to be used in WP plugins to inject template-parts & page-templates in the currenct active theme
Usage
in the plugin directory create the following dirs:
- template-pages
- template-parts
in the main plugin file initialize the class:
new WpPageTemplateLoader(__FILE__,$aOpts);
available $aOpts options:
filter_prefix: define a custom prefix for filter & action hooks, defaults to$sPluginRootFiletheme_template_directory: define a folder name inside the current theme to scan for template-parts, default tononeplugin_template_pages_directory: define the folder name inside the plugin where page-templates are stored, defaults totemplate-pagesplugin_template_parts_directory: define the folder name inside the plugin where template-parts are stored, defaults totemplate-parts
install using composer:
composer require alexrah/wp-admin-custom-post-types
published on packagist at: https://packagist.org/packages/alexrah/wp-admin-custom-post-types
Changelog
version 1.0.0
- helper classes to inject template-parts & page-templates
Credits
- page-templates were adapted from http://www.wpexplorer.com/wordpress-page-templates-plugin/
- template-parts were adaptad from http://github.com/GaryJones/Gamajo-Template-Loader
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-13