一键导入
populate-log
Populates the event log with test data via WP-CLI. Use when adding sample events, generating test data, or benchmarking with realistic activity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Populates the event log with test data via WP-CLI. Use when adding sample events, generating test data, or benchmarking with realistic activity.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Adds changelog entries to readme.txt following keepachangelog format. Use when updating the Unreleased section or documenting changes for a release.
Reproducibly capture in-product UI screenshots (admin popovers, settings teasers, dashboard widgets) used as embedded images in premium upsell teasers. Use whenever a teaser image needs refreshing after the underlying UI changes.
Guides implementation of structured action links on log events. Use when adding get_action_links() to a logger or migrating from get_log_row_details_output().
Enforces active voice for logger messages and the Event Details API. Use when writing a new logger class or modifying message arrays in getInfo().
How to design and regenerate marketing screenshots for the wordpress.org plugin page (banner-1544x500.png, screenshot-1.png, etc). Covers the event mix that converts, the reproducible WordPress Playground pipeline that bakes it, and every non-obvious gotcha from previous shoots. Use when refreshing screenshot-1.png, banners, or any image showing the Simple History event log.
Guidance for writing and running tests in Simple History. Covers which framework to use, how to run existing tests, and how to create new ones (including the codegen recording workflow).
基于 SOC 职业分类
| name | populate-log |
| description | Populates the event log with test data via WP-CLI. Use when adding sample events, generating test data, or benchmarking with realistic activity. |
| allowed-tools | Bash, Read |
Add test events to the Simple History event log using WP-CLI.
/Users/bonny/Projects/_docker-compose-to-run-on-system-bootSIMPLE_HISTORY_DEV constant set to truecd /Users/bonny/Projects/_docker-compose-to-run-on-system-boot && docker compose run --rm wpcli_mariadb simple-history dev populate [OPTIONS]
| Option | Default | Description |
|---|---|---|
--count=<n> | 1000 | Number of events to create |
--type=<type> | mixed | Type of events (see below) |
--days=<n> | 90 | Spread events over this many days |
--reactions | off | Add 1-10 random reactions to each event |
--type)| Type | Description | Use Case |
|---|---|---|
mixed | Realistic distribution: 40% posts, 25% plugins, 15% users, 10% options, 10% custom | General testing, realistic log |
posts | Post/page events: created, updated, trashed, restored | Testing post-related UI/filters |
plugins | Plugin events: activated, deactivated, updated, installed | Testing plugin-related UI/filters |
users | User events: login, logout, profile edits, user creation | Testing user-related UI/filters |
simple | Generic SimpleLogger messages (backups, cron, API, forms) | Testing fallback search |
large | Events with ~2MB context data (simulated API responses) | Performance/memory benchmarking |
showcase | Curated set of specific events (ignores --count), see below | UI testing with diverse event types |
# Quick: 50 mixed events for general UI testing
docker compose run --rm wpcli_mariadb simple-history dev populate --count=50 --days=7
# Realistic: 1000 mixed events over 90 days (default)
docker compose run --rm wpcli_mariadb simple-history dev populate
# Heavy: 5000 events for performance testing
docker compose run --rm wpcli_mariadb simple-history dev populate --count=5000
# Type-specific
docker compose run --rm wpcli_mariadb simple-history dev populate --count=200 --type=posts
docker compose run --rm wpcli_mariadb simple-history dev populate --count=200 --type=plugins
docker compose run --rm wpcli_mariadb simple-history dev populate --count=200 --type=users
# Large events for memory/export benchmarking
docker compose run --rm wpcli_mariadb simple-history dev populate --count=100 --type=large --days=30
# Showcase: curated set of specific events for UI testing (ignores --count)
docker compose run --rm wpcli_mariadb simple-history dev populate --type=showcase
The showcase type creates a fixed curated set (ignores --count):
The command automatically generates realistic patterns:
Source: inc/services/wp-cli-commands/class-wp-cli-populate-command.php
Available loggers in populate: SimplePluginLogger, SimplePostLogger, SimpleUserLogger, SimpleOptionsLogger, SimpleLogger.