Changeset 61445
- Timestamp:
- 01/06/2026 06:05:20 AM (2 months ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
-
wp-admin/includes/class-wp-posts-list-table.php (modified) (3 diffs)
-
wp-admin/includes/class-wp-terms-list-table.php (modified) (1 diff)
-
wp-admin/includes/post.php (modified) (3 diffs)
-
wp-includes/class-wp-meta-query.php (modified) (1 diff)
-
wp-includes/class-wp-term.php (modified) (1 diff)
-
wp-includes/class-wp.php (modified) (4 diffs)
-
wp-includes/functions.php (modified) (6 diffs)
-
wp-includes/option.php (modified) (1 diff)
-
wp-includes/post-template.php (modified) (3 diffs)
-
wp-includes/post.php (modified) (5 diffs)
-
wp-includes/revision.php (modified) (1 diff)
-
wp-includes/taxonomy.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r61255 r61445 77 77 array( 78 78 'plural' => 'posts', 79 'screen' => isset( $args['screen'] ) ? $args['screen'] :null,79 'screen' => $args['screen'] ?? null, 80 80 ) 81 81 ); … … 532 532 } 533 533 534 $displayed_post_format = isset( $_GET['post_format'] ) ? $_GET['post_format'] :'';534 $displayed_post_format = $_GET['post_format'] ?? ''; 535 535 ?> 536 536 <label for="filter-by-format" class="screen-reader-text"> … … 1265 1265 <div class="post-com-count-wrapper"> 1266 1266 <?php 1267 $pending_comments = isset( $this->comment_pending_count[ $post->ID ] ) ? $this->comment_pending_count[ $post->ID ] :0;1267 $pending_comments = $this->comment_pending_count[ $post->ID ] ?? 0; 1268 1268 1269 1269 $this->comments_bubble( $post->ID, $pending_comments ); -
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r60498 r61445 42 42 'plural' => 'tags', 43 43 'singular' => 'tag', 44 'screen' => isset( $args['screen'] ) ? $args['screen'] :null,44 'screen' => $args['screen'] ?? null, 45 45 ) 46 46 ); -
trunk/src/wp-admin/includes/post.php
r61440 r61445 430 430 } 431 431 432 $attachment_data = isset( $post_data['attachments'][ $post_id ] ) ? $post_data['attachments'][ $post_id ] :array();432 $attachment_data = $post_data['attachments'][ $post_id ] ?? array(); 433 433 434 434 /** This filter is documented in wp-admin/includes/media.php */ … … 1015 1015 $metakeyselect = isset( $_POST['metakeyselect'] ) ? wp_unslash( trim( $_POST['metakeyselect'] ) ) : ''; 1016 1016 $metakeyinput = isset( $_POST['metakeyinput'] ) ? wp_unslash( trim( $_POST['metakeyinput'] ) ) : ''; 1017 $metavalue = isset( $_POST['metavalue'] ) ? $_POST['metavalue'] :'';1017 $metavalue = $_POST['metavalue'] ?? ''; 1018 1018 if ( is_string( $metavalue ) ) { 1019 1019 $metavalue = trim( $metavalue ); … … 2044 2044 * this is hooked on inner core hooks where a valid nonce was already checked. 2045 2045 */ 2046 $posted_data = isset( $_POST['data']['wp_autosave'] ) ? $_POST['data']['wp_autosave'] :$_POST;2046 $posted_data = $_POST['data']['wp_autosave'] ?? $_POST; 2047 2047 2048 2048 $post_type = get_post_type( $new_autosave['post_parent'] ); -
trunk/src/wp-includes/class-wp-meta-query.php
r60176 r61445 620 620 621 621 // Determine the data type. 622 $_meta_type = isset( $clause['type'] ) ? $clause['type'] :'';622 $_meta_type = $clause['type'] ?? ''; 623 623 $meta_type = $this->get_cast_for_type( $_meta_type ); 624 624 $clause['cast'] = $meta_type; -
trunk/src/wp-includes/class-wp-term.php
r54133 r61445 237 237 $columns = array( 'term_id', 'name', 'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description', 'parent', 'count' ); 238 238 foreach ( $columns as $column ) { 239 $data->{$column} = isset( $this->{$column} ) ? $this->{$column} :null;239 $data->{$column} = $this->{$column} ?? null; 240 240 } 241 241 -
trunk/src/wp-includes/class-wp.php
r61111 r61445 168 168 $this->did_permalink = true; 169 169 170 $pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] :'';170 $pathinfo = $_SERVER['PATH_INFO'] ?? ''; 171 171 list( $pathinfo ) = explode( '?', $pathinfo ); 172 172 $pathinfo = str_replace( '%', '%25', $pathinfo ); … … 540 540 541 541 if ( is_singular() ) { 542 $post = isset( $wp_query->post ) ? $wp_query->post :null;542 $post = $wp_query->post ?? null; 543 543 544 544 // Only set X-Pingback for single posts that allow pings. … … 670 670 $GLOBALS['query_string'] = $this->query_string; 671 671 $GLOBALS['posts'] = & $wp_query->posts; 672 $GLOBALS['post'] = isset( $wp_query->post ) ? $wp_query->post :null;672 $GLOBALS['post'] = $wp_query->post ?? null; 673 673 $GLOBALS['request'] = $wp_query->request; 674 674 … … 756 756 757 757 if ( is_singular() ) { 758 $post = isset( $wp_query->post ) ? $wp_query->post :null;758 $post = $wp_query->post ?? null; 759 759 $next = '<!--nextpage-->'; 760 760 -
trunk/src/wp-includes/functions.php
r61411 r61445 953 953 if ( $headers ) { 954 954 $len = isset( $headers['Content-Length'] ) ? (int) $headers['Content-Length'] : 0; 955 $type = isset( $headers['Content-Type'] ) ? $headers['Content-Type'] :'';955 $type = $headers['Content-Type'] ?? ''; 956 956 $allowed_types = array( 'video', 'audio' ); 957 957 … … 3691 3691 ); 3692 3692 3693 $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] :'';3693 $redirect_to = $_REQUEST['redirect_to'] ?? ''; 3694 3694 3695 3695 $html = $title; … … 6140 6140 */ 6141 6141 function is_lighttpd_before_150() { 6142 $server_parts = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] :'' );6143 $server_parts[1] = isset( $server_parts[1] ) ? $server_parts[1] :'';6142 $server_parts = explode( '/', $_SERVER['SERVER_SOFTWARE'] ?? '' ); 6143 $server_parts[1] = $server_parts[1] ?? ''; 6144 6144 6145 6145 return ( 'lighttpd' === $server_parts[0] && -1 === version_compare( $server_parts[1], '1.5.0' ) ); … … 7122 7122 $tortoise 7123 7123 && 7124 ( $evanescent_hare = isset( $override[ $hare ] ) ? $override[ $hare ] :call_user_func_array( $callback, array_merge( array( $hare ), $callback_args ) ) )7124 ( $evanescent_hare = $override[ $hare ] ?? call_user_func_array( $callback, array_merge( array( $hare ), $callback_args ) ) ) 7125 7125 && 7126 ( $hare = isset( $override[ $evanescent_hare ] ) ? $override[ $evanescent_hare ] :call_user_func_array( $callback, array_merge( array( $evanescent_hare ), $callback_args ) ) )7126 ( $hare = $override[ $evanescent_hare ] ?? call_user_func_array( $callback, array_merge( array( $evanescent_hare ), $callback_args ) ) ) 7127 7127 ) { 7128 7128 if ( $_return_loop ) { … … 7138 7138 7139 7139 // Increment tortoise by one step. 7140 $tortoise = isset( $override[ $tortoise ] ) ? $override[ $tortoise ] :call_user_func_array( $callback, array_merge( array( $tortoise ), $callback_args ) );7140 $tortoise = $override[ $tortoise ] ?? call_user_func_array( $callback, array_merge( array( $tortoise ), $callback_args ) ); 7141 7141 } 7142 7142 … … 7267 7267 $caller[] = "{$call['function']}('{$call['args'][0]}')"; 7268 7268 } elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ), true ) ) { 7269 $filename = isset( $call['args'][0] ) ? $call['args'][0] :'';7269 $filename = $call['args'][0] ?? ''; 7270 7270 $caller[] = $call['function'] . "('" . str_replace( $truncate_paths, '', wp_normalize_path( $filename ) ) . "')"; 7271 7271 } else { -
trunk/src/wp-includes/option.php
r61387 r61445 1756 1756 $all_user_settings = get_all_user_settings(); 1757 1757 1758 return isset( $all_user_settings[ $name ] ) ? $all_user_settings[ $name ] :$default_value;1758 return $all_user_settings[ $name ] ?? $default_value; 1759 1759 } 1760 1760 -
trunk/src/wp-includes/post-template.php
r61269 r61445 119 119 $post = get_post( $post ); 120 120 121 $post_title = isset( $post->post_title ) ? $post->post_title :'';122 $post_id = isset( $post->ID ) ? $post->ID :0;121 $post_title = $post->post_title ?? ''; 122 $post_id = $post->ID ?? 0; 123 123 124 124 if ( ! is_admin() ) { … … 192 192 193 193 $post_guid = isset( $post->guid ) ? get_the_guid( $post ) : ''; 194 $post_id = isset( $post->ID ) ? $post->ID :0;194 $post_id = $post->ID ?? 0; 195 195 196 196 /** … … 222 222 $post = get_post( $post ); 223 223 224 $post_guid = isset( $post->guid ) ? $post->guid :'';225 $post_id = isset( $post->ID ) ? $post->ID :0;224 $post_guid = $post->guid ?? ''; 225 $post_id = $post->ID ?? 0; 226 226 227 227 /** -
trunk/src/wp-includes/post.php
r61387 r61445 2202 2202 2203 2203 if ( ! isset( $data_object->labels['name_admin_bar'] ) ) { 2204 $data_object->labels['name_admin_bar'] = 2205 isset( $data_object->labels['singular_name'] ) 2206 ? $data_object->labels['singular_name'] 2207 : $data_object->name; 2204 $data_object->labels['name_admin_bar'] = $data_object->labels['singular_name'] ?? $data_object->name; 2208 2205 } 2209 2206 … … 2857 2854 $custom = get_post_custom( $post_id ); 2858 2855 2859 return isset( $custom[ $key ] ) ? $custom[ $key ] :null;2856 return $custom[ $key ] ?? null; 2860 2857 } 2861 2858 … … 4731 4728 // These variables are needed by compact() later. 4732 4729 $post_content_filtered = $postarr['post_content_filtered']; 4733 $post_author = isset( $postarr['post_author'] ) ? $postarr['post_author'] :$user_id;4730 $post_author = $postarr['post_author'] ?? $user_id; 4734 4731 $ping_status = empty( $postarr['ping_status'] ) ? get_default_comment_status( $post_type, 'pingback' ) : $postarr['ping_status']; 4735 4732 $to_ping = isset( $postarr['to_ping'] ) ? sanitize_trackback_urls( $postarr['to_ping'] ) : ''; 4736 $pinged = isset( $postarr['pinged'] ) ? $postarr['pinged'] :'';4737 $import_id = isset( $postarr['import_id'] ) ? $postarr['import_id'] :0;4733 $pinged = $postarr['pinged'] ?? ''; 4734 $import_id = $postarr['import_id'] ?? 0; 4738 4735 4739 4736 /* … … 4747 4744 } 4748 4745 4749 $post_password = isset( $postarr['post_password'] ) ? $postarr['post_password'] :'';4746 $post_password = $postarr['post_password'] ?? ''; 4750 4747 if ( 'private' === $post_status ) { 4751 4748 $post_password = ''; … … 4816 4813 4817 4814 // Don't unslash. 4818 $post_mime_type = isset( $postarr['post_mime_type'] ) ? $postarr['post_mime_type'] :'';4815 $post_mime_type = $postarr['post_mime_type'] ?? ''; 4819 4816 4820 4817 // Expected_slashed (everything!). -
trunk/src/wp-includes/revision.php
r61387 r61445 90 90 $revision_data['post_type'] = 'revision'; 91 91 $revision_data['post_name'] = $autosave ? "$post[ID]-autosave-v1" : "$post[ID]-revision-v1"; // "1" is the revisioning system version. 92 $revision_data['post_date'] = isset( $post['post_modified'] ) ? $post['post_modified'] :'';93 $revision_data['post_date_gmt'] = isset( $post['post_modified_gmt'] ) ? $post['post_modified_gmt'] :'';92 $revision_data['post_date'] = $post['post_modified'] ?? ''; 93 $revision_data['post_date_gmt'] = $post['post_modified_gmt'] ?? ''; 94 94 95 95 return $revision_data; -
trunk/src/wp-includes/taxonomy.php
r61387 r61445 1724 1724 $do_object = is_object( $term ); 1725 1725 1726 $term_id = $do_object ? $term->term_id : ( isset( $term['term_id'] ) ? $term['term_id'] :0 );1726 $term_id = $do_object ? $term->term_id : ( $term['term_id'] ?? 0 ); 1727 1727 1728 1728 foreach ( (array) $fields as $field ) { … … 3281 3281 $parsed_args['slug'] = $slug; 3282 3282 3283 $term_group = isset( $parsed_args['term_group'] ) ? $parsed_args['term_group'] :0;3283 $term_group = $parsed_args['term_group'] ?? 0; 3284 3284 if ( $args['alias_of'] ) { 3285 3285 $alias = get_term_by( 'slug', $args['alias_of'], $taxonomy );
Note: See TracChangeset
for help on using the changeset viewer.