Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from wp-cms/moving-along-with-wordpress
Browse files Browse the repository at this point in the history
Bring in changes from WordPress
  • Loading branch information
WP CMS authored Nov 12, 2022
2 parents e593a1f + 8973f10 commit ad2ec69
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Set up PHP
uses: shivammathur/setup-php@e04e1d97f0c0481c6e1ba40f8a538454fe5d7709 # v2.21.2
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2.22.0
with:
php-version: '7.4'
coverage: none
Expand All @@ -91,7 +91,7 @@ jobs:
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}

- name: Install Composer dependencies
uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
with:
composer-options: "--no-progress --no-ansi"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Set up PHP
uses: shivammathur/setup-php@e04e1d97f0c0481c6e1ba40f8a538454fe5d7709 # v2.21.2
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2.22.0
with:
php-version: '7.4'
coverage: none
Expand All @@ -86,7 +86,7 @@ jobs:
key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}

- name: Install Composer dependencies
uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
with:
composer-options: "--no-progress --no-ansi"

Expand Down
6 changes: 3 additions & 3 deletions src/wp-admin/includes/revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
$revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $revision, $post );
}

/**
* If we only have one revision, the initial revision is missing; This happens
* when we have an autsosave and the user has clicked 'View the Autosave'
/*
* If we only have one revision, the initial revision is missing. This happens
* when we have an autosave and the user has clicked 'View the Autosave'.
*/
if ( 1 === count( $revisions ) ) {
$revisions[ $post->ID ] = array(
Expand Down
5 changes: 5 additions & 0 deletions src/wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2140,6 +2140,8 @@ function upgrade_530() {
*
* @ignore
* @since 5.5.0
*
* @global int $wp_current_db_version The old (current) database version.
*/
function upgrade_550() {
global $wp_current_db_version;
Expand Down Expand Up @@ -2178,6 +2180,9 @@ function upgrade_550() {
*
* @ignore
* @since 5.6.0
*
* @global int $wp_current_db_version The old (current) database version.
* @global wpdb $wpdb WordPress database abstraction object.
*/
function upgrade_560() {
global $wp_current_db_version, $wpdb;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-oembed.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct() {
'#https?://(www\.)?mixcloud\.com/.*#i' => array( 'https://www.mixcloud.com/oembed', true ),
'#https?://(www\.|embed\.)?ted\.com/talks/.*#i' => array( 'https://www.ted.com/services/v1/oembed.{format}', true ),
'#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'https://animoto.com/oembeds/create', true ),
'#https?://(.+)\.tumblr\.com/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ),
'#https?://(.+)\.tumblr\.com/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ),
'#https?://(www\.)?kickstarter\.com/projects/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
'#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
'#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ),
Expand Down
10 changes: 7 additions & 3 deletions src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3567,19 +3567,23 @@ function wp_nonce_ays( $action ) {
__( 'You are attempting to log out of %s' ),
get_bloginfo( 'name' )
);
$html = $title;
$html .= '</p><p>';

$redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
$html .= sprintf(

$html = $title;
$html .= '</p><p>';
$html .= sprintf(
/* translators: %s: Logout URL. */
__( 'Do you really want to <a href="%s">log out</a>?' ),
wp_logout_url( $redirect_to )
);
} else {
$html = __( 'The link you followed has expired.' );

if ( wp_get_referer() ) {
$wp_http_referer = remove_query_arg( 'updated', wp_get_referer() );
$wp_http_referer = wp_validate_redirect( esc_url_raw( $wp_http_referer ) );

$html .= '</p><p>';
$html .= sprintf(
'<a href="%s">%s</a>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2881,9 +2881,9 @@ public function get_collection_params() {
}

$query_params['slug'] = array(
'description' => __( 'Limit result set to posts with one or more specific slugs.' ),
'type' => 'array',
'items' => array(
'description' => __( 'Limit result set to posts with one or more specific slugs.' ),
'type' => 'array',
'items' => array(
'type' => 'string',
),
);
Expand Down

0 comments on commit ad2ec69

Please sign in to comment.