Changeset 11949 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/cli-commands.php
- Timestamp:
- 07/07/2022 03:23:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/cli-commands.php
r10812 r11949 9 9 * 10 10 * The source code for the version of WordPress to be parsed needs to be 11 * obtained and unpackaged locally. Youshould not be code used in an11 * obtained and unpackaged locally. It should not be code used in an 12 12 * active install. 13 13 * … … 80 80 } 81 81 82 // Determine importing user's ID.83 $user = get_user_by( 'id', $user_id );84 if ( ! $user ) {85 WP_CLI::error( 'Invalid user_id provided.' );86 }87 WP_CLI::log( "Importing as user ID $user_id ({$user->user_nicename})." );88 89 $plugins = [90 'phpdoc-parser' => 'phpdoc-parser/plugin.php',91 'posts-to-posts' => 'posts-to-posts/posts-to-posts.php',92 ];93 94 82 // Verify path is not a file. 95 83 if ( is_file( $path ) ) { … … 113 101 WP_CLI::confirm( "Looks like WP $version was already parsed on " . date_i18n( 'Y-m-d H:i', $last_parsed_date ) . ". Proceed anyway?" ); 114 102 } 103 104 // Determine importing user's ID. 105 $user = get_user_by( 'id', $user_id ); 106 if ( ! $user ) { 107 WP_CLI::error( 'Invalid user_id provided.' ); 108 } 109 WP_CLI::log( "Importing as user ID $user_id ({$user->user_nicename})." ); 110 111 $plugins = [ 112 'phpdoc-parser' => 'phpdoc-parser/plugin.php', 113 'posts-to-posts' => 'posts-to-posts/posts-to-posts.php', 114 ]; 115 115 116 116 // Get the phpdoc-parser plugin if not installed.
Note: See TracChangeset
for help on using the changeset viewer.