Changeset 61470
- Timestamp:
- 01/11/2026 06:48:15 AM (2 months ago)
- Location:
- trunk/src
- Files:
-
- 17 edited
-
wp-admin/includes/class-wp-list-table.php (modified) (1 diff)
-
wp-admin/includes/class-wp-screen.php (modified) (1 diff)
-
wp-admin/includes/file.php (modified) (2 diffs)
-
wp-admin/includes/plugin.php (modified) (3 diffs)
-
wp-includes/class-wp-block-styles-registry.php (modified) (1 diff)
-
wp-includes/class-wp-comment.php (modified) (1 diff)
-
wp-includes/class-wp-dependencies.php (modified) (1 diff)
-
wp-includes/class-wp-plugin-dependencies.php (modified) (2 diffs)
-
wp-includes/class-wp-query.php (modified) (2 diffs)
-
wp-includes/class-wp-user-meta-session-tokens.php (modified) (1 diff)
-
wp-includes/class-wp-user-query.php (modified) (1 diff)
-
wp-includes/global-styles-and-settings.php (modified) (1 diff)
-
wp-includes/http.php (modified) (1 diff)
-
wp-includes/nav-menu.php (modified) (1 diff)
-
wp-includes/option.php (modified) (1 diff)
-
wp-includes/post.php (modified) (1 diff)
-
wp-includes/theme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r61456 r61470 345 345 return $this->get_pagenum(); 346 346 } 347 348 if ( isset( $this->_pagination_args[ $key ] ) ) { 349 return $this->_pagination_args[ $key ]; 350 } 351 352 return 0; 347 return $this->_pagination_args[ $key ] ?? 0; 353 348 } 354 349 -
trunk/src/wp-admin/includes/class-wp-screen.php
r61456 r61470 555 555 } 556 556 if ( $key ) { 557 if ( isset( $this->_options[ $option ][ $key ] ) ) { 558 return $this->_options[ $option ][ $key ]; 559 } 560 return null; 557 return $this->_options[ $option ][ $key ] ?? null; 561 558 } 562 559 return $this->_options[ $option ]; -
trunk/src/wp-admin/includes/file.php
r61456 r61470 1098 1098 * or this: 1099 1099 */ 1100 $action = 'wp_handle_upload'; 1101 if ( isset( $overrides['action'] ) ) { 1102 $action = $overrides['action']; 1103 } 1104 1100 $action = $overrides['action'] ?? 'wp_handle_upload'; 1105 1101 return _wp_handle_upload( $file, $overrides, $time, $action ); 1106 1102 } … … 1129 1125 * or this: 1130 1126 */ 1131 $action = 'wp_handle_sideload'; 1132 if ( isset( $overrides['action'] ) ) { 1133 $action = $overrides['action']; 1134 } 1135 1127 $action = $overrides['action'] ?? 'wp_handle_sideload'; 1136 1128 return _wp_handle_upload( $file, $overrides, $time, $action ); 1137 1129 } -
trunk/src/wp-admin/includes/plugin.php
r61270 r61470 1972 1972 1973 1973 if ( ! empty( $parent_page ) && 'admin.php' !== $parent_page ) { 1974 if ( isset( $_wp_real_parent_file[ $parent_page ] ) ) { 1975 $parent_page = $_wp_real_parent_file[ $parent_page ]; 1976 } 1977 1978 return $parent_page; 1974 return $_wp_real_parent_file[ $parent_page ] ?? $parent_page; 1979 1975 } 1980 1976 … … 1983 1979 if ( $parent_menu[2] === $plugin_page ) { 1984 1980 $parent_file = $plugin_page; 1985 1986 if ( isset( $_wp_real_parent_file[ $parent_file ] ) ) { 1987 $parent_file = $_wp_real_parent_file[ $parent_file ]; 1988 } 1989 1990 return $parent_file; 1981 return $_wp_real_parent_file[ $parent_file ] ?? $parent_file; 1991 1982 } 1992 1983 } 1993 1984 if ( isset( $_wp_menu_nopriv[ $plugin_page ] ) ) { 1994 1985 $parent_file = $plugin_page; 1995 1996 if ( isset( $_wp_real_parent_file[ $parent_file ] ) ) { 1997 $parent_file = $_wp_real_parent_file[ $parent_file ]; 1998 } 1999 2000 return $parent_file; 1986 return $_wp_real_parent_file[ $parent_file ] ?? $parent_file; 2001 1987 } 2002 1988 } … … 2004 1990 if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[ $pagenow ][ $plugin_page ] ) ) { 2005 1991 $parent_file = $pagenow; 2006 2007 if ( isset( $_wp_real_parent_file[ $parent_file ] ) ) { 2008 $parent_file = $_wp_real_parent_file[ $parent_file ]; 2009 } 2010 2011 return $parent_file; 1992 return $_wp_real_parent_file[ $parent_file ] ?? $parent_file; 2012 1993 } 2013 1994 -
trunk/src/wp-includes/class-wp-block-styles-registry.php
r60904 r61470 171 171 */ 172 172 public function get_registered_styles_for_block( $block_name ) { 173 if ( isset( $this->registered_block_styles[ $block_name ] ) ) { 174 return $this->registered_block_styles[ $block_name ]; 175 } 176 return array(); 173 return $this->registered_block_styles[ $block_name ] ?? array(); 177 174 } 178 175 -
trunk/src/wp-includes/class-wp-comment.php
r59805 r61470 324 324 */ 325 325 public function get_child( $child_id ) { 326 if ( isset( $this->children[ $child_id ] ) ) { 327 return $this->children[ $child_id ]; 328 } 329 330 return false; 326 return $this->children[ $child_id ] ?? false; 331 327 } 332 328 -
trunk/src/wp-includes/class-wp-dependencies.php
r61358 r61470 478 478 case 'registered': 479 479 case 'scripts': // Back compat. 480 if ( isset( $this->registered[ $handle ] ) ) { 481 return $this->registered[ $handle ]; 482 } 483 return false; 480 return $this->registered[ $handle ] ?? false; 484 481 485 482 case 'enqueued': -
trunk/src/wp-includes/class-wp-plugin-dependencies.php
r61006 r61470 201 201 */ 202 202 public static function get_dependencies( $plugin_file ) { 203 if ( isset( self::$dependencies[ $plugin_file ] ) ) { 204 return self::$dependencies[ $plugin_file ]; 205 } 206 207 return array(); 203 return self::$dependencies[ $plugin_file ] ?? array(); 208 204 } 209 205 … … 355 351 public static function get_dependency_data( $slug ) { 356 352 $dependency_api_data = self::get_dependency_api_data(); 357 358 if ( isset( $dependency_api_data[ $slug ] ) ) { 359 return $dependency_api_data[ $slug ]; 360 } 361 362 return false; 353 return $dependency_api_data[ $slug ] ?? false; 363 354 } 364 355 -
trunk/src/wp-includes/class-wp-query.php
r61449 r61470 1861 1861 */ 1862 1862 public function get( $query_var, $default_value = '' ) { 1863 if ( isset( $this->query_vars[ $query_var ] ) ) { 1864 return $this->query_vars[ $query_var ]; 1865 } 1866 1867 return $default_value; 1863 return $this->query_vars[ $query_var ] ?? $default_value; 1868 1864 } 1869 1865 … … 4067 4063 public function get_queried_object_id() { 4068 4064 $this->get_queried_object(); 4069 4070 if ( isset( $this->queried_object_id ) ) { 4071 return $this->queried_object_id; 4072 } 4073 4074 return 0; 4065 return $this->queried_object_id ?? 0; 4075 4066 } 4076 4067 -
trunk/src/wp-includes/class-wp-user-meta-session-tokens.php
r60416 r61470 61 61 protected function get_session( $verifier ) { 62 62 $sessions = $this->get_sessions(); 63 64 if ( isset( $sessions[ $verifier ] ) ) { 65 return $sessions[ $verifier ]; 66 } 67 68 return null; 63 return $sessions[ $verifier ] ?? null; 69 64 } 70 65 -
trunk/src/wp-includes/class-wp-user-query.php
r61387 r61470 911 911 */ 912 912 public function get( $query_var ) { 913 if ( isset( $this->query_vars[ $query_var ] ) ) { 914 return $this->query_vars[ $query_var ]; 915 } 916 917 return null; 913 return $this->query_vars[ $query_var ] ?? null; 918 914 } 919 915 -
trunk/src/wp-includes/global-styles-and-settings.php
r61442 r61470 385 385 ) 386 386 ); 387 if ( isset( $result[0] ) ) { 388 return $result[0]; 389 } 390 return ''; 387 return $result[0] ?? ''; 391 388 } 392 389 -
trunk/src/wp-includes/http.php
r60652 r61470 267 267 } 268 268 269 if ( isset( $response['headers'][ $header ] ) ) { 270 return $response['headers'][ $header ]; 271 } 272 273 return ''; 269 return $response['headers'][ $header ] ?? ''; 274 270 } 275 271 -
trunk/src/wp-includes/nav-menu.php
r61465 r61470 149 149 function get_registered_nav_menus() { 150 150 global $_wp_registered_nav_menus; 151 if ( isset( $_wp_registered_nav_menus ) ) { 152 return $_wp_registered_nav_menus; 153 } 154 return array(); 151 return $_wp_registered_nav_menus ?? array(); 155 152 } 156 153 -
trunk/src/wp-includes/option.php
r61445 r61470 548 548 function wp_set_option_autoload( $option, $autoload ) { 549 549 $result = wp_set_option_autoload_values( array( $option => $autoload ) ); 550 if ( isset( $result[ $option ] ) ) { 551 return $result[ $option ]; 552 } 553 return false; 550 return $result[ $option ] ?? false; 554 551 } 555 552 -
trunk/src/wp-includes/post.php
r61445 r61470 2323 2323 function get_all_post_type_supports( $post_type ) { 2324 2324 global $_wp_post_type_features; 2325 2326 if ( isset( $_wp_post_type_features[ $post_type ] ) ) { 2327 return $_wp_post_type_features[ $post_type ]; 2328 } 2329 2330 return array(); 2325 return $_wp_post_type_features[ $post_type ] ?? array(); 2331 2326 } 2332 2327 -
trunk/src/wp-includes/theme.php
r61463 r61470 3043 3043 case 'custom-header': 3044 3044 case 'custom-background': 3045 if ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) ) { 3046 return $_wp_theme_features[ $feature ][0][ $args[0] ]; 3047 } 3048 return false; 3045 return $_wp_theme_features[ $feature ][0][ $args[0] ] ?? false; 3049 3046 3050 3047 default:
Note: See TracChangeset
for help on using the changeset viewer.