Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
41 changes: 41 additions & 0 deletions src/wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,11 @@ function upgrade_all() {
if ( $wp_current_db_version < 58975 ) {
upgrade_670();
}

if ( $wp_current_db_version < 60344 ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committers: When doing the commit to trunk this should be changed to the commit number in which it will appear. IE latest commit + 1.

upgrade_682();
}

maybe_disable_link_manager();

maybe_disable_automattic_widgets();
Expand Down Expand Up @@ -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 < 60344 ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

// 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.
*
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @global int $wp_db_version
*/
$wp_db_version = 58975;
$wp_db_version = 60344;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.


/**
* Holds the TinyMCE version.
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/tests/option/sanitizeOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function data_sanitize_option() {
array( 'date_format', 'F j, Y', 'F j, Y' ),
array( 'date_format', 'F j, Y', 'F j, <strong>Y</strong>' ),
array( 'ping_sites', 'http://rpc.pingomatic.com/', 'http://rpc.pingomatic.com/' ),
array( 'ping_sites', 'https://rpc.pingomatic.com/', 'https://rpc.pingomatic.com/' ),
array( 'ping_sites', "http://www.example.com\nhttp://example.org", "www.example.com \n\texample.org\n\n" ),
array( 'gmt_offset', '0', 0 ),
array( 'gmt_offset', '1.5', '1.5' ),
Expand Down
Loading