Archived
Updates
This commit is contained in:
1 parent
70d2335bba
commit
7428b67da5
1086 files changed
+94145
-59082
No files matched your search
@@ -205,9 +205,9 @@ function update_nag() {
|
||||
return false;
|
||||
|
||||
if ( current_user_can('update_core') ) {
|
||||
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );
|
||||
$msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );
|
||||
} else {
|
||||
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
|
||||
$msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
|
||||
}
|
||||
echo "<div class='update-nag'>$msg</div>";
|
||||
}
|
||||
@@ -221,15 +221,17 @@ function update_right_now_message() {
|
||||
$theme_name = sprintf( '<a href="themes.php">%1$s</a>', $theme_name );
|
||||
}
|
||||
|
||||
$msg = sprintf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name );
|
||||
$msg = '';
|
||||
|
||||
if ( current_user_can('update_core') ) {
|
||||
$cur = get_preferred_from_update_core();
|
||||
|
||||
if ( isset( $cur->response ) && $cur->response == 'upgrade' )
|
||||
$msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
|
||||
$msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> ';
|
||||
}
|
||||
|
||||
$msg .= sprintf( '<span id="wp-version">' . __( 'WordPress %1$s running %2$s theme.' ) . '</span>', get_bloginfo( 'version', 'display' ), $theme_name );
|
||||
|
||||
echo "<p id='wp-version-message'>$msg</p>";
|
||||
}
|
||||
|
||||
@@ -276,20 +278,21 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
||||
$wp_list_table = _get_list_table('WP_Plugins_List_Table');
|
||||
|
||||
if ( is_network_admin() || !is_multisite() ) {
|
||||
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
$active_class = ( is_plugin_active( $plugin_data['plugin'] ) ) ? ' active' : '';
|
||||
echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
|
||||
if ( ! current_user_can('update_plugins') )
|
||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
||||
else if ( empty($r->package) )
|
||||
} elseif ( empty($r->package) ) {
|
||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
|
||||
else
|
||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );
|
||||
|
||||
} else {
|
||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) );
|
||||
}
|
||||
/**
|
||||
* Fires at the end of the update message container in each
|
||||
* row of the plugins list table.
|
||||
*
|
||||
* The dynamic portion of the hook name, $file, refers to the path
|
||||
* The dynamic portion of the hook name, `$file`, refers to the path
|
||||
* of the plugin's primary file relative to the plugins directory.
|
||||
*
|
||||
* @since 2.8.0
|
||||
@@ -367,18 +370,18 @@ function wp_theme_update_row( $theme_key, $theme ) {
|
||||
$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
|
||||
|
||||
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
if ( ! current_user_can('update_themes') )
|
||||
if ( ! current_user_can('update_themes') ) {
|
||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r->new_version );
|
||||
else if ( empty( $r['package'] ) )
|
||||
} elseif ( empty( $r['package'] ) ) {
|
||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'] );
|
||||
else
|
||||
} else {
|
||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) );
|
||||
|
||||
}
|
||||
/**
|
||||
* Fires at the end of the update message container in each
|
||||
* row of the themes list table.
|
||||
*
|
||||
* The dynamic portion of the hook name, $theme_key, refers to
|
||||
* The dynamic portion of the hook name, `$theme_key`, refers to
|
||||
* the theme slug as found in the WordPress.org themes repository.
|
||||
*
|
||||
* @since 3.1.0
|
||||
|
||||
Reference in new issue
Block a user