flexpress / plugin-accordion
基于FlexPress的插件
v1.0.1
2014-09-02 11:34 UTC
Requires
- flexpress/component-acf: 1.0.*
- flexpress/component-plugin: 1.0.*
- flexpress/component-shortcode: 1.0.*
- pimple/pimple: 2.0.*
This package is not auto-updated.
Last update: 2024-09-24 02:32:01 UTC
README
安装
通过composer安装
composer require flexpress/plugin-accordion 1.0.*
设置
- 安装ACF重复器(http://www.advancedcustomfields.com/add-ons/repeater-field/)
- 然后您需要更改它应显示在哪些文章类型上,可以通过访问{wp-admin-url}/options-general.php?page=flexpress-accordion-options或通过设置 > 折叠来执行此操作。
更改输出
插件将加载默认视图,但您可以通过使用过滤器fpshortcode_timber_template来更改此视图,例如。
add_filter('fpshortcode_timber_template', function() {
return 'my/relative/view/path';
});
因为它相对于timber,所以timber会在主题文件夹中查找,但是您也可以传递一个绝对路径,这也是插件默认执行的操作。