Changeset 61454
- Timestamp:
- 01/09/2026 02:38:07 AM (2 months ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
-
wp-admin/includes/nav-menu.php (modified) (3 diffs)
-
wp-admin/link-parse-opml.php (modified) (1 diff)
-
wp-admin/nav-menus.php (modified) (1 diff)
-
wp-includes/author-template.php (modified) (3 diffs)
-
wp-includes/category-template.php (modified) (1 diff)
-
wp-includes/class-wp-xmlrpc-server.php (modified) (17 diffs)
-
wp-includes/general-template.php (modified) (2 diffs)
-
wp-includes/link-template.php (modified) (1 diff)
-
wp-includes/nav-menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/nav-menu.php
r60991 r61454 23 23 function _wp_ajax_menu_quick_search( $request = array() ) { 24 24 $args = array(); 25 $type = isset( $request['type'] ) ? $request['type'] :'';26 $object_type = isset( $request['object_type'] ) ? $request['object_type'] :'';27 $query = isset( $request['q'] ) ? $request['q'] :'';28 $response_format = isset( $request['response-format'] ) ? $request['response-format'] :'';25 $type = $request['type'] ?? ''; 26 $object_type = $request['object_type'] ?? ''; 27 $query = $request['q'] ?? ''; 28 $response_format = $request['response-format'] ?? ''; 29 29 30 30 if ( ! $response_format || ! in_array( $response_format, array( 'json', 'markup' ), true ) ) { … … 1184 1184 1185 1185 $args = array( 1186 'menu-item-db-id' => ( isset( $_item_object_data['menu-item-db-id'] ) ? $_item_object_data['menu-item-db-id'] : '' ),1187 'menu-item-object-id' => ( isset( $_item_object_data['menu-item-object-id'] ) ? $_item_object_data['menu-item-object-id'] : '' ),1188 'menu-item-object' => ( isset( $_item_object_data['menu-item-object'] ) ? $_item_object_data['menu-item-object'] : '' ),1189 'menu-item-parent-id' => ( isset( $_item_object_data['menu-item-parent-id'] ) ? $_item_object_data['menu-item-parent-id'] : '' ),1190 'menu-item-position' => ( isset( $_item_object_data['menu-item-position'] ) ? $_item_object_data['menu-item-position'] : '' ),1191 'menu-item-type' => ( isset( $_item_object_data['menu-item-type'] ) ? $_item_object_data['menu-item-type'] : '' ),1192 'menu-item-title' => ( isset( $_item_object_data['menu-item-title'] ) ? $_item_object_data['menu-item-title'] : '' ),1193 'menu-item-url' => ( isset( $_item_object_data['menu-item-url'] ) ? $_item_object_data['menu-item-url'] : '' ),1194 'menu-item-description' => ( isset( $_item_object_data['menu-item-description'] ) ? $_item_object_data['menu-item-description'] : '' ),1195 'menu-item-attr-title' => ( isset( $_item_object_data['menu-item-attr-title'] ) ? $_item_object_data['menu-item-attr-title'] : '' ),1196 'menu-item-target' => ( isset( $_item_object_data['menu-item-target'] ) ? $_item_object_data['menu-item-target'] : '' ),1197 'menu-item-classes' => ( isset( $_item_object_data['menu-item-classes'] ) ? $_item_object_data['menu-item-classes'] : '' ),1198 'menu-item-xfn' => ( isset( $_item_object_data['menu-item-xfn'] ) ? $_item_object_data['menu-item-xfn'] : '' ),1186 'menu-item-db-id' => $_item_object_data['menu-item-db-id'] ?? '', 1187 'menu-item-object-id' => $_item_object_data['menu-item-object-id'] ?? '', 1188 'menu-item-object' => $_item_object_data['menu-item-object'] ?? '', 1189 'menu-item-parent-id' => $_item_object_data['menu-item-parent-id'] ?? '', 1190 'menu-item-position' => $_item_object_data['menu-item-position'] ?? '', 1191 'menu-item-type' => $_item_object_data['menu-item-type'] ?? '', 1192 'menu-item-title' => $_item_object_data['menu-item-title'] ?? '', 1193 'menu-item-url' => $_item_object_data['menu-item-url'] ?? '', 1194 'menu-item-description' => $_item_object_data['menu-item-description'] ?? '', 1195 'menu-item-attr-title' => $_item_object_data['menu-item-attr-title'] ?? '', 1196 'menu-item-target' => $_item_object_data['menu-item-target'] ?? '', 1197 'menu-item-classes' => $_item_object_data['menu-item-classes'] ?? '', 1198 'menu-item-xfn' => $_item_object_data['menu-item-xfn'] ?? '', 1199 1199 ); 1200 1200 … … 1448 1448 $args = array(); 1449 1449 foreach ( $post_fields as $field ) { 1450 $args[ $field ] = isset( $_POST[ $field ][ $_key ] ) ? $_POST[ $field ][ $_key ] :'';1450 $args[ $field ] = $_POST[ $field ][ $_key ] ?? ''; 1451 1451 } 1452 1452 -
trunk/src/wp-admin/link-parse-opml.php
r60703 r61454 56 56 $names[] = $name; 57 57 $urls[] = $url; 58 $targets[] = isset( $attrs['TARGET'] ) ? $attrs['TARGET'] :'';59 $feeds[] = isset( $attrs['XMLURL'] ) ? $attrs['XMLURL'] :'';60 $descriptions[] = isset( $attrs['DESCRIPTION'] ) ? $attrs['DESCRIPTION'] :'';58 $targets[] = $attrs['TARGET'] ?? ''; 59 $feeds[] = $attrs['XMLURL'] ?? ''; 60 $descriptions[] = $attrs['DESCRIPTION'] ?? ''; 61 61 } // End if outline. 62 62 } -
trunk/src/wp-admin/nav-menus.php
r60682 r61454 53 53 54 54 // Allowed actions: add, update, delete. 55 $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] :'edit';55 $action = $_REQUEST['action'] ?? 'edit'; 56 56 57 57 /* -
trunk/src/wp-includes/author-template.php
r61057 r61454 170 170 if ( ! $user_id ) { 171 171 global $authordata; 172 $user_id = isset( $authordata->ID ) ? $authordata->ID :0;172 $user_id = $authordata->ID ?? 0; 173 173 } else { 174 174 $authordata = get_userdata( $user_id ); … … 179 179 } 180 180 181 $value = isset( $authordata->$field ) ? $authordata->$field :'';181 $value = $authordata->$field ?? ''; 182 182 183 183 /** … … 503 503 504 504 foreach ( $authors as $author_id ) { 505 $posts = isset( $post_counts[ $author_id ] ) ? $post_counts[ $author_id ] :0;505 $posts = $post_counts[ $author_id ] ?? 0; 506 506 507 507 if ( ! $posts && $parsed_args['hide_empty'] ) { -
trunk/src/wp-includes/category-template.php
r60275 r61454 964 964 $tags_data = array(); 965 965 foreach ( $tags as $key => $tag ) { 966 $tag_id = isset( $tag->id ) ? $tag->id :$key;966 $tag_id = $tag->id ?? $key; 967 967 968 968 $count = $counts[ $key ]; -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r60655 r61454 1681 1681 1682 1682 // Handle enclosures. 1683 $enclosure = isset( $post_data['enclosure'] ) ? $post_data['enclosure'] :null;1683 $enclosure = $post_data['enclosure'] ?? null; 1684 1684 $this->add_enclosure_if_new( $post_id, $enclosure ); 1685 1685 … … 1987 1987 $username = $args[1]; 1988 1988 $password = $args[2]; 1989 $filter = isset( $args[3] ) ? $args[3] :array();1989 $filter = $args[3] ?? array(); 1990 1990 1991 1991 if ( isset( $args[4] ) ) { … … 2458 2458 $password = $args[2]; 2459 2459 $taxonomy = $args[3]; 2460 $filter = isset( $args[4] ) ? $args[4] :array();2460 $filter = $args[4] ?? array(); 2461 2461 2462 2462 $user = $this->login( $username, $password ); … … 2616 2616 $username = $args[1]; 2617 2617 $password = $args[2]; 2618 $filter = isset( $args[3] ) ? $args[3] :array( 'public' => true );2618 $filter = $args[3] ?? array( 'public' => true ); 2619 2619 2620 2620 if ( isset( $args[4] ) ) { … … 2765 2765 $username = $args[1]; 2766 2766 $password = $args[2]; 2767 $filter = isset( $args[3] ) ? $args[3] :array();2767 $filter = $args[3] ?? array(); 2768 2768 2769 2769 if ( isset( $args[4] ) ) { … … 3659 3659 $username = $args[1]; 3660 3660 $password = $args[2]; 3661 $struct = isset( $args[3] ) ? $args[3] :array();3661 $struct = $args[3] ?? array(); 3662 3662 3663 3663 $user = $this->login( $username, $password ); … … 4434 4434 $username = $args[1]; 4435 4435 $password = $args[2]; 4436 $struct = isset( $args[3] ) ? $args[3] :array();4436 $struct = $args[3] ?? array(); 4437 4437 4438 4438 $user = $this->login( $username, $password ); … … 4625 4625 $username = $args[1]; 4626 4626 $password = $args[2]; 4627 $filter = isset( $args[3] ) ? $args[3] :array( 'public' => true );4627 $filter = $args[3] ?? array( 'public' => true ); 4628 4628 4629 4629 if ( isset( $args[4] ) ) { … … 5376 5376 $password = $args[2]; 5377 5377 $content_struct = $args[3]; 5378 $publish = isset( $args[4] ) ? $args[4] :0;5378 $publish = $args[4] ?? 0; 5379 5379 5380 5380 $user = $this->login( $username, $password ); … … 5492 5492 } 5493 5493 5494 $post_title = isset( $content_struct['title'] ) ? $content_struct['title'] :'';5495 $post_content = isset( $content_struct['description'] ) ? $content_struct['description'] :'';5494 $post_title = $content_struct['title'] ?? ''; 5495 $post_content = $content_struct['description'] ?? ''; 5496 5496 5497 5497 $post_status = $publish ? 'publish' : 'draft'; … … 5511 5511 } 5512 5512 5513 $post_excerpt = isset( $content_struct['mt_excerpt'] ) ? $content_struct['mt_excerpt'] :'';5514 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] :'';5515 5516 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] :array();5513 $post_excerpt = $content_struct['mt_excerpt'] ?? ''; 5514 $post_more = $content_struct['mt_text_more'] ?? ''; 5515 5516 $tags_input = $content_struct['mt_keywords'] ?? array(); 5517 5517 5518 5518 if ( isset( $content_struct['mt_allow_comments'] ) ) { … … 5662 5662 5663 5663 // Handle enclosures. 5664 $enclosure = isset( $content_struct['enclosure'] ) ? $content_struct['enclosure'] :null;5664 $enclosure = $content_struct['enclosure'] ?? null; 5665 5665 $this->add_enclosure_if_new( $post_id, $enclosure ); 5666 5666 … … 5772 5772 $password = $args[2]; 5773 5773 $content_struct = $args[3]; 5774 $publish = isset( $args[4] ) ? $args[4] :0;5774 $publish = $args[4] ?? 0; 5775 5775 5776 5776 $user = $this->login( $username, $password ); … … 5956 5956 } 5957 5957 5958 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] :'';5958 $post_more = $content_struct['mt_text_more'] ?? ''; 5959 5959 5960 5960 $post_status = $publish ? 'publish' : 'draft'; … … 5973 5973 } 5974 5974 5975 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] :array();5975 $tags_input = $content_struct['mt_keywords'] ?? array(); 5976 5976 5977 5977 if ( 'publish' === $post_status || 'private' === $post_status ) { … … 6081 6081 6082 6082 // Handle enclosures. 6083 $enclosure = isset( $content_struct['enclosure'] ) ? $content_struct['enclosure'] :null;6083 $enclosure = $content_struct['enclosure'] ?? null; 6084 6084 $this->add_enclosure_if_new( $post_id, $enclosure ); 6085 6085 … … 7060 7060 7061 7061 preg_match( '|<title>([^<]*?)</title>|is', $remote_source, $matchtitle ); 7062 $title = isset( $matchtitle[1] ) ? $matchtitle[1] :'';7062 $title = $matchtitle[1] ?? ''; 7063 7063 if ( empty( $title ) ) { 7064 7064 return $this->pingback_error( 32, __( 'A title on that page cannot be found.' ) ); -
trunk/src/wp-includes/general-template.php
r61411 r61454 4659 4659 4660 4660 // Get max pages and current page out of the current query, if available. 4661 $total = isset( $wp_query->max_num_pages ) ? $wp_query->max_num_pages :1;4661 $total = $wp_query->max_num_pages ?? 1; 4662 4662 $current = get_query_var( 'paged' ) ? (int) get_query_var( 'paged' ) : 1; 4663 4663 … … 4698 4698 // Find the format argument. 4699 4699 $format = explode( '?', str_replace( '%_%', $args['format'], $args['base'] ) ); 4700 $format_query = isset( $format[1] ) ? $format[1] :'';4700 $format_query = $format[1] ?? ''; 4701 4701 wp_parse_str( $format_query, $format_args ); 4702 4702 -
trunk/src/wp-includes/link-template.php
r61387 r61454 2439 2439 2440 2440 $home_root = parse_url( home_url() ); 2441 $home_root = ( isset( $home_root['path'] ) ) ? $home_root['path'] :'';2441 $home_root = $home_root['path'] ?? ''; 2442 2442 $home_root = preg_quote( $home_root, '|' ); 2443 2443 -
trunk/src/wp-includes/nav-menu.php
r58854 r61454 320 320 321 321 $args = array( 322 'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ),323 'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ),322 'description' => $menu_data['description'] ?? '', 323 'name' => $menu_data['menu-name'] ?? '', 324 324 'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ), 325 325 'slug' => null,
Note: See TracChangeset
for help on using the changeset viewer.