-
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index b1ad058912..387653d8c0 100644
a
|
b
|
if ( $doaction ) { |
76 | 76 | $sendback = admin_url( $parent_file ); |
77 | 77 | } |
78 | 78 | $sendback = add_query_arg( 'paged', $pagenum, $sendback ); |
79 | | if ( strpos( $sendback, 'post.php' ) !== false ) { |
| 79 | if ( false !== strpos( $sendback, 'post.php' ) ) { |
80 | 80 | $sendback = admin_url( $post_new_file ); |
81 | 81 | } |
82 | 82 | |
-
diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index aea2543623..3ef6035800 100644
a
|
b
|
function wp_ajax_widgets_order() { |
2026 | 2026 | if ( ! empty( $val ) ) { |
2027 | 2027 | $val = explode( ',', $val ); |
2028 | 2028 | foreach ( $val as $k => $v ) { |
2029 | | if ( strpos( $v, 'widget-' ) === false ) { |
| 2029 | if ( false === strpos( $v, 'widget-' ) ) { |
2030 | 2030 | continue; |
2031 | 2031 | } |
2032 | 2032 | |
-
diff --git a/wp-admin/includes/class-automatic-upgrader-skin.php b/wp-admin/includes/class-automatic-upgrader-skin.php
index 571068d691..89aa4134ba 100644
a
|
b
|
class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { |
71 | 71 | $string = $this->upgrader->strings[ $string ]; |
72 | 72 | } |
73 | 73 | |
74 | | if ( strpos( $string, '%' ) !== false ) { |
| 74 | if ( false !== strpos( $string, '%' ) ) { |
75 | 75 | $args = func_get_args(); |
76 | 76 | $args = array_splice( $args, 1 ); |
77 | 77 | if ( ! empty( $args ) ) { |
-
diff --git a/wp-admin/includes/class-bulk-upgrader-skin.php b/wp-admin/includes/class-bulk-upgrader-skin.php
index c1454e62f1..07718ef38c 100644
a
|
b
|
class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { |
56 | 56 | $string = $this->upgrader->strings[ $string ]; |
57 | 57 | } |
58 | 58 | |
59 | | if ( strpos( $string, '%' ) !== false ) { |
| 59 | if ( false !== strpos( $string, '%' ) ) { |
60 | 60 | $args = func_get_args(); |
61 | 61 | $args = array_splice( $args, 1 ); |
62 | 62 | if ( $args ) { |
-
diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php
index 35f670ff38..e48e0c97a3 100644
a
|
b
|
class ftp_base { |
281 | 281 | // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false |
282 | 282 | // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid |
283 | 283 | $ipaslong = ip2long($ip); |
284 | | if ( ($ipaslong == false) || ($ipaslong === -1) ) { |
| 284 | if ( ( false == $ipaslong ) || ( $ipaslong === -1 ) ) { |
285 | 285 | $this->SendMSG("Wrong host name/address \"".$host."\""); |
286 | 286 | return FALSE; |
287 | 287 | } |
… |
… |
class ftp_base { |
867 | 867 | $this->_data_close(); |
868 | 868 | if(!$this->_readmsg()) return FALSE; |
869 | 869 | if(!$this->_checkCode()) return FALSE; |
870 | | if($out === FALSE ) return FALSE; |
| 870 | if( FALSE === $out ) return FALSE; |
871 | 871 | $out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY); |
872 | 872 | // $this->SendMSG(implode($this->_eol_code[$this->OS_local], $out)); |
873 | 873 | } |
-
diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php
index ae0af7a8f1..413d04905c 100644
a
|
b
|
|
1795 | 1795 | } |
1796 | 1796 | |
1797 | 1797 | // ----- Look for mandatory options |
1798 | | if ($v_requested_options !== false) { |
| 1798 | if ( false !== $v_requested_options ) { |
1799 | 1799 | for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { |
1800 | 1800 | // ----- Look for mandatory option |
1801 | 1801 | if ($v_requested_options[$key] == 'mandatory') { |
… |
… |
|
1966 | 1966 | } |
1967 | 1967 | |
1968 | 1968 | // ----- Look for mandatory options |
1969 | | if ($v_requested_options !== false) { |
| 1969 | if ( false !== $v_requested_options ) { |
1970 | 1970 | for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { |
1971 | 1971 | // ----- Look for mandatory option |
1972 | 1972 | if ($v_requested_options[$key] == 'mandatory') { |
… |
… |
|
2062 | 2062 | $v_dirlist_descr = array(); |
2063 | 2063 | $v_dirlist_nb = 0; |
2064 | 2064 | if ($v_folder_handler = @opendir($v_descr['filename'])) { |
2065 | | while (($v_item_handler = @readdir($v_folder_handler)) !== false) { |
| 2065 | while ( false !== ( $v_item_handler = @readdir( $v_folder_handler ) ) ) { |
2066 | 2066 | |
2067 | 2067 | // ----- Skip '.' and '..' |
2068 | 2068 | if (($v_item_handler == '.') || ($v_item_handler == '..')) { |
… |
… |
|
3633 | 3633 | } |
3634 | 3634 | |
3635 | 3635 | // ----- Look for all path to remove |
3636 | | if ($p_remove_all_path == true) { |
| 3636 | if ( true == $p_remove_all_path ) { |
3637 | 3637 | // ----- Look for folder entry that not need to be extracted |
3638 | 3638 | if (($p_entry['external']&0x00000010)==0x00000010) { |
3639 | 3639 | |
… |
… |
|
3889 | 3889 | // ----- Decompress the file |
3890 | 3890 | $v_file_content = @gzinflate($v_buffer); |
3891 | 3891 | unset($v_buffer); |
3892 | | if ($v_file_content === FALSE) { |
| 3892 | if ( FALSE === $v_file_content ) { |
3893 | 3893 | |
3894 | 3894 | // ----- Change the file status |
3895 | 3895 | // TBC |
… |
… |
|
4217 | 4217 | $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); |
4218 | 4218 | |
4219 | 4219 | // ----- Decompress the file |
4220 | | if (($p_string = @gzinflate($v_data)) === FALSE) { |
| 4220 | if ( FALSE === ( $p_string = @gzinflate( $v_data ) ) ) { |
4221 | 4221 | // TBC |
4222 | 4222 | } |
4223 | 4223 | } |
-
diff --git a/wp-admin/includes/class-walker-nav-menu-edit.php b/wp-admin/includes/class-walker-nav-menu-edit.php
index d53c0c8988..99d2dc1f2d 100644
a
|
b
|
class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { |
215 | 215 | </fieldset> |
216 | 216 | |
217 | 217 | <div class="menu-item-actions description-wide submitbox"> |
218 | | <?php if ( 'custom' != $item->type && $original_title !== false ) : ?> |
| 218 | <?php if ( 'custom' != $item->type && false !== $original_title ) : ?> |
219 | 219 | <p class="link-to-original"> |
220 | 220 | <?php printf( __( 'Original: %s' ), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?> |
221 | 221 | </p> |
-
diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php
index c518408ec9..23d78ee07c 100644
a
|
b
|
class WP_Filesystem_Base { |
172 | 172 | return $this->cache[ $folder ]; |
173 | 173 | } |
174 | 174 | |
175 | | if ( stripos( $this->method, 'ftp' ) !== false ) { |
| 175 | if ( false !== stripos( $this->method, 'ftp' ) ) { |
176 | 176 | $constant_overrides = array( |
177 | 177 | 'FTP_BASE' => ABSPATH, |
178 | 178 | 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, |
-
diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php
index 36648e1844..7b6be636f4 100644
a
|
b
|
class WP_Filesystem_FTPext extends WP_Filesystem_Base { |
445 | 445 | public function parselisting( $line ) { |
446 | 446 | static $is_windows = null; |
447 | 447 | if ( is_null( $is_windows ) ) { |
448 | | $is_windows = stripos( ftp_systype( $this->link ), 'win' ) !== false; |
| 448 | $is_windows = false !== stripos( ftp_systype( $this->link ), 'win' ); |
449 | 449 | } |
450 | 450 | |
451 | 451 | if ( $is_windows && preg_match( '/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/', $line, $lucifer ) ) { |
-
diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php
index 82101beacd..409075d159 100644
a
|
b
|
class WP_Filesystem_SSH2 extends WP_Filesystem_Base { |
219 | 219 | fclose( $stream ); |
220 | 220 | |
221 | 221 | if ( $returnbool ) { |
222 | | return ( $data === false ) ? false : '' != trim( $data ); |
| 222 | return ( false === $data ) ? false : '' != trim( $data ); |
223 | 223 | } else { |
224 | 224 | return $data; |
225 | 225 | } |
-
diff --git a/wp-admin/includes/class-wp-upgrader-skin.php b/wp-admin/includes/class-wp-upgrader-skin.php
index 27656aa2de..35dcac700c 100644
a
|
b
|
class WP_Upgrader_Skin { |
146 | 146 | $string = $this->upgrader->strings[ $string ]; |
147 | 147 | } |
148 | 148 | |
149 | | if ( strpos( $string, '%' ) !== false ) { |
| 149 | if ( false !== strpos( $string, '%' ) ) { |
150 | 150 | $args = func_get_args(); |
151 | 151 | $args = array_splice( $args, 1 ); |
152 | 152 | if ( $args ) { |
-
diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php
index 4bec958b25..a53b07dc0e 100644
a
|
b
|
function list_files( $folder = '', $levels = 100, $exclusions = array() ) { |
142 | 142 | |
143 | 143 | $dir = @opendir( $folder ); |
144 | 144 | if ( $dir ) { |
145 | | while ( ( $file = readdir( $dir ) ) !== false ) { |
| 145 | while ( false !== ( $file = readdir( $dir ) ) ) { |
146 | 146 | // Skip current and parent folder links. |
147 | 147 | if ( in_array( $file, array( '.', '..' ), true ) ) { |
148 | 148 | continue; |
… |
… |
function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) { |
1209 | 1209 | if ( untrailingslashit( $to ) == $dir ) { // Skip over the working directory, We know this exists (or will exist) |
1210 | 1210 | continue; |
1211 | 1211 | } |
1212 | | if ( strpos( $dir, $to ) === false ) { // If the directory is not within the working directory, Skip it |
| 1212 | if ( false === strpos( $dir, $to ) ) { // If the directory is not within the working directory, Skip it |
1213 | 1213 | continue; |
1214 | 1214 | } |
1215 | 1215 | |
… |
… |
function _unzip_file_pclzip( $file, $to, $needed_dirs = array() ) { |
1334 | 1334 | if ( untrailingslashit( $to ) == $dir ) { // Skip over the working directory, We know this exists (or will exist) |
1335 | 1335 | continue; |
1336 | 1336 | } |
1337 | | if ( strpos( $dir, $to ) === false ) { // If the directory is not within the working directory, Skip it |
| 1337 | if ( false === strpos( $dir, $to ) ) { // If the directory is not within the working directory, Skip it |
1338 | 1338 | continue; |
1339 | 1339 | } |
1340 | 1340 | |
… |
… |
function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_f |
1570 | 1570 | $temp_file_owner = @fileowner( $temp_file_name ); |
1571 | 1571 | } |
1572 | 1572 | |
1573 | | if ( $wp_file_owner !== false && $wp_file_owner === $temp_file_owner ) { |
| 1573 | if ( false !== $wp_file_owner && $wp_file_owner === $temp_file_owner ) { |
1574 | 1574 | // WordPress is creating files as the same owner as the WordPress files, |
1575 | 1575 | // this means it's safe to modify & create new files via PHP. |
1576 | 1576 | $method = 'direct'; |
-
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index c941e625e3..d6a10813f8 100644
a
|
b
|
$plupload_init = array( |
2017 | 2017 | |
2018 | 2018 | // Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos |
2019 | 2019 | // when enabled. See #29602. |
2020 | | if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false && |
2021 | | strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) { |
| 2020 | if ( wp_is_mobile() && false !== strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) && |
| 2021 | false !== strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) ) { |
2022 | 2022 | |
2023 | 2023 | $plupload_init['multi_selection'] = false; |
2024 | 2024 | } |
… |
… |
function wp_read_video_metadata( $file ) { |
3301 | 3301 | if ( empty( $metadata['created_timestamp'] ) ) { |
3302 | 3302 | $created_timestamp = wp_get_media_creation_timestamp( $data ); |
3303 | 3303 | |
3304 | | if ( $created_timestamp !== false ) { |
| 3304 | if ( false !== $created_timestamp ) { |
3305 | 3305 | $metadata['created_timestamp'] = $created_timestamp; |
3306 | 3306 | } |
3307 | 3307 | } |
-
diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php
index a8d39ecb04..4609adcfed 100644
a
|
b
|
function xfn_check( $class, $value = '', $deprecated = '' ) { |
1150 | 1150 | } |
1151 | 1151 | |
1152 | 1152 | if ( '' == $value ) { |
1153 | | if ( 'family' == $class && strpos( $link_rel, 'child' ) === false && strpos( $link_rel, 'parent' ) === false && strpos( $link_rel, 'sibling' ) === false && strpos( $link_rel, 'spouse' ) === false && strpos( $link_rel, 'kin' ) === false ) { |
| 1153 | if ( 'family' == $class && false === strpos( $link_rel, 'child' ) && false === strpos( $link_rel, 'parent' ) && false === strpos( $link_rel, 'sibling' ) && false === strpos( $link_rel, 'spouse' ) && false === strpos( $link_rel, 'kin' ) ) { |
1154 | 1154 | echo ' checked="checked"'; |
1155 | 1155 | } |
1156 | | if ( 'friendship' == $class && strpos( $link_rel, 'friend' ) === false && strpos( $link_rel, 'acquaintance' ) === false && strpos( $link_rel, 'contact' ) === false ) { |
| 1156 | if ( 'friendship' == $class && false === strpos( $link_rel, 'friend' ) && false === strpos( $link_rel, 'acquaintance' ) && false === strpos( $link_rel, 'contact' ) ) { |
1157 | 1157 | echo ' checked="checked"'; |
1158 | 1158 | } |
1159 | | if ( 'geographical' == $class && strpos( $link_rel, 'co-resident' ) === false && strpos( $link_rel, 'neighbor' ) === false ) { |
| 1159 | if ( 'geographical' == $class && false === strpos( $link_rel, 'co-resident' ) && false === strpos( $link_rel, 'neighbor' ) ) { |
1160 | 1160 | echo ' checked="checked"'; |
1161 | 1161 | } |
1162 | 1162 | if ( 'identity' == $class && in_array( 'me', $rels ) ) { |
-
diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php
index f2787eba35..5cd3572872 100644
a
|
b
|
function iis7_rewrite_rule_exists( $filename ) { |
677 | 677 | } |
678 | 678 | |
679 | 679 | $doc = new DOMDocument(); |
680 | | if ( $doc->load( $filename ) === false ) { |
| 680 | if ( false === $doc->load( $filename ) ) { |
681 | 681 | return false; |
682 | 682 | } |
683 | 683 | $xpath = new DOMXPath( $doc ); |
… |
… |
function iis7_delete_rewrite_rule( $filename ) { |
710 | 710 | $doc = new DOMDocument(); |
711 | 711 | $doc->preserveWhiteSpace = false; |
712 | 712 | |
713 | | if ( $doc->load( $filename ) === false ) { |
| 713 | if ( false === $doc->load( $filename ) ) { |
714 | 714 | return false; |
715 | 715 | } |
716 | 716 | $xpath = new DOMXPath( $doc ); |
… |
… |
function iis7_add_rewrite_rule( $filename, $rewrite_rule ) { |
749 | 749 | $doc = new DOMDocument(); |
750 | 750 | $doc->preserveWhiteSpace = false; |
751 | 751 | |
752 | | if ( $doc->load( $filename ) === false ) { |
| 752 | if ( false === $doc->load( $filename ) ) { |
753 | 753 | return false; |
754 | 754 | } |
755 | 755 | |
-
diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index f46b7f336e..ad4404a466 100644
a
|
b
|
function wpmu_delete_blog( $blog_id, $drop = false ) { |
164 | 164 | |
165 | 165 | $dh = @opendir( $dir ); |
166 | 166 | if ( $dh ) { |
167 | | while ( ( $file = @readdir( $dh ) ) !== false ) { |
| 167 | while ( false !== ( $file = @readdir( $dh ) ) ) { |
168 | 168 | if ( $file == '.' || $file == '..' ) { |
169 | 169 | continue; |
170 | 170 | } |
… |
… |
function mu_dropdown_languages( $lang_files = array(), $current = '' ) { |
784 | 784 | } |
785 | 785 | } |
786 | 786 | |
787 | | if ( $flag === false ) { // WordPress english |
| 787 | if ( false === $flag ) { // WordPress english |
788 | 788 | $output[] = '<option value=""' . selected( $current, '', false ) . '>' . __( 'English' ) . '</option>'; |
789 | 789 | } |
790 | 790 | |
-
diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php
index 5b8bfd7e00..41ddaac9bf 100644
a
|
b
|
function wp_nav_menu_setup() { |
172 | 172 | function wp_initial_nav_menu_meta_boxes() { |
173 | 173 | global $wp_meta_boxes; |
174 | 174 | |
175 | | if ( get_user_option( 'metaboxhidden_nav-menus' ) !== false || ! is_array( $wp_meta_boxes ) ) { |
| 175 | if ( false !== get_user_option( 'metaboxhidden_nav-menus' ) || ! is_array( $wp_meta_boxes ) ) { |
176 | 176 | return; |
177 | 177 | } |
178 | 178 | |
-
diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php
index 7e660f064b..0d03b96d03 100644
a
|
b
|
function get_plugins( $plugin_folder = '' ) { |
264 | 264 | $plugins_dir = @ opendir( $plugin_root ); |
265 | 265 | $plugin_files = array(); |
266 | 266 | if ( $plugins_dir ) { |
267 | | while ( ( $file = readdir( $plugins_dir ) ) !== false ) { |
| 267 | while ( false !== ( $file = readdir( $plugins_dir ) ) ) { |
268 | 268 | if ( substr( $file, 0, 1 ) == '.' ) { |
269 | 269 | continue; |
270 | 270 | } |
271 | 271 | if ( is_dir( $plugin_root . '/' . $file ) ) { |
272 | 272 | $plugins_subdir = @ opendir( $plugin_root . '/' . $file ); |
273 | 273 | if ( $plugins_subdir ) { |
274 | | while ( ( $subfile = readdir( $plugins_subdir ) ) !== false ) { |
| 274 | while ( false !== ( $subfile = readdir( $plugins_subdir ) ) ) { |
275 | 275 | if ( substr( $subfile, 0, 1 ) == '.' ) { |
276 | 276 | continue; |
277 | 277 | } |
… |
… |
function get_mu_plugins() { |
333 | 333 | return $wp_plugins; |
334 | 334 | } |
335 | 335 | if ( $plugins_dir = @ opendir( WPMU_PLUGIN_DIR ) ) { |
336 | | while ( ( $file = readdir( $plugins_dir ) ) !== false ) { |
| 336 | while ( false !== ( $file = readdir( $plugins_dir ) ) ) { |
337 | 337 | if ( substr( $file, -4 ) == '.php' ) { |
338 | 338 | $plugin_files[] = $file; |
339 | 339 | } |
… |
… |
function get_dropins() { |
395 | 395 | |
396 | 396 | // These exist in the wp-content directory |
397 | 397 | if ( $plugins_dir = @ opendir( WP_CONTENT_DIR ) ) { |
398 | | while ( ( $file = readdir( $plugins_dir ) ) !== false ) { |
| 398 | while ( false !== ( $file = readdir( $plugins_dir ) ) ) { |
399 | 399 | if ( isset( $_dropins[ $file ] ) ) { |
400 | 400 | $plugin_files[] = $file; |
401 | 401 | } |
… |
… |
function add_option_whitelist( $new_options, $options = '' ) { |
1933 | 1933 | $whitelist_options[ $page ][] = $key; |
1934 | 1934 | } else { |
1935 | 1935 | $pos = array_search( $key, $whitelist_options[ $page ] ); |
1936 | | if ( $pos === false ) { |
| 1936 | if ( false === $pos ) { |
1937 | 1937 | $whitelist_options[ $page ][] = $key; |
1938 | 1938 | } |
1939 | 1939 | } |
… |
… |
function remove_option_whitelist( $del_options, $options = '' ) { |
1965 | 1965 | foreach ( $keys as $key ) { |
1966 | 1966 | if ( isset( $whitelist_options[ $page ] ) && is_array( $whitelist_options[ $page ] ) ) { |
1967 | 1967 | $pos = array_search( $key, $whitelist_options[ $page ] ); |
1968 | | if ( $pos !== false ) { |
| 1968 | if ( false !== $pos ) { |
1969 | 1969 | unset( $whitelist_options[ $page ][ $pos ] ); |
1970 | 1970 | } |
1971 | 1971 | } |
-
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php
index 392fea93e0..e01dc52c2c 100644
a
|
b
|
function _fix_attachment_links( $post ) { |
1014 | 1014 | $url_id = (int) $url_match[2]; |
1015 | 1015 | $rel_id = (int) $rel_match[1]; |
1016 | 1016 | |
1017 | | if ( ! $url_id || ! $rel_id || $url_id != $rel_id || strpos( $url_match[0], $site_url ) === false ) { |
| 1017 | if ( ! $url_id || ! $rel_id || $url_id != $rel_id || false === strpos( $url_match[0], $site_url ) ) { |
1018 | 1018 | continue; |
1019 | 1019 | } |
1020 | 1020 | |
-
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
index 6e21b0d4de..aad90c05a7 100644
a
|
b
|
function upgrade_300() { |
1578 | 1578 | populate_roles_300(); |
1579 | 1579 | } |
1580 | 1580 | |
1581 | | if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) { |
| 1581 | if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && false === get_site_option( 'siteurl' ) ) { |
1582 | 1582 | add_site_option( 'siteurl', '' ); |
1583 | 1583 | } |
1584 | 1584 | |
… |
… |
function dbDelta( $queries = '', $execute = true ) { |
2768 | 2768 | $index_string .= " ($index_columns)"; |
2769 | 2769 | |
2770 | 2770 | // Check if the index definition exists, ignoring subparts. |
2771 | | if ( ! ( ( $aindex = array_search( $index_string, $indices_without_subparts ) ) === false ) ) { |
| 2771 | if ( ! ( false === ( $aindex = array_search( $index_string, $indices_without_subparts ) ) ) ) { |
2772 | 2772 | // If the index already exists (even with different subparts), we don't need to create it. |
2773 | 2773 | unset( $indices_without_subparts[ $aindex ] ); |
2774 | 2774 | unset( $indices[ $aindex ] ); |
… |
… |
function make_site_theme_from_oldschool( $theme_name, $template ) { |
2874 | 2874 | // Check to make sure it's not a new index. |
2875 | 2875 | if ( $oldfile == 'index.php' ) { |
2876 | 2876 | $index = implode( '', file( "$oldpath/$oldfile" ) ); |
2877 | | if ( strpos( $index, 'WP_USE_THEMES' ) !== false ) { |
| 2877 | if ( false !== strpos( $index, 'WP_USE_THEMES' ) ) { |
2878 | 2878 | if ( ! @copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) { |
2879 | 2879 | return false; |
2880 | 2880 | } |
… |
… |
function make_site_theme_from_default( $theme_name, $template ) { |
2947 | 2947 | |
2948 | 2948 | $theme_dir = @ opendir( $default_dir ); |
2949 | 2949 | if ( $theme_dir ) { |
2950 | | while ( ( $theme_file = readdir( $theme_dir ) ) !== false ) { |
| 2950 | while ( false !== ( $theme_file = readdir( $theme_dir ) ) ) { |
2951 | 2951 | if ( is_dir( "$default_dir/$theme_file" ) ) { |
2952 | 2952 | continue; |
2953 | 2953 | } |
… |
… |
function make_site_theme_from_default( $theme_name, $template ) { |
2965 | 2965 | $f = fopen( "$site_dir/style.css", 'w' ); |
2966 | 2966 | |
2967 | 2967 | foreach ( $stylelines as $line ) { |
2968 | | if ( strpos( $line, 'Theme Name:' ) !== false ) { |
| 2968 | if ( false !== strpos( $line, 'Theme Name:' ) ) { |
2969 | 2969 | $line = 'Theme Name: ' . $theme_name; |
2970 | | } elseif ( strpos( $line, 'Theme URI:' ) !== false ) { |
| 2970 | } elseif ( false !== strpos( $line, 'Theme URI:' ) ) { |
2971 | 2971 | $line = 'Theme URI: ' . __get_option( 'url' ); |
2972 | | } elseif ( strpos( $line, 'Description:' ) !== false ) { |
| 2972 | } elseif ( false !== strpos( $line, 'Description:' ) ) { |
2973 | 2973 | $line = 'Description: Your theme.'; |
2974 | | } elseif ( strpos( $line, 'Version:' ) !== false ) { |
| 2974 | } elseif ( false !== strpos( $line, 'Version:' ) ) { |
2975 | 2975 | $line = 'Version: 1'; |
2976 | | } elseif ( strpos( $line, 'Author:' ) !== false ) { |
| 2976 | } elseif ( false !== strpos( $line, 'Author:' ) ) { |
2977 | 2977 | $line = 'Author: You'; |
2978 | 2978 | } |
2979 | 2979 | fwrite( $f, $line . "\n" ); |
… |
… |
function make_site_theme_from_default( $theme_name, $template ) { |
2989 | 2989 | |
2990 | 2990 | $images_dir = @ opendir( "$default_dir/images" ); |
2991 | 2991 | if ( $images_dir ) { |
2992 | | while ( ( $image = readdir( $images_dir ) ) !== false ) { |
| 2992 | while ( false !== ( $image = readdir( $images_dir ) ) ) { |
2993 | 2993 | if ( is_dir( "$default_dir/images/$image" ) ) { |
2994 | 2994 | continue; |
2995 | 2995 | } |
-
diff --git a/wp-admin/install.php b/wp-admin/install.php
index 019e907b35..ca97b3098b 100644
a
|
b
|
switch ( $step ) { |
373 | 373 | $error = true; |
374 | 374 | } |
375 | 375 | |
376 | | if ( $error === false ) { |
| 376 | if ( false === $error ) { |
377 | 377 | $wpdb->show_errors(); |
378 | 378 | $result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language ); |
379 | 379 | ?> |
-
diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js
index ed75ba3df1..8d47c55e57 100644
a
|
b
|
|
4609 | 4609 | y2: yInit + y1 |
4610 | 4610 | }; |
4611 | 4611 | |
4612 | | if ( flexHeight === false && flexWidth === false ) { |
| 4612 | if ( false === flexHeight && false === flexWidth ) { |
4613 | 4613 | imgSelectOptions.aspectRatio = xInit + ':' + yInit; |
4614 | 4614 | } |
4615 | 4615 | |
… |
… |
|
4932 | 4932 | y2: yInit |
4933 | 4933 | }; |
4934 | 4934 | |
4935 | | if (flexHeight === false && flexWidth === false) { |
| 4935 | if ( false === flexHeight && false === flexWidth ) { |
4936 | 4936 | imgSelectOptions.aspectRatio = xInit + ':' + yInit; |
4937 | 4937 | } |
4938 | | if (flexHeight === false ) { |
| 4938 | if ( false === flexHeight ) { |
4939 | 4939 | imgSelectOptions.maxHeight = yInit; |
4940 | 4940 | } |
4941 | | if (flexWidth === false ) { |
| 4941 | if ( false === flexWidth ) { |
4942 | 4942 | imgSelectOptions.maxWidth = xInit; |
4943 | 4943 | } |
4944 | 4944 | |
… |
… |
|
5115 | 5115 | } |
5116 | 5116 | |
5117 | 5117 | // Bail if the user scrolled on a touch device. |
5118 | | if ( control.touchDrag === true ) { |
| 5118 | if ( true === control.touchDrag ) { |
5119 | 5119 | return control.touchDrag = false; |
5120 | 5120 | } |
5121 | 5121 | |
-
diff --git a/wp-admin/js/theme.js b/wp-admin/js/theme.js
index e797544f42..e14ddde30d 100644
a
|
b
|
themes.view.Theme = wp.Backbone.View.extend({ |
428 | 428 | } |
429 | 429 | |
430 | 430 | // Bail if the user scrolled on a touch device |
431 | | if ( this.touchDrag === true ) { |
| 431 | if ( true === this.touchDrag ) { |
432 | 432 | return this.touchDrag = false; |
433 | 433 | } |
434 | 434 | |
… |
… |
themes.view.Theme = wp.Backbone.View.extend({ |
460 | 460 | event = event || window.event; |
461 | 461 | |
462 | 462 | // Bail if the user scrolled on a touch device |
463 | | if ( this.touchDrag === true ) { |
| 463 | if ( true === this.touchDrag ) { |
464 | 464 | return this.touchDrag = false; |
465 | 465 | } |
466 | 466 | |
-
diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php
index c86e907f45..559746a8b3 100644
a
|
b
|
function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { |
212 | 212 | // This allows plugin pages with the same hook to exist under different parents. |
213 | 213 | } elseif ( |
214 | 214 | ( ! isset( $plugin_page ) && $self == $sub_item[2] ) || |
215 | | ( isset( $plugin_page ) && $plugin_page == $sub_item[2] && ( $item[2] == $self_type || $item[2] == $self || file_exists( $menu_file ) === false ) ) |
| 215 | ( isset( $plugin_page ) && $plugin_page == $sub_item[2] && ( $item[2] == $self_type || $item[2] == $self || false === file_exists( $menu_file ) ) ) |
216 | 216 | ) { |
217 | 217 | $class[] = 'current'; |
218 | 218 | $aria_attributes .= ' aria-current="page"'; |
-
diff --git a/wp-admin/menu.php b/wp-admin/menu.php
index 0ad302ebda..9be2c8e107 100644
a
|
b
|
$builtin = array( 'post', 'page' ); |
103 | 103 | foreach ( array_merge( $builtin, $types ) as $ptype ) { |
104 | 104 | $ptype_obj = get_post_type_object( $ptype ); |
105 | 105 | // Check if it should be a submenu. |
106 | | if ( $ptype_obj->show_in_menu !== true ) { |
| 106 | if ( true !== $ptype_obj->show_in_menu ) { |
107 | 107 | continue; |
108 | 108 | } |
109 | 109 | $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first. |
-
diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php
index 488a541abc..1ace18d7f5 100644
a
|
b
|
if ( ! empty( $messages ) ) { |
137 | 137 | $class = 'all-options disabled'; |
138 | 138 | } |
139 | 139 | } |
140 | | if ( strpos( $option->option_value, "\n" ) !== false ) { |
| 140 | if ( false !== strpos( $option->option_value, "\n" ) ) { |
141 | 141 | ?> |
142 | 142 | <tr class="form-field"> |
143 | 143 | <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo ucwords( str_replace( '_', ' ', $option->option_name ) ); ?></label></th> |
-
diff --git a/wp-admin/options.php b/wp-admin/options.php
index 755c5f6b9e..07bdf3dbc3 100644
a
|
b
|
foreach ( (array) $options as $option ) : |
290 | 290 | <tr> |
291 | 291 | <th scope="row"><label for="<?php echo $name; ?>"><?php echo esc_html( $option->option_name ); ?></label></th> |
292 | 292 | <td> |
293 | | <?php if ( strpos( $value, "\n" ) !== false ) : ?> |
| 293 | <?php if ( false !== strpos( $value, "\n" ) ) : ?> |
294 | 294 | <textarea class="<?php echo $class; ?>" name="<?php echo $name; ?>" id="<?php echo $name; ?>" cols="30" rows="5"><?php echo esc_textarea( $value ); ?></textarea> |
295 | 295 | <?php else : ?> |
296 | 296 | <input class="regular-text <?php echo $class; ?>" type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $value ); ?>"<?php disabled( $disabled, true ); ?> /> |
-
diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php
index da7e08cada..5e241a3ffb 100644
a
|
b
|
if ( 'post' == $post_type ) { |
34 | 34 | } |
35 | 35 | } else { |
36 | 36 | $submenu_file = "post-new.php?post_type=$post_type"; |
37 | | if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) { |
| 37 | if ( isset( $post_type_object ) && $post_type_object->show_in_menu && true !== $post_type_object->show_in_menu ) { |
38 | 38 | $parent_file = $post_type_object->show_in_menu; |
39 | 39 | // What if there isn't a post-new.php item for this post type? |
40 | 40 | if ( ! isset( $_registered_pages[ get_plugin_page_hookname( "post-new.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) { |
… |
… |
$post = get_default_post_to_edit( $post_type, true ); |
72 | 72 | $post_ID = $post->ID; |
73 | 73 | |
74 | 74 | /** This filter is documented in wp-admin/post.php */ |
75 | | if ( apply_filters( 'replace_editor', false, $post ) !== true ) { |
| 75 | if ( true !== apply_filters( 'replace_editor', false, $post ) ) { |
76 | 76 | wp_enqueue_script( 'autosave' ); |
77 | 77 | include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); |
78 | 78 | } |
-
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 7fe38636af..8691b2beca 100644
a
|
b
|
if ( isset( $_POST['deletepost'] ) ) { |
48 | 48 | |
49 | 49 | $sendback = wp_get_referer(); |
50 | 50 | if ( ! $sendback || |
51 | | strpos( $sendback, 'post.php' ) !== false || |
52 | | strpos( $sendback, 'post-new.php' ) !== false ) { |
| 51 | false !== strpos( $sendback, 'post.php' ) || |
| 52 | false !== strpos( $sendback, 'post-new.php' ) ) { |
53 | 53 | if ( 'attachment' == $post_type ) { |
54 | 54 | $sendback = admin_url( 'upload.php' ); |
55 | 55 | } else { |
… |
… |
switch ( $action ) { |
145 | 145 | $submenu_file = 'upload.php'; |
146 | 146 | $post_new_file = 'media-new.php'; |
147 | 147 | } else { |
148 | | if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) { |
| 148 | if ( isset( $post_type_object ) && $post_type_object->show_in_menu && true !== $post_type_object->show_in_menu ) { |
149 | 149 | $parent_file = $post_type_object->show_in_menu; |
150 | 150 | } else { |
151 | 151 | $parent_file = "edit.php?post_type=$post_type"; |
… |
… |
switch ( $action ) { |
162 | 162 | * @param boolean Whether to replace the editor. Default false. |
163 | 163 | * @param object $post Post object. |
164 | 164 | */ |
165 | | if ( apply_filters( 'replace_editor', false, $post ) === true ) { |
| 165 | if ( true === apply_filters( 'replace_editor', false, $post ) ) { |
166 | 166 | break; |
167 | 167 | } |
168 | 168 | |
-
diff --git a/wp-includes/ID3/getid3.lib.php b/wp-includes/ID3/getid3.lib.php
index 1931bb3724..0004817313 100644
a
|
b
|
class getid3_lib |
27 | 27 | $returnstring .= ' '; |
28 | 28 | } |
29 | 29 | } |
30 | | if (!empty($htmlencoding)) { |
31 | | if ($htmlencoding === true) { |
| 30 | if ( ! empty($htmlencoding) ) { |
| 31 | if ( true === $htmlencoding ) { |
32 | 32 | $htmlencoding = 'UTF-8'; // prior to getID3 v1.9.0 the function's 4th parameter was boolean |
33 | 33 | } |
34 | 34 | $returnstring = htmlentities($returnstring, ENT_QUOTES, $htmlencoding); |
-
diff --git a/wp-includes/ID3/module.audio-video.matroska.php b/wp-includes/ID3/module.audio-video.matroska.php
index 825a22e192..0b6e9df251 100644
a
|
b
|
class getid3_matroska extends getid3_handler |
1319 | 1319 | |
1320 | 1320 | // get raw data |
1321 | 1321 | $dont_parse = (in_array($element['id'], $this->unuseful_elements) || $element['id_name'] == dechex($element['id'])); |
1322 | | if (($get_data === true || (is_array($get_data) && !in_array($element['id'], $get_data))) && !$dont_parse) { |
| 1322 | if ((true === $get_data || (is_array($get_data) && !in_array($element['id'], $get_data))) && !$dont_parse) { |
1323 | 1323 | $element['data'] = $this->readEBMLelementData($element['length'], $element); |
1324 | 1324 | } |
1325 | 1325 | |
-
diff --git a/wp-includes/ID3/module.tag.apetag.php b/wp-includes/ID3/module.tag.apetag.php
index eb081b4967..2db56a3cdc 100644
a
|
b
|
class getid3_apetag extends getid3_handler |
270 | 270 | } |
271 | 271 | $thisfile_ape_items_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]); |
272 | 272 | |
273 | | if ($this->inline_attachments === false) { |
| 273 | if ( false === $this->inline_attachments ) { |
274 | 274 | // skip entirely |
275 | 275 | unset($thisfile_ape_items_current['data']); |
276 | 276 | break; |
277 | 277 | } |
278 | | if ($this->inline_attachments === true) { |
| 278 | if ( true === $this->inline_attachments ) { |
279 | 279 | // great |
280 | 280 | } elseif (is_int($this->inline_attachments)) { |
281 | 281 | if ($this->inline_attachments < $thisfile_ape_items_current['data_length']) { |
-
diff --git a/wp-includes/ID3/module.tag.id3v2.php b/wp-includes/ID3/module.tag.id3v2.php
index fc586e8e13..d04c060a92 100644
a
|
b
|
class getid3_id3v2 extends getid3_handler |
1446 | 1446 | unset($parsedFrame['data']); |
1447 | 1447 | break; |
1448 | 1448 | } |
1449 | | if ($this->getid3->option_save_attachments === true) { |
| 1449 | if ( true === $this->getid3->option_save_attachments ) { |
1450 | 1450 | // great |
1451 | 1451 | /* |
1452 | 1452 | } elseif (is_int($this->getid3->option_save_attachments)) { |
-
diff --git a/wp-includes/IXR/class-IXR-introspectionserver.php b/wp-includes/IXR/class-IXR-introspectionserver.php
index 5628d81caa..35a39fe6d5 100644
a
|
b
|
class IXR_IntrospectionServer extends IXR_Server |
102 | 102 | } |
103 | 103 | break; |
104 | 104 | case 'boolean': |
105 | | if ($arg !== false && $arg !== true) { |
| 105 | if ( false !== $arg && true !== $arg ) { |
106 | 106 | $ok = false; |
107 | 107 | } |
108 | 108 | break; |
-
diff --git a/wp-includes/IXR/class-IXR-value.php b/wp-includes/IXR/class-IXR-value.php
index 0fd878bcac..e718484035 100644
a
|
b
|
class IXR_Value { |
41 | 41 | |
42 | 42 | function calculateType() |
43 | 43 | { |
44 | | if ($this->data === true || $this->data === false) { |
| 44 | if ( true === $this->data || false === $this->data ) { |
45 | 45 | return 'boolean'; |
46 | 46 | } |
47 | 47 | if (is_integer($this->data)) { |
-
diff --git a/wp-includes/Requests/Cookie.php b/wp-includes/Requests/Cookie.php
index 00fbbc73be..03f5ada796 100644
a
|
b
|
class Requests_Cookie { |
149 | 149 | |
150 | 150 | // If the cookie is marked as host-only and we don't have an exact |
151 | 151 | // match, reject the cookie |
152 | | if ($this->flags['host-only'] === true) { |
| 152 | if ( true === $this->flags['host-only'] ) { |
153 | 153 | return false; |
154 | 154 | } |
155 | 155 | |
-
diff --git a/wp-includes/Requests/SSL.php b/wp-includes/Requests/SSL.php
index 2b0376853a..bd2c0ed9c2 100644
a
|
b
|
class Requests_SSL { |
54 | 54 | $altname = trim(substr($altname, 4)); |
55 | 55 | |
56 | 56 | // Check for a match |
57 | | if (self::match_domain($host, $altname) === true) { |
| 57 | if ( true === self::match_domain($host, $altname) ) { |
58 | 58 | return true; |
59 | 59 | } |
60 | 60 | } |
… |
… |
class Requests_SSL { |
64 | 64 | // alt names, as per RFC2818 |
65 | 65 | if (!$has_dns_alt && !empty($cert['subject']['CN'])) { |
66 | 66 | // Check for a match |
67 | | if (self::match_domain($host, $cert['subject']['CN']) === true) { |
| 67 | if ( true === self::match_domain( $host, $cert['subject']['CN'] ) ) { |
68 | 68 | return true; |
69 | 69 | } |
70 | 70 | } |
… |
… |
class Requests_SSL { |
126 | 126 | */ |
127 | 127 | public static function match_domain($host, $reference) { |
128 | 128 | // Check if the reference is blacklisted first |
129 | | if (self::verify_reference_name($reference) !== true) { |
| 129 | if ( true !== self::verify_reference_name($reference) ) { |
130 | 130 | return false; |
131 | 131 | } |
132 | 132 | |
-
diff --git a/wp-includes/class-requests.php b/wp-includes/class-requests.php
index bb266189c1..58d379c400 100644
a
|
b
|
class Requests { |
682 | 682 | |
683 | 683 | $options['hooks']->dispatch('requests.before_redirect_check', array(&$return, $req_headers, $req_data, $options)); |
684 | 684 | |
685 | | if ($return->is_redirect() && $options['follow_redirects'] === true) { |
| 685 | if ( $return->is_redirect() && true === $options['follow_redirects'] ) { |
686 | 686 | if (isset($return->headers['location']) && $options['redirected'] < $options['redirects']) { |
687 | 687 | if ($return->status_code === 303) { |
688 | 688 | $options['type'] = self::GET; |
-
diff --git a/wp-includes/class-simplepie.php b/wp-includes/class-simplepie.php
index 6110413767..c8a5767a70 100644
a
|
b
|
class SimplePie |
1314 | 1314 | } |
1315 | 1315 | |
1316 | 1316 | // Fetch the data via SimplePie_File into $this->raw_data |
1317 | | if (($fetched = $this->fetch_data($cache)) === true) |
| 1317 | if ( true === ( $fetched = $this->fetch_data( $cache ) ) ) |
1318 | 1318 | { |
1319 | 1319 | return true; |
1320 | 1320 | } |
-
diff --git a/wp-includes/class-wp-http-curl.php b/wp-includes/class-wp-http-curl.php
index 12508cf5e2..0abd007021 100644
a
|
b
|
class WP_Http_Curl { |
129 | 129 | |
130 | 130 | curl_setopt( $handle, CURLOPT_URL, $url ); |
131 | 131 | curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true ); |
132 | | curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false ); |
| 132 | curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( true === $ssl_verify ) ? 2 : false ); |
133 | 133 | curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify ); |
134 | 134 | |
135 | 135 | if ( $ssl_verify ) { |
-
diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php
index 948564abce..fefed92550 100644
a
|
b
|
class wp_xmlrpc_server extends IXR_Server { |
4179 | 4179 | continue; |
4180 | 4180 | } |
4181 | 4181 | |
4182 | | if ( $this->blog_options[ $o_name ]['readonly'] == true ) { |
| 4182 | if ( true == $this->blog_options[ $o_name ]['readonly'] ) { |
4183 | 4183 | continue; |
4184 | 4184 | } |
4185 | 4185 | |
-
diff --git a/wp-includes/customize/class-wp-customize-nav-menu-setting.php b/wp-includes/customize/class-wp-customize-nav-menu-setting.php
index 6744f92bef..b081be3217 100644
a
|
b
|
class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting { |
283 | 283 | ) |
284 | 284 | ); |
285 | 285 | } |
286 | | // @todo add support for $args['hide_empty'] === true |
| 286 | // @todo add support for true === $args['hide_empty'] |
287 | 287 | |
288 | 288 | return $menus; |
289 | 289 | } |
-
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index 5bda6e82a9..d1be8d0ceb 100644
a
|
b
|
function _make_web_ftp_clickable_cb( $matches ) { |
2814 | 2814 | $dest = 'http://' . $dest; |
2815 | 2815 | |
2816 | 2816 | // removed trailing [.,;:)] from URL |
2817 | | if ( in_array( substr( $dest, -1 ), array( '.', ',', ';', ':', ')' ) ) === true ) { |
| 2817 | if ( true === in_array( substr( $dest, -1 ), array( '.', ',', ';', ':', ')' ) ) ) { |
2818 | 2818 | $ret = substr( $dest, -1 ); |
2819 | 2819 | $dest = substr( $dest, 0, strlen( $dest ) - 1 ); |
2820 | 2820 | } |
-
diff --git a/wp-includes/js/codemirror/csslint.js b/wp-includes/js/codemirror/csslint.js
index 4b84fc34d2..c3f7366afc 100644
a
|
b
|
Matcher.many = function(required) { |
504 | 504 | return acc; |
505 | 505 | }, []); |
506 | 506 | |
507 | | if (required === true) { |
| 507 | if ( true === required ) { |
508 | 508 | required = ms.map(function() { |
509 | 509 | return true; |
510 | 510 | }); |
… |
… |
CSSLint.addRule({ |
9265 | 9265 | |
9266 | 9266 | // warn that important is used and increment the declaration counter |
9267 | 9267 | parser.addListener("property", function(event) { |
9268 | | if (event.important === true) { |
| 9268 | if ( true === event.important ) { |
9269 | 9269 | count++; |
9270 | 9270 | reporter.report("Use of !important", event.line, event.col, rule); |
9271 | 9271 | } |
-
diff --git a/wp-includes/js/customize-models.js b/wp-includes/js/customize-models.js
index e2a5dfbcd3..da297c6340 100644
a
|
b
|
|
97 | 97 | }, |
98 | 98 | |
99 | 99 | shouldBeCropped: function() { |
100 | | if (this.get('themeFlexWidth') === true && |
101 | | this.get('themeFlexHeight') === true) { |
| 100 | if ( true === this.get('themeFlexWidth') && |
| 101 | true === this.get('themeFlexHeight') ) { |
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | |
105 | | if (this.get('themeFlexWidth') === true && |
| 105 | if ( true === this.get('themeFlexWidth') && |
106 | 106 | this.get('themeHeight') === this.get('imageHeight')) { |
107 | 107 | return false; |
108 | 108 | } |
109 | 109 | |
110 | | if (this.get('themeFlexHeight') === true && |
| 110 | if ( true === this.get('themeFlexHeight') && |
111 | 111 | this.get('themeWidth') === this.get('imageWidth')) { |
112 | 112 | return false; |
113 | 113 | } |
-
diff --git a/wp-includes/js/jquery/jquery-migrate.js b/wp-includes/js/jquery/jquery-migrate.js
index 89437ebed9..f83af7f72e 100644
a
|
b
|
jQuery.attr = function( elem, name, value, pass ) { |
128 | 128 | // Fall back to attribute presence where some booleans are not supported |
129 | 129 | var attrNode, |
130 | 130 | property = jQuery.prop( elem, name ); |
131 | | return property === true || typeof property !== "boolean" && |
132 | | ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? |
| 131 | return true === property || typeof property !== "boolean" && |
| 132 | ( attrNode = elem.getAttributeNode(name) ) && false !== attrNode.nodeValue ? |
133 | 133 | |
134 | 134 | name.toLowerCase() : |
135 | 135 | undefined; |
-
diff --git a/wp-includes/js/jquery/jquery.form.js b/wp-includes/js/jquery/jquery.form.js
index bd9e2a5a5f..51470939e3 100644
a
|
b
|
|
1367 | 1367 | // indicating a special test; for example: |
1368 | 1368 | // $('#myForm').clearForm('.special:hidden') |
1369 | 1369 | // the above would clean hidden inputs that have the class of 'special' |
1370 | | if ((includeHidden === true && /hidden/.test(t)) || |
1371 | | (typeof includeHidden === 'string' && $(this).is(includeHidden))) { |
| 1370 | if ( ( true === includeHidden && /hidden/.test(t) ) || |
| 1371 | ( typeof includeHidden === 'string' && $(this).is(includeHidden) ) ) { |
1372 | 1372 | this.value = ''; |
1373 | 1373 | } |
1374 | 1374 | } |
-
diff --git a/wp-includes/js/mce-view.js b/wp-includes/js/mce-view.js
index 8865279239..575b68d7f0 100644
a
|
b
|
|
396 | 396 | return true; |
397 | 397 | } |
398 | 398 | |
399 | | data = $( this ).data( 'rendered' ) === true; |
| 399 | data = true === $( this ).data( 'rendered' ); |
400 | 400 | |
401 | 401 | return rendered ? data : ! data; |
402 | 402 | } ) |
-
diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js
index d79f190dd6..b176edff55 100644
a
|
b
|
Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{ |
5321 | 5321 | // Prevent insertion of attachments if any of them are still uploading |
5322 | 5322 | if ( selection && selection.models ) { |
5323 | 5323 | disabled = _.some( selection.models, function( attachment ) { |
5324 | | return attachment.get('uploading') === true; |
| 5324 | return true === attachment.get( 'uploading' ); |
5325 | 5325 | }); |
5326 | 5326 | } |
5327 | 5327 | |
-
diff --git a/wp-includes/js/mediaelement/mediaelement-and-player.js b/wp-includes/js/mediaelement/mediaelement-and-player.js
index be8e58e966..c697870b77 100644
a
|
b
|
var MediaElementPlayer = function () { |
3875 | 3875 | |
3876 | 3876 | doAnimation = doAnimation === undefined || doAnimation; |
3877 | 3877 | |
3878 | | if (forceHide !== true && (!t.controlsAreVisible || t.options.alwaysShowControls || t.paused && t.readyState === 4 && (!t.options.hideVideoControlsOnLoad && t.currentTime <= 0 || !t.options.hideVideoControlsOnPause && t.currentTime > 0) || t.isVideo && !t.options.hideVideoControlsOnLoad && !t.readyState || t.ended)) { |
| 3878 | if ( true !== forceHide && (!t.controlsAreVisible || t.options.alwaysShowControls || t.paused && t.readyState === 4 && (!t.options.hideVideoControlsOnLoad && t.currentTime <= 0 || !t.options.hideVideoControlsOnPause && t.currentTime > 0) || t.isVideo && !t.options.hideVideoControlsOnLoad && !t.readyState || t.ended) ) { |
3879 | 3879 | return; |
3880 | 3880 | } |
3881 | 3881 | |
… |
… |
var MediaElementPlayer = function () { |
4351 | 4351 | break; |
4352 | 4352 | |
4353 | 4353 | default: |
4354 | | if (t.hasFluidMode() === true) { |
| 4354 | if ( true === t.hasFluidMode() ) { |
4355 | 4355 | t.setResponsiveMode(); |
4356 | 4356 | } else { |
4357 | 4357 | t.setDimensions(t.width, t.height); |
… |
… |
var FlashMediaElementRenderer = { |
6009 | 6009 | flashVars.push('src=' + mediaElement.originalNode.getAttribute('src')); |
6010 | 6010 | } |
6011 | 6011 | |
6012 | | if (flash.options.enablePseudoStreaming === true) { |
| 6012 | if ( true === flash.options.enablePseudoStreaming ) { |
6013 | 6013 | flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam); |
6014 | 6014 | flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType); |
6015 | 6015 | } |
-
diff --git a/wp-includes/js/mediaelement/mediaelement.js b/wp-includes/js/mediaelement/mediaelement.js
index f616cd903e..3ae0b11e15 100644
a
|
b
|
var FlashMediaElementRenderer = { |
1727 | 1727 | flashVars.push('src=' + mediaElement.originalNode.getAttribute('src')); |
1728 | 1728 | } |
1729 | 1729 | |
1730 | | if (flash.options.enablePseudoStreaming === true) { |
| 1730 | if ( true === flash.options.enablePseudoStreaming ) { |
1731 | 1731 | flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam); |
1732 | 1732 | flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType); |
1733 | 1733 | } |
-
diff --git a/wp-includes/js/plupload/plupload.js b/wp-includes/js/plupload/plupload.js
index d562c93494..3419a65c07 100644
a
|
b
|
function normalizeCaps(settings) { |
68 | 68 | plupload.each(features, function(value, feature) { |
69 | 69 | resolve(feature, value); |
70 | 70 | }); |
71 | | } else if (features === true) { |
| 71 | } else if ( true === features ) { |
72 | 72 | // check settings for required features |
73 | 73 | if (settings.chunk_size > 0) { |
74 | 74 | caps.slice_blob = true; |
-
diff --git a/wp-includes/js/tinymce/plugins/image/plugin.js b/wp-includes/js/tinymce/plugins/image/plugin.js
index 9fe18bb996..bb6eb73a4f 100644
a
|
b
|
var image = (function () { |
8 | 8 | return editor.settings.image_dimensions === false ? false : true; |
9 | 9 | }; |
10 | 10 | var hasAdvTab = function (editor) { |
11 | | return editor.settings.image_advtab === true ? true : false; |
| 11 | return true === editor.settings.image_advtab ? true : false; |
12 | 12 | }; |
13 | 13 | var getPrependUrl = function (editor) { |
14 | 14 | return editor.getParam('image_prepend_url', ''); |
… |
… |
var image = (function () { |
20 | 20 | return editor.settings.image_description === false ? false : true; |
21 | 21 | }; |
22 | 22 | var hasImageTitle = function (editor) { |
23 | | return editor.settings.image_title === true ? true : false; |
| 23 | return true === editor.settings.image_title ? true : false; |
24 | 24 | }; |
25 | 25 | var hasImageCaption = function (editor) { |
26 | | return editor.settings.image_caption === true ? true : false; |
| 26 | return true === editor.settings.image_caption ? true : false; |
27 | 27 | }; |
28 | 28 | var getImageList = function (editor) { |
29 | 29 | return editor.getParam('image_list', false); |
-
diff --git a/wp-includes/js/tinymce/plugins/link/plugin.js b/wp-includes/js/tinymce/plugins/link/plugin.js
index c0d964c7fa..4020757481 100644
a
|
b
|
var link = (function () { |
504 | 504 | }); |
505 | 505 | return; |
506 | 506 | } |
507 | | if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) { |
| 507 | if ( true === assumeExternalTargets && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) { |
508 | 508 | delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) { |
509 | 509 | if (state) { |
510 | 510 | resultData.href = 'http://' + href; |
… |
… |
var link = (function () { |
537 | 537 | return contextmenu ? contextmenu.isContextMenuVisible() : false; |
538 | 538 | }; |
539 | 539 | var hasOnlyAltModifier = function (e) { |
540 | | return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false; |
| 540 | return true === e.altKey && false === e.shiftKey && false === e.ctrlKey && false === e.metaKey; |
541 | 541 | }; |
542 | 542 | var gotoLink = function (editor, a) { |
543 | 543 | if (a) { |
-
diff --git a/wp-includes/js/tinymce/plugins/paste/plugin.js b/wp-includes/js/tinymce/plugins/paste/plugin.js
index 5ef978b99d..6167d89b1b 100644
a
|
b
|
var paste = (function () { |
728 | 728 | insertImage, |
729 | 729 | pasteHtml |
730 | 730 | ], function (action) { |
731 | | return action(editor, html, pasteHtml) !== true; |
| 731 | return true !== action(editor, html, pasteHtml); |
732 | 732 | }); |
733 | 733 | }; |
734 | 734 | var insertContent = function (editor, html) { |
… |
… |
var paste = (function () { |
981 | 981 | var src; |
982 | 982 | editor.parser.addNodeFilter('img', function (nodes, name, args) { |
983 | 983 | var isPasteInsert = function (args) { |
984 | | return args.data && args.data.paste === true; |
| 984 | return args.data && true === args.data.paste; |
985 | 985 | }; |
986 | 986 | var remove = function (node) { |
987 | 987 | if (!node.attr('data-mce-object') && src !== global$1.transparentSrc) { |
… |
… |
var paste = (function () { |
1191 | 1191 | var noop = function () { |
1192 | 1192 | }; |
1193 | 1193 | var hasWorkingClipboardApi = function (clipboardData) { |
1194 | | return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && $_cedk7ri6jfuw8pud.isMsEdge() !== true; |
| 1194 | return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && true !== $_cedk7ri6jfuw8pud.isMsEdge(); |
1195 | 1195 | }; |
1196 | 1196 | var setHtml5Clipboard = function (clipboardData, html, text) { |
1197 | 1197 | if (hasWorkingClipboardApi(clipboardData)) { |
-
diff --git a/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/wp-includes/js/tinymce/plugins/wordpress/plugin.js
index 2f9283281f..821e670e28 100644
a
|
b
|
tinymce.PluginManager.add( 'wordpress', function( editor ) { |
661 | 661 | |
662 | 662 | editor.on( 'PastePlainTextToggle', function( event ) { |
663 | 663 | // Warn twice, then stop. |
664 | | if ( event.state === true ) { |
| 664 | if ( true === event.state ) { |
665 | 665 | var times = parseInt( window.getUserSetting( 'editor_plain_text_paste_warning' ), 10 ) || 0; |
666 | 666 | |
667 | 667 | if ( times < 2 ) { |
-
diff --git a/wp-includes/js/tinymce/themes/inlite/theme.js b/wp-includes/js/tinymce/themes/inlite/theme.js
index a3ad8b5075..5fa6da8164 100644
a
|
b
|
var inlite = (function () { |
945 | 945 | var forall = function (xs, pred) { |
946 | 946 | for (var i = 0, len = xs.length; i < len; ++i) { |
947 | 947 | var x = xs[i]; |
948 | | if (pred(x, i, xs) !== true) { |
| 948 | if ( true !== pred(x, i, xs) ) { |
949 | 949 | return false; |
950 | 950 | } |
951 | 951 | } |
… |
… |
var inlite = (function () { |
4859 | 4859 | var askAboutPrefix = function (editor, href) { |
4860 | 4860 | return new global$13(function (resolve) { |
4861 | 4861 | editor.windowManager.confirm('The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (result) { |
4862 | | var output = result === true ? 'http://' + href : href; |
| 4862 | var output = true === result ? 'http://' + href : href; |
4863 | 4863 | resolve(output); |
4864 | 4864 | }); |
4865 | 4865 | }); |
… |
… |
var inlite = (function () { |
6912 | 6912 | }; |
6913 | 6913 | |
6914 | 6914 | function DeviceType (os, browser, userAgent) { |
6915 | | var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true; |
| 6915 | var isiPad = os.isiOS() && true === /ipad/i.test(userAgent); |
6916 | 6916 | var isiPhone = os.isiOS() && !isiPad; |
6917 | 6917 | var isAndroid3 = os.isAndroid() && os.version.major === 3; |
6918 | 6918 | var isAndroid4 = os.isAndroid() && os.version.major === 4; |
6919 | | var isTablet = isiPad || isAndroid3 || isAndroid4 && /mobile/i.test(userAgent) === true; |
| 6919 | var isTablet = isiPad || isAndroid3 || isAndroid4 && true === /mobile/i.test(userAgent); |
6920 | 6920 | var isTouch = os.isiOS() || os.isAndroid(); |
6921 | 6921 | var isPhone = isTouch && !isTablet; |
6922 | | var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false; |
| 6922 | var iOSwebview = browser.isSafari() && os.isiOS() && false === /safari/i.test(userAgent); |
6923 | 6923 | return { |
6924 | 6924 | isiPad: $_d9fl1s17gjfuw8wew.constant(isiPad), |
6925 | 6925 | isiPhone: $_d9fl1s17gjfuw8wew.constant(isiPhone), |
… |
… |
var inlite = (function () { |
7288 | 7288 | var rawParent = dom.parentNode; |
7289 | 7289 | var parent = $_fmubbj19ijfuw8wmy.fromDom(rawParent); |
7290 | 7290 | ret.push(parent); |
7291 | | if (stop(parent) === true) |
| 7291 | if ( true === stop(parent) ) |
7292 | 7292 | break; |
7293 | 7293 | else |
7294 | 7294 | dom = rawParent; |
-
diff --git a/wp-includes/js/tinymce/themes/modern/theme.js b/wp-includes/js/tinymce/themes/modern/theme.js
index a46ef6b2ff..75822803ad 100644
a
|
b
|
var modern = (function () { |
918 | 918 | var forall = function (xs, pred) { |
919 | 919 | for (var i = 0, len = xs.length; i < len; ++i) { |
920 | 920 | var x = xs[i]; |
921 | | if (pred(x, i, xs) !== true) { |
| 921 | if ( true !== pred(x, i, xs) ) { |
922 | 922 | return false; |
923 | 923 | } |
924 | 924 | } |
… |
… |
var modern = (function () { |
6754 | 6754 | }; |
6755 | 6755 | |
6756 | 6756 | function DeviceType (os, browser, userAgent) { |
6757 | | var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true; |
| 6757 | var isiPad = os.isiOS() && true === /ipad/i.test(userAgent); |
6758 | 6758 | var isiPhone = os.isiOS() && !isiPad; |
6759 | 6759 | var isAndroid3 = os.isAndroid() && os.version.major === 3; |
6760 | 6760 | var isAndroid4 = os.isAndroid() && os.version.major === 4; |
6761 | | var isTablet = isiPad || isAndroid3 || isAndroid4 && /mobile/i.test(userAgent) === true; |
| 6761 | var isTablet = isiPad || isAndroid3 || isAndroid4 && true === /mobile/i.test(userAgent); |
6762 | 6762 | var isTouch = os.isiOS() || os.isAndroid(); |
6763 | 6763 | var isPhone = isTouch && !isTablet; |
6764 | | var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false; |
| 6764 | var iOSwebview = browser.isSafari() && os.isiOS() && false === /safari/i.test(userAgent); |
6765 | 6765 | return { |
6766 | 6766 | isiPad: $_cun2p5t7jfuw8scg.constant(isiPad), |
6767 | 6767 | isiPhone: $_cun2p5t7jfuw8scg.constant(isiPhone), |
… |
… |
var modern = (function () { |
7130 | 7130 | var rawParent = dom.parentNode; |
7131 | 7131 | var parent = $_5ny1kxuzjfuw8sjh.fromDom(rawParent); |
7132 | 7132 | ret.push(parent); |
7133 | | if (stop(parent) === true) |
| 7133 | if ( true === stop(parent) ) |
7134 | 7134 | break; |
7135 | 7135 | else |
7136 | 7136 | dom = rawParent; |
-
diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php
index 9282833ac4..c8eefa309d 100644
a
|
b
|
function get_blog_details( $fields = null, $get_all = true ) { |
178 | 178 | |
179 | 179 | $blog_id = (int) $blog_id; |
180 | 180 | |
181 | | $all = $get_all == true ? '' : 'short'; |
| 181 | $all = true == $get_all ? '' : 'short'; |
182 | 182 | $details = wp_cache_get( $blog_id . $all, 'blog-details' ); |
183 | 183 | |
184 | 184 | if ( $details ) { |
-
diff --git a/wp-includes/post.php b/wp-includes/post.php
index 98ad57fbd0..3e76916b3a 100644
a
|
b
|
function _add_post_type_submenus() { |
1637 | 1637 | foreach ( get_post_types( array( 'show_ui' => true ) ) as $ptype ) { |
1638 | 1638 | $ptype_obj = get_post_type_object( $ptype ); |
1639 | 1639 | // Sub-menus only. |
1640 | | if ( ! $ptype_obj->show_in_menu || $ptype_obj->show_in_menu === true ) { |
| 1640 | if ( ! $ptype_obj->show_in_menu || true === $ptype_obj->show_in_menu ) { |
1641 | 1641 | continue; |
1642 | 1642 | } |
1643 | 1643 | add_submenu_page( $ptype_obj->show_in_menu, $ptype_obj->labels->name, $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype" ); |
-
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index dc6ce99322..90c5dfefae 100644
a
|
b
|
function is_active_sidebar( $index ) { |
930 | 930 | * @return array Upgraded list of widgets to version 3 array format when called from the admin. |
931 | 931 | */ |
932 | 932 | function wp_get_sidebars_widgets( $deprecated = true ) { |
933 | | if ( $deprecated !== true ) { |
| 933 | if ( true !== $deprecated ) { |
934 | 934 | _deprecated_argument( __FUNCTION__, '2.8.1' ); |
935 | 935 | } |
936 | 936 | |