This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * WP-CLI command to generate test login records for When Last Login. | |
| * | |
| * INSTALLATION: | |
| * Add this line to your child theme's functions.php or any plugin file: | |
| * require_once __DIR__ . '/wll-generate-records.php'; | |
| * | |
| * USAGE: | |
| * wp wll-generate-records 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * WLL Timestamp Backfill Utility (Run Once) | |
| * | |
| * Sets when_last_login timestamps for users without one. | |
| * Run via WordPress admin with 'edit_users' capability. | |
| * | |
| * Query parameters: | |
| * - dry_run: 0 to apply changes (default: 1 = preview only) | |
| * - days: Set timestamp N days after registration (default: 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * WLL Timestamp Backfill Utility | |
| * | |
| * Sets when_last_login timestamps for users who don't have one. | |
| * Use on sites that installed WLL after users already existed. | |
| * | |
| * Usage (WP-CLI): | |
| * wp eval-file wll-backfill-timestamps.php # Preview | |
| * wp eval-file wll-backfill-timestamps.php --dry-run=0 |