mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Remove redundant isset() and empty() checks.
git-svn-id: https://develop.svn.wordpress.org/trunk@13770 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -95,7 +95,7 @@ if ( isset($_REQUEST['doaction']) || isset($_REQUEST['doaction2']) || isset($_R
|
||||
|
||||
wp_redirect( $redirect_to );
|
||||
exit;
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ else
|
||||
|
||||
require_once('admin-header.php');
|
||||
|
||||
$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']);
|
||||
$mode = ( empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']);
|
||||
|
||||
$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all';
|
||||
if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam', 'trash')) )
|
||||
|
||||
@@ -40,7 +40,7 @@ if ( isset($_GET['action']) && isset($_GET['delete']) ) {
|
||||
wp_redirect($location);
|
||||
exit();
|
||||
}
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ break;
|
||||
|
||||
default:
|
||||
|
||||
if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
if ( ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delet
|
||||
|
||||
wp_redirect($sendback);
|
||||
exit();
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
else
|
||||
$this->options['hostname'] = $opt['hostname'];
|
||||
|
||||
if ( isset($opt['base']) && ! empty($opt['base']) )
|
||||
if ( ! empty($opt['base']) )
|
||||
$this->wp_base = $opt['base'];
|
||||
|
||||
// Check if the options provided are OK.
|
||||
|
||||
@@ -39,7 +39,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
else
|
||||
$this->options['hostname'] = $opt['hostname'];
|
||||
|
||||
if ( isset($opt['base']) && ! empty($opt['base']) )
|
||||
if ( ! empty($opt['base']) )
|
||||
$this->wp_base = $opt['base'];
|
||||
|
||||
// Check if the options provided are OK.
|
||||
|
||||
@@ -73,7 +73,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
else
|
||||
$this->options['hostname'] = $opt['hostname'];
|
||||
|
||||
if ( isset($opt['base']) && ! empty($opt['base']) )
|
||||
if ( ! empty($opt['base']) )
|
||||
$this->wp_base = $opt['base'];
|
||||
|
||||
// Check if the options provided are OK.
|
||||
|
||||
@@ -1243,9 +1243,8 @@ function get_admin_page_title() {
|
||||
global $pagenow;
|
||||
global $plugin_page;
|
||||
|
||||
if ( isset( $title ) && !empty ( $title ) ) {
|
||||
if ( ! empty ( $title ) )
|
||||
return $title;
|
||||
}
|
||||
|
||||
$hook = get_plugin_page_hook( $plugin_page, $pagenow );
|
||||
|
||||
@@ -1290,7 +1289,7 @@ function get_admin_page_title() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !isset($title) || empty ( $title ) ) {
|
||||
if ( empty ( $title ) ) {
|
||||
foreach ( $menu as $menu_array ) {
|
||||
if ( isset( $plugin_page ) &&
|
||||
($plugin_page == $menu_array[2] ) &&
|
||||
|
||||
@@ -79,7 +79,7 @@ function display_setup_form( $error = null ) {
|
||||
|
||||
// Ensure that Blogs appear in search engines by default
|
||||
$blog_public = 1;
|
||||
if ( isset( $_POST ) && ! empty( $_POST ) )
|
||||
if ( ! empty( $_POST ) )
|
||||
$blog_public = isset( $_POST['blog_public'] );
|
||||
|
||||
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : '';
|
||||
|
||||
@@ -28,7 +28,7 @@ if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) {
|
||||
wp_safe_redirect( wp_get_referer() );
|
||||
exit;
|
||||
}
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -54,14 +54,14 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
$class[] = 'current';
|
||||
}
|
||||
|
||||
if ( isset($item[4]) && ! empty($item[4]) )
|
||||
if ( ! empty($item[4]) )
|
||||
$class[] = $item[4];
|
||||
|
||||
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
|
||||
$tabindex = ' tabindex="1"';
|
||||
$id = isset($item[5]) && ! empty($item[5]) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
|
||||
$id = ! empty($item[5]) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
|
||||
$img = '';
|
||||
if ( isset($item[6]) && ! empty($item[6]) ) {
|
||||
if ( ! empty($item[6]) ) {
|
||||
if ( 'div' === $item[6] )
|
||||
$img = '<br />';
|
||||
else
|
||||
|
||||
@@ -117,7 +117,7 @@ if ( isset($_GET['find_detached']) ) {
|
||||
|
||||
wp_redirect($location);
|
||||
exit;
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user