Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-01-29 00:43:23 +00:00
parent bd2cd572aa
commit cfc3b57488
810 changed files with 9893 additions and 8384 deletions
+8 -8
View File
@@ -91,7 +91,7 @@ if ( isset( $_GET['action'] ) ) {
echo '<p>' . __( 'Plugin failed to reactivate due to a fatal error.' ) . '</p>';
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
ini_set( 'display_errors', true ); // Ensure that fatal errors are displayed.
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
include( WP_PLUGIN_DIR . '/' . $plugin );
}
@@ -102,7 +102,7 @@ if ( isset( $_GET['action'] ) ) {
wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
}
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); // For plugins_api().
check_admin_referer( 'install-plugin_' . $plugin );
$api = plugins_api(
@@ -132,7 +132,7 @@ if ( isset( $_GET['action'] ) ) {
$url .= '&from=' . urlencode( stripslashes( $_GET['from'] ) );
}
$type = 'web'; //Install plugin type, From Web or an Upload.
$type = 'web'; // Install plugin type, From Web or an Upload.
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
$upgrader->install( $api->download_link );
@@ -158,7 +158,7 @@ if ( isset( $_GET['action'] ) ) {
$title = sprintf( __( 'Installing Plugin from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
$nonce = 'plugin-upload';
$url = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-plugin' );
$type = 'upload'; //Install plugin type, From Web or an Upload.
$type = 'upload'; // Install plugin type, From Web or an Upload.
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
$result = $upgrader->install( $file_upload->package );
@@ -224,7 +224,7 @@ if ( isset( $_GET['action'] ) ) {
wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
}
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); // For themes_api().
check_admin_referer( 'install-theme_' . $theme );
$api = themes_api(
@@ -236,7 +236,7 @@ if ( isset( $_GET['action'] ) ) {
'tags' => false,
),
)
); //Save on a bit of bandwidth.
); // Save on a bit of bandwidth.
if ( is_wp_error( $api ) ) {
wp_die( $api );
@@ -251,7 +251,7 @@ if ( isset( $_GET['action'] ) ) {
$title = sprintf( __( 'Installing Theme: %s' ), $api->name . ' ' . $api->version );
$nonce = 'install-theme_' . $theme;
$url = 'update.php?action=install-theme&theme=' . urlencode( $theme );
$type = 'web'; //Install theme type, From Web or an Upload.
$type = 'web'; // Install theme type, From Web or an Upload.
$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
$upgrader->install( $api->download_link );
@@ -278,7 +278,7 @@ if ( isset( $_GET['action'] ) ) {
$title = sprintf( __( 'Installing Theme from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
$nonce = 'theme-upload';
$url = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-theme' );
$type = 'upload'; //Install plugin type, From Web or an Upload.
$type = 'upload'; // Install theme type, From Web or an Upload.
$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
$result = $upgrader->install( $file_upload->package );