Changeset 47808 for trunk/src/wp-admin/includes/plugin.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin.php
r47574 r47808 92 92 $plugin_data['Network'] = $plugin_data['_sitewide']; 93 93 } 94 $plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) );94 $plugin_data['Network'] = ( 'true' === strtolower( $plugin_data['Network'] ) ); 95 95 unset( $plugin_data['_sitewide'] ); 96 96 … … 157 157 } 158 158 } 159 } elseif ( 'hello.php' == basename( $plugin_file ) ) {159 } elseif ( 'hello.php' === basename( $plugin_file ) ) { 160 160 $textdomain = 'default'; 161 161 } … … 296 296 $plugins_dir = @ opendir( $plugin_root ); 297 297 $plugin_files = array(); 298 298 299 if ( $plugins_dir ) { 299 300 while ( ( $file = readdir( $plugins_dir ) ) !== false ) { 300 if ( substr( $file, 0, 1 ) == '.') {301 if ( '.' === substr( $file, 0, 1 ) ) { 301 302 continue; 302 303 } 304 303 305 if ( is_dir( $plugin_root . '/' . $file ) ) { 304 306 $plugins_subdir = @ opendir( $plugin_root . '/' . $file ); 307 305 308 if ( $plugins_subdir ) { 306 309 while ( ( $subfile = readdir( $plugins_subdir ) ) !== false ) { 307 if ( substr( $subfile, 0, 1 ) == '.') {310 if ( '.' === substr( $subfile, 0, 1 ) ) { 308 311 continue; 309 312 } 310 if ( substr( $subfile, -4 ) == '.php' ) { 313 314 if ( '.php' === substr( $subfile, -4 ) ) { 311 315 $plugin_files[] = "$file/$subfile"; 312 316 } 313 317 } 318 314 319 closedir( $plugins_subdir ); 315 320 } 316 321 } else { 317 if ( substr( $file, -4 ) == '.php') {322 if ( '.php' === substr( $file, -4 ) ) { 318 323 $plugin_files[] = $file; 319 324 } 320 325 } 321 326 } 327 322 328 closedir( $plugins_dir ); 323 329 } … … 370 376 if ( $plugins_dir ) { 371 377 while ( ( $file = readdir( $plugins_dir ) ) !== false ) { 372 if ( substr( $file, -4 ) == '.php') {378 if ( '.php' === substr( $file, -4 ) ) { 373 379 $plugin_files[] = $file; 374 380 } … … 1445 1451 * See wp-admin/admin.php for redirect from edit.php to tools.php. 1446 1452 */ 1447 if ( 'tools.php' == $parent_slug ) {1453 if ( 'tools.php' === $parent_slug ) { 1448 1454 $_registered_pages[ get_plugin_page_hookname( $menu_slug, 'edit.php' ) ] = true; 1449 1455 } … … 1837 1843 $plugin_page, $_wp_real_parent_file, $_wp_menu_nopriv, $_wp_submenu_nopriv; 1838 1844 1839 if ( ! empty( $parent ) && 'admin.php' != $parent ) {1845 if ( ! empty( $parent ) && 'admin.php' !== $parent ) { 1840 1846 if ( isset( $_wp_real_parent_file[ $parent ] ) ) { 1841 1847 $parent = $_wp_real_parent_file[ $parent ]; … … 2019 2025 2020 2026 $page_type = 'admin'; 2021 if ( empty( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[ $plugin_page ] ) ) {2027 if ( empty( $parent_page ) || 'admin.php' === $parent_page || isset( $admin_page_hooks[ $plugin_page ] ) ) { 2022 2028 if ( isset( $admin_page_hooks[ $plugin_page ] ) ) { 2023 2029 $page_type = 'toplevel'; … … 2166 2172 */ 2167 2173 function add_option_whitelist( $new_options, $options = '' ) { 2168 if ( '' == $options ) {2174 if ( '' === $options ) { 2169 2175 global $whitelist_options; 2170 2176 } else { … … 2201 2207 */ 2202 2208 function remove_option_whitelist( $del_options, $options = '' ) { 2203 if ( '' == $options ) {2209 if ( '' === $options ) { 2204 2210 global $whitelist_options; 2205 2211 } else {
Note: See TracChangeset
for help on using the changeset viewer.