wearebase / web-wordpress
此包已被弃用且不再维护。未建议替代包。
Wordpress前端工具
3.0
2017-01-25 10:26 UTC
Requires
- composer/installers: ^1.0
README
此包依赖于 "wpackagist-plugin/timber-library": "^1"
安装
将其包含在您的composer中
"require": {
"wearebase/web-wordpress" : "*"
}
并指定版本或最低版本。
配置包的存放位置
如果您想安装到除vendor
之外的目录,请在您的composer.json
中添加以下内容
"extra": {
"installer-paths": {
"wp-content/themes/timber/packages/{$name}": ["wearebase/web-wordpress"]
}
}
启用
启用Sass
将Sass添加到您的构建路径
add_import_path "wp-content/themes/timber/packages"
PHP
只需将这些文件包含在您的functions.php
中,然后在稍后调用这些函数。
post-functions.php
需要Timber,因为它使用Timber的get_post函数来返回TimberPost对象,而不是WP Posts。
包含内容
- 面包屑生成器
- 各种TimberPost函数
- 查找最新帖子、子帖子、父帖子等
- WP管理微调
- 禁用表情符号
- 从WP Rich Text Editor中删除'h1'、'h2'和'pre'标签
- 将Bootstrap响应式嵌入添加到WP嵌入器
- 从WP管理快速栏中删除元素