Changeset 6854
- Timestamp:
- 03/10/2018 01:15:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-plugin-directory/inc/cli/class-set-plugin-project.php
r6536 r6854 31 31 */ 32 32 public function __invoke( $args, $assoc_args ) { 33 global $wpdb; 34 33 35 if ( ! preg_match( '/^[^\/]+$/', $args[0] ) ) { 34 36 WP_CLI::error( sprintf( "The plugin slug '%s' contains invalid characters.", $args[0] ), 1 ); … … 100 102 } 101 103 104 // Store ID of the post in the plugin directory. Used for retrieving plugin icons. 105 $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->base_prefix}%d_posts WHERE post_name = %s AND post_type = 'plugin' LIMIT 1", WPORG_PLUGIN_DIRECTORY_BLOGID, $project->slug ) ); 106 if ( $post_id ) { 107 gp_update_meta( $plugin_project->id, 'directory-post-id', $post_id, 'wp-plugins' ); 108 } 109 102 110 // The current stable SVN tag. 103 111 $stable_tag = empty( $plugin_details->stable_tag ) ? 'trunk' : $plugin_details->stable_tag;
Note: See TracChangeset
for help on using the changeset viewer.