Pings/Trackbacks: Use HTTPS for services that now support it.
This updates the default on new installations for rpc.pingomatic.com to use https while also upgrading existing sites that use rpc.pingomatic.com or rpc.twingly.com to use https for those two domains. Reviewed by audrasjb. Merges [60421] and [60422] to the 6.8 branch. Props sabernhardt, peterwilsoncc, jorbin, bhubbard, matt. Fixes #42007. Built from https://develop.svn.wordpress.org/branches/6.8@60428 git-svn-id: http://core.svn.wordpress.org/branches/6.8@59764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -446,7 +446,7 @@ function populate_options( array $options = array() ) {
|
||||
'moderation_keys' => '',
|
||||
'active_plugins' => array(),
|
||||
'category_base' => '',
|
||||
'ping_sites' => 'http://rpc.pingomatic.com/',
|
||||
'ping_sites' => 'https://rpc.pingomatic.com/',
|
||||
'comment_max_links' => 2,
|
||||
'gmt_offset' => $gmt_offset,
|
||||
|
||||
|
||||
@@ -881,6 +881,11 @@ function upgrade_all() {
|
||||
if ( $wp_current_db_version < 58975 ) {
|
||||
upgrade_670();
|
||||
}
|
||||
|
||||
if ( $wp_current_db_version < 60421 ) {
|
||||
upgrade_682();
|
||||
}
|
||||
|
||||
maybe_disable_link_manager();
|
||||
|
||||
maybe_disable_automattic_widgets();
|
||||
@@ -2439,6 +2444,42 @@ function upgrade_670() {
|
||||
wp_set_options_autoload( $options, false );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes changes made in WordPress 6.8.2.
|
||||
*
|
||||
* @ignore
|
||||
* @since 6.8.2
|
||||
*
|
||||
* @global int $wp_current_db_version The old (current) database version.
|
||||
*/
|
||||
function upgrade_682() {
|
||||
global $wp_current_db_version;
|
||||
|
||||
if ( $wp_current_db_version < 60421 ) {
|
||||
// Upgrade Ping-O-Matic and Twingly to use HTTPS.
|
||||
$ping_sites_value = get_option( 'ping_sites' );
|
||||
$ping_sites_value = explode( "\n", $ping_sites_value );
|
||||
$ping_sites_value = array_map(
|
||||
function ( $url ) {
|
||||
$url = trim( $url );
|
||||
$url = sanitize_url( $url );
|
||||
if (
|
||||
str_ends_with( trailingslashit( $url ), '://rpc.pingomatic.com/' )
|
||||
|| str_ends_with( trailingslashit( $url ), '://rpc.twingly.com/' )
|
||||
) {
|
||||
$url = set_url_scheme( $url, 'https' );
|
||||
}
|
||||
return $url;
|
||||
},
|
||||
$ping_sites_value
|
||||
);
|
||||
$ping_sites_value = array_filter( $ping_sites_value );
|
||||
$ping_sites_value = implode( "\n", $ping_sites_value );
|
||||
update_option( 'ping_sites', $ping_sites_value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes network-level upgrade routines.
|
||||
*
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8.2-alpha-60427';
|
||||
$wp_version = '6.8.2-alpha-60428';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 58975;
|
||||
$wp_db_version = 60421;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version.
|
||||
|
||||
Reference in New Issue
Block a user