[WordPress] 外掛分享: Test Content Generator

首頁外掛目錄 › Test Content Generator
30+
安裝啟用
★★★★★
5/5 分(2 則評價)
344 天前
最後更新
問題解決
WordPress 4.0+ PHP 8.3+ v0.4.4 上架:2024-02-18

內容簡介

總結:
透過 WordPress 外掛中的管理頁面,在「工具」>「內容產生器」來新增測試文章。

問答組:
<ul>
<li>問題:如何使用 WordPress 外掛中的內容產生器來新增測試文章?</li>
<li>答案:您可以在 WordPress 的管理頁面中找到「工具」選項,然後選擇「內容產生器」,在此處您可以新增測試文章。</li>
</ul>

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Test Content Generator」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Developing any WP plugin or theme often means needing to test it against as much of a “real site” as your development environment will allow, and if you’re adding that test data by hand, it gets pretty tedious pretty quickly.
This plugin will let you use either WP-CLI commands, or the admin page in Tools->Content Generator to add test users, populate the Media Library with example images, an additional test custom post type and custom taxonomies, generate as many test “Lorem Ipsum” posts as you want, and then add comments to those posts.
Each of those “Lorem Ipsum” posts will be randomly tagged and categorised, and can also be assigned one of the test images as its Featured Image, as well as a variety of HTML content in addition to the usual paragraphs.
This plugin is primarily for people who need to test plugins and themes on a regular basis, but it would let anyone get a feel of how their site will look when it’s full of real content.
Workflow
All the parts of this plugin are optional, and each can be repeated as much as you want, depending on which parts of your site you want to test.
However, no individual step will “backfill” preceeding ones automatically, so if you have an empty site and you want (eg.) your test Posts to appear to have been written by different people, then you need to add the test Users first.
ie.

Enable Custom (Post Types & Categories & Tags) before adding terms from your Taxonomies,
Add Users before downloading Images before generating Posts before adding Comments.

WP CLI Integration
Using the plugin defaults, you can populate a test site with just the following commands:

wp plugin install test-content-generator --activate
Download and activate the plugin.
wp test users --amount=20
Add 20 random Editor/Author/Contributor/Subscribers users who have registered within the last 60 days.
wp test taxonomies --amount=50
Add 50 taxonomy terms split between Categories and Post Tags.
wp test images --amount=10
Add 10 images of size 800×400 uploaded by any Editor/Author.
wp test posts --amount=40
Add 40 Posts written within the last 60 days by any Editor/Author/Contributor, with a Featured Image and both categorised and tagged.
wp test comments --amount=100
Add 100 comments to your Posts written within the last 60 days by any of the registered users.

See wp help test for more details.

延伸相關外掛

文章
Filter
Mastodon