mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -108,7 +108,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
|
||||
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
|
||||
$id = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
|
||||
$img = $img_style = '';
|
||||
$img = '';
|
||||
$img_style = '';
|
||||
$img_class = ' dashicons-before';
|
||||
|
||||
if ( false !== strpos( $class, 'wp-menu-separator' ) ) {
|
||||
@@ -152,7 +153,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
$submenu_items = array_values( $submenu_items ); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook( $submenu_items[0][2], $item[2] );
|
||||
$menu_file = $submenu_items[0][2];
|
||||
if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
|
||||
$pos = strpos( $menu_file, '?' );
|
||||
if ( false !== $pos ) {
|
||||
$menu_file = substr( $menu_file, 0, $pos );
|
||||
}
|
||||
if ( ! empty( $menu_hook ) || ( ( 'index.php' != $submenu_items[0][2] ) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) ) {
|
||||
@@ -164,7 +166,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
|
||||
$menu_hook = get_plugin_page_hook( $item[2], 'admin.php' );
|
||||
$menu_file = $item[2];
|
||||
if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
|
||||
$pos = strpos( $menu_file, '?' );
|
||||
if ( false !== $pos ) {
|
||||
$menu_file = substr( $menu_file, 0, $pos );
|
||||
}
|
||||
if ( ! empty( $menu_hook ) || ( ( 'index.php' != $item[2] ) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) ) {
|
||||
@@ -196,7 +199,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
|
||||
$menu_file = $item[2];
|
||||
|
||||
if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
|
||||
$pos = strpos( $menu_file, '?' );
|
||||
if ( false !== $pos ) {
|
||||
$menu_file = substr( $menu_file, 0, $pos );
|
||||
}
|
||||
|
||||
@@ -226,7 +230,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
|
||||
$menu_hook = get_plugin_page_hook( $sub_item[2], $item[2] );
|
||||
$sub_file = $sub_item[2];
|
||||
if ( false !== ( $pos = strpos( $sub_file, '?' ) ) ) {
|
||||
$pos = strpos( $sub_file, '?' );
|
||||
if ( false !== $pos ) {
|
||||
$sub_file = substr( $sub_file, 0, $pos );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user