Changeset 7030
- Timestamp:
- 04/05/2018 04:16:43 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/bin/resync-ratings.php
r7029 r7030 8 8 die(); 9 9 } 10 $opts = getopt( '', array( 'p ost:', 'url:', 'abspath:', 'age:' ) );10 $opts = getopt( '', array( 'plugin:', 'url:', 'abspath:' ) ); 11 11 12 12 if ( empty( $opts['url'] ) ) { … … 32 32 } 33 33 34 $slugs = $wpdb->get_col( "SELECT post_name FROM {$wpdb->posts} WHERE post_type = 'plugin' and post_status = 'publish'" ); 34 if ( !empty( $opts['plugin'] ) ) { 35 $sql = $wpdb->prepare( "SELECT post_name FROM {$wpdb->posts} WHERE post_type = 'plugin' and post_status = 'publish' AND post_name = %s", $opts['plugin'] ); 36 } else { 37 // All plugins. 38 $sql = "SELECT post_name FROM {$wpdb->posts} WHERE post_type = 'plugin' and post_status = 'publish'"; 39 } 40 41 $slugs = $wpdb->get_col( $sql ); 35 42 36 43 foreach ( $slugs as $i => $slug ) {
Note: See TracChangeset
for help on using the changeset viewer.