digitalkaoz / wordpress-faker
此包最新版本(dev-master)无可用许可证信息。
dev-master
2013-12-06 09:44 UTC
Requires
- nelmio/alice: dev-master
- symfony/console: @stable
Requires (Dev)
- kherge/box: ~2.0
This package is not auto-updated.
Last update: 2024-09-24 00:24:42 UTC
README
使用 Alice/Faker 生成 WordPress 文章
安装
使用 Composer
{ "require-dev": { "digitalkaoz/wordpress-faker": "dev-master" } }
作为可执行 PHAR
$ wget https://github.com/digitalkaoz/wordpress-faker/wordpress-faker.phar
用法
简单地定义一个 Alice Faker 文件(见 https://github.com/nelmio/alice 和 https://github.com/fzaninotto/Faker)
这里有一个简单的示例
digitalkaoz\WordpressFaker\Post: #using this class is mandatory posts{1..10}: #will be a wp_post __set: __set post_title: <sentence()> post_status: 'publish' post_content: <paragraphs(6)> post_author: 1 meta: #all these parameters will be wp_post_meta my_custom_meta: <boolean()>
然后运行生成
$ php wordpress-faker.phar fake PATH/TO/my_faker.yml PATH/TO/wp_config.php
哇,你已经创建了10篇随机文章
测试
待执行
待办事项
- 更多 WordPress 功能
- 测试