mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core. Includes minor code layout fixes for better readability. Follow-up to [47550]. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -548,8 +548,8 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
$children[] = $parent;
|
||||
|
||||
foreach ( $pages as $page ) {
|
||||
if ( $page->ID == $parent ) {
|
||||
$parent = $page->post_parent;
|
||||
if ( (int) $page->ID === $parent ) {
|
||||
$parent = (int) $page->post_parent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -568,7 +568,7 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
$post_type_object = get_post_type_object( get_post_type( $post_ID ) );
|
||||
|
||||
if ( ! isset( $post_type_object )
|
||||
|| ( isset( $children ) && in_array( $post_ID, $children ) )
|
||||
|| ( isset( $children ) && in_array( $post_ID, $children, true ) )
|
||||
|| ! current_user_can( 'edit_post', $post_ID )
|
||||
) {
|
||||
$skipped[] = $post_ID;
|
||||
|
||||
Reference in New Issue
Block a user