pixline / wp-cli-theme-test-command
安装和配置WordPress主题单元测试
v0.5.0
2013-11-14 02:22 UTC
Requires
- php: >=5.3.0
- wp-cli/wp-cli: >=0.11
This package is not auto-updated.
Last update: 2024-09-23 14:59:19 UTC
README
使用wp-cli安装和配置“单元测试”主题(示例数据、必需的插件和选项)
http://codex.wordpress.org/Theme_Unit_Test
安装
默认安装:wp-cli + composer
按照wp-cli 社区包设置中所述进行composer安装。
-
请确保已经安装wp-cli。
-
进入包含根
composer.json文件的目录
cd ~/.wp-cli
- 添加WP-CLI包索引
composer config repositories.wp-cli composer http://wp-cli.org/package-index/
- 安装包
composer require pixline/wp-cli-theme-test-command=dev-master
用法
注意:此命令(目前)无法处理像--path这样的全局标志,请在其在WordPress根目录中运行。
wp theme-test install [options]
Angle brackets groups possible values, default is marked with *
[--data=< unit-test* | wpcom-theme | wpcom-demo | wptest | skip >]
URL/path to custom WXR data file, or built-in:
'unit-test' = Default Theme Unit Test datafile
'wpcom-theme' = Alternative wpcom datafile (1)
'wpcom-demo' = Alternative wpcom datafile (2)
'wptest' = manovotny/wptest datafile
'skip' = Do not install new data
[--plugin=< theme* | vip | devel | all | skip >]
Plugin bundle to install.
Bundles are as suggested in the 'developer' plugin,
'debug' bundle is an exclusive feature :-)
'theme' = Default plugin setup
'vip' = Default + wpcom VIP plugin setup
'devel' = Default + plugin developer setup
'debug' = Default + debugger setup
'all' = Default + VIP + developer + debugger!
'skip' = Do not install/activate plugin bundles
[--option=< default* | skip >]
Updates blog options to the test default values.
'skip' = Do not update options
'default' = Updates options to their default test value:
- blogname WordPress Theme Unit Test Site
- posts_per_page 5
- thread_comments 1
- thread_comments_depth 3
- page_comments 1
- comments_per_page 5
- medium_max_w null
- medium_max_h null
- large_max_w null
- large_max_h null
- permalink_structure /%year%/%monthnum%/%day%/%postname%/
[--menus] Add custom nav menus