From 83af0329a2deea811c23c83427221a0f42ff52c8 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 11 Jan 2019 06:25:37 +0000 Subject: [PATCH] Coding Standards: Document intentional `case` block fall-throughs. Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations. See #45934. git-svn-id: https://develop.svn.wordpress.org/trunk@44565 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/upgrade.php | 1 + src/wp-admin/post.php | 1 + src/wp-admin/user-edit.php | 1 + src/wp-includes/general-template.php | 1 + 4 files changed, 4 insertions(+) diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 32e8d2c6a2..32d853cb05 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -1749,6 +1749,7 @@ function upgrade_330() { $sidebars_widgets = $_sidebars_widgets; unset( $_sidebars_widgets ); + // intentional fall-through to upgrade to the next version. case 2: $sidebars_widgets = retrieve_widgets(); $sidebars_widgets['array_version'] = 3; diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php index 6f95adc17e..c932d72e18 100644 --- a/src/wp-admin/post.php +++ b/src/wp-admin/post.php @@ -205,6 +205,7 @@ switch ( $action ) { wp_update_attachment_metadata( $post_id, $newmeta ); + // Intentional fall-through to trigger the edit_post() call. case 'editpost': check_admin_referer( 'update-post_' . $post_id ); diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php index 3a469a3db0..cfcce8f66a 100644 --- a/src/wp-admin/user-edit.php +++ b/src/wp-admin/user-edit.php @@ -173,6 +173,7 @@ switch ( $action ) { exit; } + // Intentional fall-through to display $errors. default: $profileuser = get_user_to_edit( $user_id ); diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 4d39696eb7..118d563cda 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -655,6 +655,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) { 'url' ) ); + // Intentional fall-through to be handled by the 'url' case. case 'url': $output = home_url(); break;