Changeset 7072 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/bin/rebuild-update_source-table.php
- Timestamp:
- 04/10/2018 02:42:42 AM (8 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/bin/rebuild-update_source-table.php
r7071 r7072 40 40 41 41 $slugs = $wpdb->get_col( $sql ); 42 if ( ! $slugs ) { 43 fwrite( STDERR, "Error! The plugin(s) could not be located.\n" ); 44 die(); 45 } 42 46 43 47 foreach ( $slugs as $i => $slug ) { 48 echo ++$i . '/' . count( $slugs ) . "\t" . $slug . "\n"; 44 49 45 $post = Plugin_Directory::get_plugin_post( $slug ); 46 if ( ! $post ) { 47 continue; 48 } 49 50 echo $i . '/' . count( $slugs ) . "\t" . $post->post_name . "\n"; 51 52 update_post_meta( 53 $post->ID, 54 'rating', 55 \WPORG_Ratings::get_avg_rating( 'plugin', $post->post_name ) 56 ); 57 58 update_post_meta( 59 $post->ID, 60 'ratings', 61 \WPORG_Ratings::get_rating_counts( 'plugin', $post->post_name ) 62 ); 50 Jobs\API_Update_Updater::update_single_plugin( $slug ); 63 51 64 52 clear_memory_caches();
Note: See TracChangeset
for help on using the changeset viewer.