Changeset 12114
- Timestamp:
- 10/11/2022 10:34:54 AM (3 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc
- Files:
-
- 2 added
- 1 deleted
- 1 edited
-
class-plugin.php (modified) (5 diffs)
-
cli/class-show-stats.php (deleted)
-
cli/class-stats-print.php (added)
-
cli/class-stats.php (added)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/class-plugin.php
r12112 r12114 6 6 use GP_Locales; 7 7 use GP_Translation; 8 use WordPressdotorg\GlotPress\Customizations\CLI\S how_Stats;8 use WordPressdotorg\GlotPress\Customizations\CLI\Stats; 9 9 use WP_CLI; 10 10 … … 61 61 add_action( 'init', [ $this, 'register_cron_events' ] ); 62 62 add_action( 'wporg_translate_update_contributor_profile_badges', [ $this, 'update_contributor_profile_badges' ] ); 63 add_action( 'wporg_translate_update_polyglots_stats', [ $this, 'update_polyglots_stats' ] ); 63 64 64 65 // Toolbar. … … 130 131 if ( ! wp_next_scheduled( 'wporg_translate_update_contributor_profile_badges' ) ) { 131 132 wp_schedule_event( time(), '15_minutes', 'wporg_translate_update_contributor_profile_badges' ); 133 } 134 if ( ! wp_next_scheduled( 'wporg_translate_update_polyglots_stats' ) ) { 135 wp_schedule_event( time(), 'daily', 'wporg_translate_update_polyglots_stats' ); 132 136 } 133 137 } … … 179 183 180 184 update_option( 'wporg_translate_last_badges_sync', $now ); 185 } 186 187 /** 188 * Updates the Polyglots stats at https://make.wordpress.org/polyglots/stats/ 189 * 190 * @return void 191 */ 192 public function update_polyglots_stats() { 193 $stats = new Stats(); 194 $stats(); 181 195 } 182 196 … … 449 463 WP_CLI::add_command( 'wporg-translate export', __NAMESPACE__ . '\CLI\Export' ); 450 464 WP_CLI::add_command( 'wporg-translate export-json', __NAMESPACE__ . '\CLI\Export_Json' ); 451 WP_CLI::add_command( 'wporg-translate show-stats', __NAMESPACE__ . '\CLI\S how_Stats' );465 WP_CLI::add_command( 'wporg-translate show-stats', __NAMESPACE__ . '\CLI\Stats_Print' ); 452 466 453 467 }
Note: See TracChangeset
for help on using the changeset viewer.