mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Coding Standards: Use strict comparison in some wp-admin files.
Props pikamander2, mukesh27, SergeyBiryukov. Fixes #49239. git-svn-id: https://develop.svn.wordpress.org/trunk@47785 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -29,11 +29,11 @@ wp_enqueue_script( 'media-gallery' );
|
||||
header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
|
||||
|
||||
// IDs should be integers.
|
||||
$ID = isset( $ID ) ? (int) $ID : 0;
|
||||
$ID = isset( $ID ) ? (int) $ID : 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
|
||||
$post_id = isset( $post_id ) ? (int) $post_id : 0;
|
||||
|
||||
// Require an ID for the edit screen.
|
||||
if ( isset( $action ) && 'edit' == $action && ! $ID ) {
|
||||
if ( isset( $action ) && 'edit' === $action && ! $ID ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName
|
||||
wp_die(
|
||||
'<h1>' . __( 'Something went wrong.' ) . '</h1>' .
|
||||
'<p>' . __( 'Invalid item ID.' ) . '</p>',
|
||||
@@ -81,7 +81,7 @@ if ( isset( $_GET['tab'] ) ) {
|
||||
$body_id = 'media-upload';
|
||||
|
||||
// Let the action code decide how to handle the request.
|
||||
if ( 'type' == $tab || 'type_url' == $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) {
|
||||
if ( 'type' === $tab || 'type_url' === $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) {
|
||||
/**
|
||||
* Fires inside specific upload-type views in the legacy (pre-3.5.0)
|
||||
* media popup based on the current tab.
|
||||
|
||||
Reference in New Issue
Block a user