mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 04:20:01 +01:00
Coding Standards: Rename the $dateCreated
variable in wp_xmlrpc_server
methods.
Some checks failed
Cleanup Pull Requests / Clean up pull requests (push) Waiting to run
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Single site (push) Waiting to run
Performance Tests / Multisite (push) Waiting to run
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP 7.2 (push) Waiting to run
PHPUnit Tests / PHP 7.3 (push) Waiting to run
PHPUnit Tests / PHP 7.4 (push) Waiting to run
PHPUnit Tests / PHP 8.0 (push) Waiting to run
PHPUnit Tests / PHP 8.1 (push) Waiting to run
PHPUnit Tests / PHP 8.2 (push) Waiting to run
PHPUnit Tests / PHP 8.3 (push) Waiting to run
PHPUnit Tests / PHP 8.4 (push) Waiting to run
PHPUnit Tests / html-api-html5lib-tests (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from build (push) Waiting to run
Test Build Processes / Core running from src (push) Waiting to run
Test Build Processes / Gutenberg running from build (push) Waiting to run
Test Build Processes / Gutenberg running from src (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
Installation Tests / Build Test Matrix (push) Has been cancelled
Installation Tests / WP ${{ inputs.wp-version || 'nightly' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} (push) Has been cancelled
Installation Tests / Slack Notifications (push) Has been cancelled
Installation Tests / Failed workflow tasks (push) Has been cancelled
Some checks failed
Cleanup Pull Requests / Clean up pull requests (push) Waiting to run
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Single site (push) Waiting to run
Performance Tests / Multisite (push) Waiting to run
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP 7.2 (push) Waiting to run
PHPUnit Tests / PHP 7.3 (push) Waiting to run
PHPUnit Tests / PHP 7.4 (push) Waiting to run
PHPUnit Tests / PHP 8.0 (push) Waiting to run
PHPUnit Tests / PHP 8.1 (push) Waiting to run
PHPUnit Tests / PHP 8.2 (push) Waiting to run
PHPUnit Tests / PHP 8.3 (push) Waiting to run
PHPUnit Tests / PHP 8.4 (push) Waiting to run
PHPUnit Tests / html-api-html5lib-tests (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from build (push) Waiting to run
Test Build Processes / Core running from src (push) Waiting to run
Test Build Processes / Gutenberg running from build (push) Waiting to run
Test Build Processes / Gutenberg running from src (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
Installation Tests / Build Test Matrix (push) Has been cancelled
Installation Tests / WP ${{ inputs.wp-version || 'nightly' }} / PHP ${{ matrix.php }} / ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} ${{ matrix.db-version }}${{ matrix.multisite && ' multisite' || '' }} (push) Has been cancelled
Installation Tests / Slack Notifications (push) Has been cancelled
Installation Tests / Failed workflow tasks (push) Has been cancelled
This resolves a few WPCS warnings: {{{ Variable "$dateCreated" is not in valid snake_case format, try "$date_created" }}} Follow-up to [1563], [1659], [5888], [6691], [8543], [19848]. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f33ee44c8c
commit
7fe8f1cc6f
@ -1513,17 +1513,17 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
// Do some timestamp voodoo.
|
||||
if ( ! empty( $post_data['post_date_gmt'] ) ) {
|
||||
// We know this is supposed to be GMT, so we're going to slap that Z on there by force.
|
||||
$dateCreated = rtrim( $post_data['post_date_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
$date_created = rtrim( $post_data['post_date_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
} elseif ( ! empty( $post_data['post_date'] ) ) {
|
||||
$dateCreated = $post_data['post_date']->getIso();
|
||||
$date_created = $post_data['post_date']->getIso();
|
||||
}
|
||||
|
||||
// Default to not flagging the post date to be edited unless it's intentional.
|
||||
$post_data['edit_date'] = false;
|
||||
|
||||
if ( ! empty( $dateCreated ) ) {
|
||||
$post_data['post_date'] = iso8601_to_datetime( $dateCreated );
|
||||
$post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'gmt' );
|
||||
if ( ! empty( $date_created ) ) {
|
||||
$post_data['post_date'] = iso8601_to_datetime( $date_created );
|
||||
$post_data['post_date_gmt'] = iso8601_to_datetime( $date_created, 'gmt' );
|
||||
|
||||
// Flag the post date to be edited.
|
||||
$post_data['edit_date'] = true;
|
||||
@ -3837,9 +3837,10 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
// Do some timestamp voodoo.
|
||||
if ( ! empty( $content_struct['date_created_gmt'] ) ) {
|
||||
// We know this is supposed to be GMT, so we're going to slap that Z on there by force.
|
||||
$dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
$comment['comment_date'] = get_date_from_gmt( $dateCreated );
|
||||
$comment['comment_date_gmt'] = iso8601_to_datetime( $dateCreated, 'gmt' );
|
||||
$date_created = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
|
||||
$comment['comment_date'] = get_date_from_gmt( $date_created );
|
||||
$comment['comment_date_gmt'] = iso8601_to_datetime( $date_created, 'gmt' );
|
||||
}
|
||||
|
||||
if ( isset( $content_struct['content'] ) ) {
|
||||
@ -5571,16 +5572,16 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
// Do some timestamp voodoo.
|
||||
if ( ! empty( $content_struct['date_created_gmt'] ) ) {
|
||||
// We know this is supposed to be GMT, so we're going to slap that Z on there by force.
|
||||
$dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
$date_created = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
} elseif ( ! empty( $content_struct['dateCreated'] ) ) {
|
||||
$dateCreated = $content_struct['dateCreated']->getIso();
|
||||
$date_created = $content_struct['dateCreated']->getIso();
|
||||
}
|
||||
|
||||
$post_date = '';
|
||||
$post_date_gmt = '';
|
||||
if ( ! empty( $dateCreated ) ) {
|
||||
$post_date = iso8601_to_datetime( $dateCreated );
|
||||
$post_date_gmt = iso8601_to_datetime( $dateCreated, 'gmt' );
|
||||
if ( ! empty( $date_created ) ) {
|
||||
$post_date = iso8601_to_datetime( $date_created );
|
||||
$post_date_gmt = iso8601_to_datetime( $date_created, 'gmt' );
|
||||
}
|
||||
|
||||
$post_category = array();
|
||||
@ -5958,17 +5959,17 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
// Do some timestamp voodoo.
|
||||
if ( ! empty( $content_struct['date_created_gmt'] ) ) {
|
||||
// We know this is supposed to be GMT, so we're going to slap that Z on there by force.
|
||||
$dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
$date_created = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
|
||||
} elseif ( ! empty( $content_struct['dateCreated'] ) ) {
|
||||
$dateCreated = $content_struct['dateCreated']->getIso();
|
||||
$date_created = $content_struct['dateCreated']->getIso();
|
||||
}
|
||||
|
||||
// Default to not flagging the post date to be edited unless it's intentional.
|
||||
$edit_date = false;
|
||||
|
||||
if ( ! empty( $dateCreated ) ) {
|
||||
$post_date = iso8601_to_datetime( $dateCreated );
|
||||
$post_date_gmt = iso8601_to_datetime( $dateCreated, 'gmt' );
|
||||
if ( ! empty( $date_created ) ) {
|
||||
$post_date = iso8601_to_datetime( $date_created );
|
||||
$post_date_gmt = iso8601_to_datetime( $date_created, 'gmt' );
|
||||
|
||||
// Flag the post date to be edited.
|
||||
$edit_date = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user