Edit File by line
/home/barbar84/public_h.../wp-admin/includes
File: update.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WordPress Administration Update API
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Administration
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Selects the first update version from the update_core option.
[9] Fix | Delete
*
[10] Fix | Delete
* @since 2.7.0
[11] Fix | Delete
*
[12] Fix | Delete
* @return object|array|false The response from the API on success, false on failure.
[13] Fix | Delete
*/
[14] Fix | Delete
function get_preferred_from_update_core() {
[15] Fix | Delete
$updates = get_core_updates();
[16] Fix | Delete
if ( ! is_array( $updates ) ) {
[17] Fix | Delete
return false;
[18] Fix | Delete
}
[19] Fix | Delete
if ( empty( $updates ) ) {
[20] Fix | Delete
return (object) array( 'response' => 'latest' );
[21] Fix | Delete
}
[22] Fix | Delete
return $updates[0];
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Gets available core updates.
[27] Fix | Delete
*
[28] Fix | Delete
* @since 2.7.0
[29] Fix | Delete
*
[30] Fix | Delete
* @param array $options Set $options['dismissed'] to true to show dismissed upgrades too,
[31] Fix | Delete
* set $options['available'] to false to skip not-dismissed updates.
[32] Fix | Delete
* @return array|false Array of the update objects on success, false on failure.
[33] Fix | Delete
*/
[34] Fix | Delete
function get_core_updates( $options = array() ) {
[35] Fix | Delete
$options = array_merge(
[36] Fix | Delete
array(
[37] Fix | Delete
'available' => true,
[38] Fix | Delete
'dismissed' => false,
[39] Fix | Delete
),
[40] Fix | Delete
$options
[41] Fix | Delete
);
[42] Fix | Delete
$dismissed = get_site_option( 'dismissed_update_core' );
[43] Fix | Delete
[44] Fix | Delete
if ( ! is_array( $dismissed ) ) {
[45] Fix | Delete
$dismissed = array();
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
$from_api = get_site_transient( 'update_core' );
[49] Fix | Delete
[50] Fix | Delete
if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) {
[51] Fix | Delete
return false;
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
$updates = $from_api->updates;
[55] Fix | Delete
$result = array();
[56] Fix | Delete
foreach ( $updates as $update ) {
[57] Fix | Delete
if ( 'autoupdate' === $update->response ) {
[58] Fix | Delete
continue;
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
if ( array_key_exists( $update->current . '|' . $update->locale, $dismissed ) ) {
[62] Fix | Delete
if ( $options['dismissed'] ) {
[63] Fix | Delete
$update->dismissed = true;
[64] Fix | Delete
$result[] = $update;
[65] Fix | Delete
}
[66] Fix | Delete
} else {
[67] Fix | Delete
if ( $options['available'] ) {
[68] Fix | Delete
$update->dismissed = false;
[69] Fix | Delete
$result[] = $update;
[70] Fix | Delete
}
[71] Fix | Delete
}
[72] Fix | Delete
}
[73] Fix | Delete
return $result;
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
/**
[77] Fix | Delete
* Gets the best available (and enabled) Auto-Update for WordPress core.
[78] Fix | Delete
*
[79] Fix | Delete
* If there's 1.2.3 and 1.3 on offer, it'll choose 1.3 if the installation allows it, else, 1.2.3.
[80] Fix | Delete
*
[81] Fix | Delete
* @since 3.7.0
[82] Fix | Delete
*
[83] Fix | Delete
* @return object|false The core update offering on success, false on failure.
[84] Fix | Delete
*/
[85] Fix | Delete
function find_core_auto_update() {
[86] Fix | Delete
$updates = get_site_transient( 'update_core' );
[87] Fix | Delete
if ( ! $updates || empty( $updates->updates ) ) {
[88] Fix | Delete
return false;
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
[92] Fix | Delete
[93] Fix | Delete
$auto_update = false;
[94] Fix | Delete
$upgrader = new WP_Automatic_Updater;
[95] Fix | Delete
foreach ( $updates->updates as $update ) {
[96] Fix | Delete
if ( 'autoupdate' !== $update->response ) {
[97] Fix | Delete
continue;
[98] Fix | Delete
}
[99] Fix | Delete
[100] Fix | Delete
if ( ! $upgrader->should_update( 'core', $update, ABSPATH ) ) {
[101] Fix | Delete
continue;
[102] Fix | Delete
}
[103] Fix | Delete
[104] Fix | Delete
if ( ! $auto_update || version_compare( $update->current, $auto_update->current, '>' ) ) {
[105] Fix | Delete
$auto_update = $update;
[106] Fix | Delete
}
[107] Fix | Delete
}
[108] Fix | Delete
return $auto_update;
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
/**
[112] Fix | Delete
* Gets and caches the checksums for the given version of WordPress.
[113] Fix | Delete
*
[114] Fix | Delete
* @since 3.7.0
[115] Fix | Delete
*
[116] Fix | Delete
* @param string $version Version string to query.
[117] Fix | Delete
* @param string $locale Locale to query.
[118] Fix | Delete
* @return array|false An array of checksums on success, false on failure.
[119] Fix | Delete
*/
[120] Fix | Delete
function get_core_checksums( $version, $locale ) {
[121] Fix | Delete
$http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
[122] Fix | Delete
$url = $http_url;
[123] Fix | Delete
[124] Fix | Delete
$ssl = wp_http_supports( array( 'ssl' ) );
[125] Fix | Delete
if ( $ssl ) {
[126] Fix | Delete
$url = set_url_scheme( $url, 'https' );
[127] Fix | Delete
}
[128] Fix | Delete
[129] Fix | Delete
$options = array(
[130] Fix | Delete
'timeout' => wp_doing_cron() ? 30 : 3,
[131] Fix | Delete
);
[132] Fix | Delete
[133] Fix | Delete
$response = wp_remote_get( $url, $options );
[134] Fix | Delete
if ( $ssl && is_wp_error( $response ) ) {
[135] Fix | Delete
trigger_error(
[136] Fix | Delete
sprintf(
[137] Fix | Delete
/* translators: %s: Support forums URL. */
[138] Fix | Delete
__( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
[139] Fix | Delete
__( 'https://wordpress.org/support/forums/' )
[140] Fix | Delete
) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
[141] Fix | Delete
headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
[142] Fix | Delete
);
[143] Fix | Delete
$response = wp_remote_get( $http_url, $options );
[144] Fix | Delete
}
[145] Fix | Delete
[146] Fix | Delete
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
[147] Fix | Delete
return false;
[148] Fix | Delete
}
[149] Fix | Delete
[150] Fix | Delete
$body = trim( wp_remote_retrieve_body( $response ) );
[151] Fix | Delete
$body = json_decode( $body, true );
[152] Fix | Delete
[153] Fix | Delete
if ( ! is_array( $body ) || ! isset( $body['checksums'] ) || ! is_array( $body['checksums'] ) ) {
[154] Fix | Delete
return false;
[155] Fix | Delete
}
[156] Fix | Delete
[157] Fix | Delete
return $body['checksums'];
[158] Fix | Delete
}
[159] Fix | Delete
[160] Fix | Delete
/**
[161] Fix | Delete
* Dismisses core update.
[162] Fix | Delete
*
[163] Fix | Delete
* @since 2.7.0
[164] Fix | Delete
*
[165] Fix | Delete
* @param object $update
[166] Fix | Delete
* @return bool
[167] Fix | Delete
*/
[168] Fix | Delete
function dismiss_core_update( $update ) {
[169] Fix | Delete
$dismissed = get_site_option( 'dismissed_update_core' );
[170] Fix | Delete
$dismissed[ $update->current . '|' . $update->locale ] = true;
[171] Fix | Delete
return update_site_option( 'dismissed_update_core', $dismissed );
[172] Fix | Delete
}
[173] Fix | Delete
[174] Fix | Delete
/**
[175] Fix | Delete
* Undismisses core update.
[176] Fix | Delete
*
[177] Fix | Delete
* @since 2.7.0
[178] Fix | Delete
*
[179] Fix | Delete
* @param string $version
[180] Fix | Delete
* @param string $locale
[181] Fix | Delete
* @return bool
[182] Fix | Delete
*/
[183] Fix | Delete
function undismiss_core_update( $version, $locale ) {
[184] Fix | Delete
$dismissed = get_site_option( 'dismissed_update_core' );
[185] Fix | Delete
$key = $version . '|' . $locale;
[186] Fix | Delete
[187] Fix | Delete
if ( ! isset( $dismissed[ $key ] ) ) {
[188] Fix | Delete
return false;
[189] Fix | Delete
}
[190] Fix | Delete
[191] Fix | Delete
unset( $dismissed[ $key ] );
[192] Fix | Delete
return update_site_option( 'dismissed_update_core', $dismissed );
[193] Fix | Delete
}
[194] Fix | Delete
[195] Fix | Delete
/**
[196] Fix | Delete
* Finds the available update for WordPress core.
[197] Fix | Delete
*
[198] Fix | Delete
* @since 2.7.0
[199] Fix | Delete
*
[200] Fix | Delete
* @param string $version Version string to find the update for.
[201] Fix | Delete
* @param string $locale Locale to find the update for.
[202] Fix | Delete
* @return object|false The core update offering on success, false on failure.
[203] Fix | Delete
*/
[204] Fix | Delete
function find_core_update( $version, $locale ) {
[205] Fix | Delete
$from_api = get_site_transient( 'update_core' );
[206] Fix | Delete
[207] Fix | Delete
if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) {
[208] Fix | Delete
return false;
[209] Fix | Delete
}
[210] Fix | Delete
[211] Fix | Delete
$updates = $from_api->updates;
[212] Fix | Delete
foreach ( $updates as $update ) {
[213] Fix | Delete
if ( $update->current == $version && $update->locale == $locale ) {
[214] Fix | Delete
return $update;
[215] Fix | Delete
}
[216] Fix | Delete
}
[217] Fix | Delete
return false;
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
/**
[221] Fix | Delete
* @since 2.3.0
[222] Fix | Delete
*
[223] Fix | Delete
* @param string $msg
[224] Fix | Delete
* @return string
[225] Fix | Delete
*/
[226] Fix | Delete
function core_update_footer( $msg = '' ) {
[227] Fix | Delete
if ( ! current_user_can( 'update_core' ) ) {
[228] Fix | Delete
/* translators: %s: WordPress version. */
[229] Fix | Delete
return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
[230] Fix | Delete
}
[231] Fix | Delete
[232] Fix | Delete
$cur = get_preferred_from_update_core();
[233] Fix | Delete
if ( ! is_object( $cur ) ) {
[234] Fix | Delete
$cur = new stdClass;
[235] Fix | Delete
}
[236] Fix | Delete
[237] Fix | Delete
if ( ! isset( $cur->current ) ) {
[238] Fix | Delete
$cur->current = '';
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
if ( ! isset( $cur->response ) ) {
[242] Fix | Delete
$cur->response = '';
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
// Include an unmodified $wp_version.
[246] Fix | Delete
require ABSPATH . WPINC . '/version.php';
[247] Fix | Delete
[248] Fix | Delete
$is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
[249] Fix | Delete
[250] Fix | Delete
if ( $is_development_version ) {
[251] Fix | Delete
return sprintf(
[252] Fix | Delete
/* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */
[253] Fix | Delete
__( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ),
[254] Fix | Delete
get_bloginfo( 'version', 'display' ),
[255] Fix | Delete
network_admin_url( 'update-core.php' )
[256] Fix | Delete
);
[257] Fix | Delete
}
[258] Fix | Delete
[259] Fix | Delete
switch ( $cur->response ) {
[260] Fix | Delete
case 'upgrade':
[261] Fix | Delete
return sprintf(
[262] Fix | Delete
'<strong><a href="%s">%s</a></strong>',
[263] Fix | Delete
network_admin_url( 'update-core.php' ),
[264] Fix | Delete
/* translators: %s: WordPress version. */
[265] Fix | Delete
sprintf( __( 'Get Version %s' ), $cur->current )
[266] Fix | Delete
);
[267] Fix | Delete
[268] Fix | Delete
case 'latest':
[269] Fix | Delete
default:
[270] Fix | Delete
/* translators: %s: WordPress version. */
[271] Fix | Delete
return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
[272] Fix | Delete
}
[273] Fix | Delete
}
[274] Fix | Delete
[275] Fix | Delete
/**
[276] Fix | Delete
* @since 2.3.0
[277] Fix | Delete
*
[278] Fix | Delete
* @global string $pagenow
[279] Fix | Delete
* @return void|false
[280] Fix | Delete
*/
[281] Fix | Delete
function update_nag() {
[282] Fix | Delete
if ( is_multisite() && ! current_user_can( 'update_core' ) ) {
[283] Fix | Delete
return false;
[284] Fix | Delete
}
[285] Fix | Delete
[286] Fix | Delete
global $pagenow;
[287] Fix | Delete
[288] Fix | Delete
if ( 'update-core.php' === $pagenow ) {
[289] Fix | Delete
return;
[290] Fix | Delete
}
[291] Fix | Delete
[292] Fix | Delete
$cur = get_preferred_from_update_core();
[293] Fix | Delete
[294] Fix | Delete
if ( ! isset( $cur->response ) || 'upgrade' !== $cur->response ) {
[295] Fix | Delete
return false;
[296] Fix | Delete
}
[297] Fix | Delete
[298] Fix | Delete
$version_url = sprintf(
[299] Fix | Delete
/* translators: %s: WordPress version. */
[300] Fix | Delete
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
[301] Fix | Delete
sanitize_title( $cur->current )
[302] Fix | Delete
);
[303] Fix | Delete
[304] Fix | Delete
if ( current_user_can( 'update_core' ) ) {
[305] Fix | Delete
$msg = sprintf(
[306] Fix | Delete
/* translators: 1: URL to WordPress release notes, 2: New WordPress version, 3: URL to network admin, 4: Accessibility text. */
[307] Fix | Delete
__( '<a href="%1$s">WordPress %2$s</a> is available! <a href="%3$s" aria-label="%4$s">Please update now</a>.' ),
[308] Fix | Delete
$version_url,
[309] Fix | Delete
$cur->current,
[310] Fix | Delete
network_admin_url( 'update-core.php' ),
[311] Fix | Delete
esc_attr__( 'Please update WordPress now' )
[312] Fix | Delete
);
[313] Fix | Delete
} else {
[314] Fix | Delete
$msg = sprintf(
[315] Fix | Delete
/* translators: 1: URL to WordPress release notes, 2: New WordPress version. */
[316] Fix | Delete
__( '<a href="%1$s">WordPress %2$s</a> is available! Please notify the site administrator.' ),
[317] Fix | Delete
$version_url,
[318] Fix | Delete
$cur->current
[319] Fix | Delete
);
[320] Fix | Delete
}
[321] Fix | Delete
[322] Fix | Delete
echo "<div class='update-nag notice notice-warning inline'>$msg</div>";
[323] Fix | Delete
}
[324] Fix | Delete
[325] Fix | Delete
/**
[326] Fix | Delete
* Displays WordPress version and active theme in the 'At a Glance' dashboard widget.
[327] Fix | Delete
*
[328] Fix | Delete
* @since 2.5.0
[329] Fix | Delete
*/
[330] Fix | Delete
function update_right_now_message() {
[331] Fix | Delete
$theme_name = wp_get_theme();
[332] Fix | Delete
if ( current_user_can( 'switch_themes' ) ) {
[333] Fix | Delete
$theme_name = sprintf( '<a href="themes.php">%1$s</a>', $theme_name );
[334] Fix | Delete
}
[335] Fix | Delete
[336] Fix | Delete
$msg = '';
[337] Fix | Delete
[338] Fix | Delete
if ( current_user_can( 'update_core' ) ) {
[339] Fix | Delete
$cur = get_preferred_from_update_core();
[340] Fix | Delete
[341] Fix | Delete
if ( isset( $cur->response ) && 'upgrade' === $cur->response ) {
[342] Fix | Delete
$msg .= sprintf(
[343] Fix | Delete
'<a href="%s" class="button" aria-describedby="wp-version">%s</a> ',
[344] Fix | Delete
network_admin_url( 'update-core.php' ),
[345] Fix | Delete
/* translators: %s: WordPress version number, or 'Latest' string. */
[346] Fix | Delete
sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) )
[347] Fix | Delete
);
[348] Fix | Delete
}
[349] Fix | Delete
}
[350] Fix | Delete
[351] Fix | Delete
/* translators: 1: Version number, 2: Theme name. */
[352] Fix | Delete
$content = __( 'WordPress %1$s running %2$s theme.' );
[353] Fix | Delete
[354] Fix | Delete
/**
[355] Fix | Delete
* Filters the text displayed in the 'At a Glance' dashboard widget.
[356] Fix | Delete
*
[357] Fix | Delete
* Prior to 3.8.0, the widget was named 'Right Now'.
[358] Fix | Delete
*
[359] Fix | Delete
* @since 4.4.0
[360] Fix | Delete
*
[361] Fix | Delete
* @param string $content Default text.
[362] Fix | Delete
*/
[363] Fix | Delete
$content = apply_filters( 'update_right_now_text', $content );
[364] Fix | Delete
[365] Fix | Delete
$msg .= sprintf( '<span id="wp-version">' . $content . '</span>', get_bloginfo( 'version', 'display' ), $theme_name );
[366] Fix | Delete
[367] Fix | Delete
echo "<p id='wp-version-message'>$msg</p>";
[368] Fix | Delete
}
[369] Fix | Delete
[370] Fix | Delete
/**
[371] Fix | Delete
* @since 2.9.0
[372] Fix | Delete
*
[373] Fix | Delete
* @return array
[374] Fix | Delete
*/
[375] Fix | Delete
function get_plugin_updates() {
[376] Fix | Delete
$all_plugins = get_plugins();
[377] Fix | Delete
$upgrade_plugins = array();
[378] Fix | Delete
$current = get_site_transient( 'update_plugins' );
[379] Fix | Delete
foreach ( (array) $all_plugins as $plugin_file => $plugin_data ) {
[380] Fix | Delete
if ( isset( $current->response[ $plugin_file ] ) ) {
[381] Fix | Delete
$upgrade_plugins[ $plugin_file ] = (object) $plugin_data;
[382] Fix | Delete
$upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ];
[383] Fix | Delete
}
[384] Fix | Delete
}
[385] Fix | Delete
[386] Fix | Delete
return $upgrade_plugins;
[387] Fix | Delete
}
[388] Fix | Delete
[389] Fix | Delete
/**
[390] Fix | Delete
* @since 2.9.0
[391] Fix | Delete
*/
[392] Fix | Delete
function wp_plugin_update_rows() {
[393] Fix | Delete
if ( ! current_user_can( 'update_plugins' ) ) {
[394] Fix | Delete
return;
[395] Fix | Delete
}
[396] Fix | Delete
[397] Fix | Delete
$plugins = get_site_transient( 'update_plugins' );
[398] Fix | Delete
if ( isset( $plugins->response ) && is_array( $plugins->response ) ) {
[399] Fix | Delete
$plugins = array_keys( $plugins->response );
[400] Fix | Delete
foreach ( $plugins as $plugin_file ) {
[401] Fix | Delete
add_action( "after_plugin_row_{$plugin_file}", 'wp_plugin_update_row', 10, 2 );
[402] Fix | Delete
}
[403] Fix | Delete
}
[404] Fix | Delete
}
[405] Fix | Delete
[406] Fix | Delete
/**
[407] Fix | Delete
* Displays update information for a plugin.
[408] Fix | Delete
*
[409] Fix | Delete
* @since 2.3.0
[410] Fix | Delete
*
[411] Fix | Delete
* @param string $file Plugin basename.
[412] Fix | Delete
* @param array $plugin_data Plugin information.
[413] Fix | Delete
* @return void|false
[414] Fix | Delete
*/
[415] Fix | Delete
function wp_plugin_update_row( $file, $plugin_data ) {
[416] Fix | Delete
$current = get_site_transient( 'update_plugins' );
[417] Fix | Delete
if ( ! isset( $current->response[ $file ] ) ) {
[418] Fix | Delete
return false;
[419] Fix | Delete
}
[420] Fix | Delete
[421] Fix | Delete
$response = $current->response[ $file ];
[422] Fix | Delete
[423] Fix | Delete
$plugins_allowedtags = array(
[424] Fix | Delete
'a' => array(
[425] Fix | Delete
'href' => array(),
[426] Fix | Delete
'title' => array(),
[427] Fix | Delete
),
[428] Fix | Delete
'abbr' => array( 'title' => array() ),
[429] Fix | Delete
'acronym' => array( 'title' => array() ),
[430] Fix | Delete
'code' => array(),
[431] Fix | Delete
'em' => array(),
[432] Fix | Delete
'strong' => array(),
[433] Fix | Delete
);
[434] Fix | Delete
[435] Fix | Delete
$plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags );
[436] Fix | Delete
$details_url = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800' );
[437] Fix | Delete
[438] Fix | Delete
/** @var WP_Plugins_List_Table $wp_list_table */
[439] Fix | Delete
$wp_list_table = _get_list_table(
[440] Fix | Delete
'WP_Plugins_List_Table',
[441] Fix | Delete
array(
[442] Fix | Delete
'screen' => get_current_screen(),
[443] Fix | Delete
)
[444] Fix | Delete
);
[445] Fix | Delete
[446] Fix | Delete
if ( is_network_admin() || ! is_multisite() ) {
[447] Fix | Delete
if ( is_network_admin() ) {
[448] Fix | Delete
$active_class = is_plugin_active_for_network( $file ) ? ' active' : '';
[449] Fix | Delete
} else {
[450] Fix | Delete
$active_class = is_plugin_active( $file ) ? ' active' : '';
[451] Fix | Delete
}
[452] Fix | Delete
[453] Fix | Delete
$requires_php = isset( $response->requires_php ) ? $response->requires_php : null;
[454] Fix | Delete
$compatible_php = is_php_version_compatible( $requires_php );
[455] Fix | Delete
$notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
[456] Fix | Delete
[457] Fix | Delete
printf(
[458] Fix | Delete
'<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' .
[459] Fix | Delete
'<td colspan="%s" class="plugin-update colspanchange">' .
[460] Fix | Delete
'<div class="update-message notice inline %s notice-alt"><p>',
[461] Fix | Delete
$active_class,
[462] Fix | Delete
esc_attr( $response->slug . '-update' ),
[463] Fix | Delete
esc_attr( $response->slug ),
[464] Fix | Delete
esc_attr( $file ),
[465] Fix | Delete
esc_attr( $wp_list_table->get_column_count() ),
[466] Fix | Delete
$notice_type
[467] Fix | Delete
);
[468] Fix | Delete
[469] Fix | Delete
if ( ! current_user_can( 'update_plugins' ) ) {
[470] Fix | Delete
printf(
[471] Fix | Delete
/* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
[472] Fix | Delete
__( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ),
[473] Fix | Delete
$plugin_name,
[474] Fix | Delete
esc_url( $details_url ),
[475] Fix | Delete
sprintf(
[476] Fix | Delete
'class="thickbox open-plugin-details-modal" aria-label="%s"',
[477] Fix | Delete
/* translators: 1: Plugin name, 2: Version number. */
[478] Fix | Delete
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
[479] Fix | Delete
),
[480] Fix | Delete
esc_attr( $response->new_version )
[481] Fix | Delete
);
[482] Fix | Delete
} elseif ( empty( $response->package ) ) {
[483] Fix | Delete
printf(
[484] Fix | Delete
/* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
[485] Fix | Delete
__( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
[486] Fix | Delete
$plugin_name,
[487] Fix | Delete
esc_url( $details_url ),
[488] Fix | Delete
sprintf(
[489] Fix | Delete
'class="thickbox open-plugin-details-modal" aria-label="%s"',
[490] Fix | Delete
/* translators: 1: Plugin name, 2: Version number. */
[491] Fix | Delete
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
[492] Fix | Delete
),
[493] Fix | Delete
esc_attr( $response->new_version )
[494] Fix | Delete
);
[495] Fix | Delete
} else {
[496] Fix | Delete
if ( $compatible_php ) {
[497] Fix | Delete
printf(
[498] Fix | Delete
/* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number, 5: Update URL, 6: Additional link attributes. */
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function