Changeset 61456
- Timestamp:
- 01/09/2026 04:20:21 AM (8 weeks ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 14 edited
-
includes/ajax-actions.php (modified) (10 diffs)
-
includes/class-wp-community-events.php (modified) (1 diff)
-
includes/class-wp-links-list-table.php (modified) (1 diff)
-
includes/class-wp-list-table.php (modified) (2 diffs)
-
includes/class-wp-plugin-install-list-table.php (modified) (1 diff)
-
includes/class-wp-plugins-list-table.php (modified) (3 diffs)
-
includes/class-wp-screen.php (modified) (2 diffs)
-
includes/class-wp-themes-list-table.php (modified) (1 diff)
-
includes/credits.php (modified) (1 diff)
-
includes/file.php (modified) (2 diffs)
-
includes/meta-boxes.php (modified) (2 diffs)
-
includes/plugin-install.php (modified) (1 diff)
-
includes/theme.php (modified) (1 diff)
-
options-privacy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r61411 r61456 1809 1809 $hidden = array_filter( $hidden ); 1810 1810 1811 $page = isset( $_POST['page'] ) ? $_POST['page'] :'';1811 $page = $_POST['page'] ?? ''; 1812 1812 1813 1813 if ( sanitize_key( $page ) !== $page ) { … … 1840 1840 function wp_ajax_hidden_columns() { 1841 1841 check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' ); 1842 $page = isset( $_POST['page'] ) ? $_POST['page'] :'';1842 $page = $_POST['page'] ?? ''; 1843 1843 1844 1844 if ( sanitize_key( $page ) !== $page ) { … … 1989 1989 check_ajax_referer( 'meta-box-order' ); 1990 1990 $order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false; 1991 $page_columns = isset( $_POST['page_columns'] ) ? $_POST['page_columns'] :'auto';1991 $page_columns = $_POST['page_columns'] ?? 'auto'; 1992 1992 1993 1993 if ( 'auto' !== $page_columns ) { … … 1995 1995 } 1996 1996 1997 $page = isset( $_POST['page'] ) ? $_POST['page'] :'';1997 $page = $_POST['page'] ?? ''; 1998 1998 1999 1999 if ( sanitize_key( $page ) !== $page ) { … … 2053 2053 check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' ); 2054 2054 $post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0; 2055 $title = isset( $_POST['new_title'] ) ? $_POST['new_title'] :'';2056 $slug = isset( $_POST['new_slug'] ) ? $_POST['new_slug'] :null;2055 $title = $_POST['new_title'] ?? ''; 2056 $slug = $_POST['new_slug'] ?? null; 2057 2057 wp_die( get_sample_permalink_html( $post_id, $title, $slug ) ); 2058 2058 } … … 2394 2394 2395 2395 $sidebars = wp_get_sidebars_widgets(); 2396 $sidebar = isset( $sidebars[ $sidebar_id ] ) ? $sidebars[ $sidebar_id ] :array();2396 $sidebar = $sidebars[ $sidebar_id ] ?? array(); 2397 2397 2398 2398 // Delete. … … 3354 3354 3355 3355 if ( str_starts_with( $post->post_mime_type, 'image' ) ) { 3356 $align = isset( $attachment['align'] ) ? $attachment['align'] :'none';3357 $size = isset( $attachment['image-size'] ) ? $attachment['image-size'] :'medium';3358 $alt = isset( $attachment['image_alt'] ) ? $attachment['image_alt'] :'';3356 $align = $attachment['align'] ?? 'none'; 3357 $size = $attachment['image-size'] ?? 'medium'; 3358 $alt = $attachment['image_alt'] ?? ''; 3359 3359 3360 3360 // No whitespace-only captions. 3361 $caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] :'';3361 $caption = $attachment['post_excerpt'] ?? ''; 3362 3362 if ( '' === trim( $caption ) ) { 3363 3363 $caption = ''; … … 3369 3369 $html = stripslashes_deep( $_POST['html'] ); 3370 3370 } else { 3371 $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] :'';3371 $html = $attachment['post_title'] ?? ''; 3372 3372 $rel = $rel ? ' rel="attachment wp-att-' . $id . '"' : ''; // Hard-coded string, $id is already sanitized. 3373 3373 … … 3422 3422 } 3423 3423 3424 $post = get_post( isset( $_POST['post_id'] ) ? $_POST['post_id'] :0 );3424 $post = get_post( $_POST['post_id'] ?? 0 ); 3425 3425 3426 3426 // Ping WordPress for an embed. … … 3648 3648 } 3649 3649 3650 $old_filter = isset( $args['browse'] ) ? $args['browse'] :'search';3650 $old_filter = $args['browse'] ?? 'search'; 3651 3651 3652 3652 /** This filter is documented in wp-admin/includes/class-wp-theme-install-list-table.php */ -
trunk/src/wp-admin/includes/class-wp-community-events.php
r60273 r61456 123 123 $response_error = new WP_Error( 124 124 'api-invalid-response', 125 isset( $response_body['error'] ) ? $response_body['error'] :__( 'Unknown API error.' )125 $response_body['error'] ?? __( 'Unknown API error.' ) 126 126 ); 127 127 } -
trunk/src/wp-admin/includes/class-wp-links-list-table.php
r58745 r61456 30 30 array( 31 31 'plural' => 'bookmarks', 32 'screen' => isset( $args['screen'] ) ? $args['screen'] :null,32 'screen' => $args['screen'] ?? null, 33 33 ) 34 34 ); -
trunk/src/wp-admin/includes/class-wp-list-table.php
r61440 r61456 1452 1452 1453 1453 if ( isset( $sortable[ $column_key ] ) ) { 1454 $orderby = isset( $sortable[ $column_key ][0] ) ? $sortable[ $column_key ][0] :'';1455 $desc_first = isset( $sortable[ $column_key ][1] ) ? $sortable[ $column_key ][1] :false;1456 $abbr = isset( $sortable[ $column_key ][2] ) ? $sortable[ $column_key ][2] :'';1457 $orderby_text = isset( $sortable[ $column_key ][3] ) ? $sortable[ $column_key ][3] :'';1458 $initial_order = isset( $sortable[ $column_key ][4] ) ? $sortable[ $column_key ][4] :'';1454 $orderby = $sortable[ $column_key ][0] ?? ''; 1455 $desc_first = $sortable[ $column_key ][1] ?? false; 1456 $abbr = $sortable[ $column_key ][2] ?? ''; 1457 $orderby_text = $sortable[ $column_key ][3] ?? ''; 1458 $initial_order = $sortable[ $column_key ][4] ?? ''; 1459 1459 1460 1460 /* … … 1568 1568 1569 1569 if ( isset( $sortable[ $column_key ] ) ) { 1570 $orderby = isset( $sortable[ $column_key ][0] ) ? $sortable[ $column_key ][0] :'';1571 $desc_first = isset( $sortable[ $column_key ][1] ) ? $sortable[ $column_key ][1] :false;1572 $abbr = isset( $sortable[ $column_key ][2] ) ? $sortable[ $column_key ][2] :'';1573 $orderby_text = isset( $sortable[ $column_key ][3] ) ? $sortable[ $column_key ][3] :'';1574 $initial_order = isset( $sortable[ $column_key ][4] ) ? $sortable[ $column_key ][4] :'';1570 $orderby = $sortable[ $column_key ][0] ?? ''; 1571 $desc_first = $sortable[ $column_key ][1] ?? false; 1572 $abbr = $sortable[ $column_key ][2] ?? ''; 1573 $orderby_text = $sortable[ $column_key ][3] ?? ''; 1574 $initial_order = $sortable[ $column_key ][4] ?? ''; 1575 1575 1576 1576 if ( ! is_string( $orderby_text ) || '' === $orderby_text ) { -
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r60528 r61456 557 557 } 558 558 559 $requires_php = isset( $plugin['requires_php'] ) ? $plugin['requires_php'] :null;560 $requires_wp = isset( $plugin['requires'] ) ? $plugin['requires'] :null;559 $requires_php = $plugin['requires_php'] ?? null; 560 $requires_wp = $plugin['requires'] ?? null; 561 561 562 562 $compatible_php = is_php_version_compatible( $requires_php ); -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r60723 r61456 43 43 array( 44 44 'plural' => 'plugins', 45 'screen' => isset( $args['screen'] ) ? $args['screen'] :null,45 'screen' => $args['screen'] ?? null, 46 46 ) 47 47 ); … … 727 727 list( $plugin_file, $plugin_data ) = $item; 728 728 729 $plugin_slug = isset( $plugin_data['slug'] ) ? $plugin_data['slug'] :sanitize_title( $plugin_data['Name'] );729 $plugin_slug = $plugin_data['slug'] ?? sanitize_title( $plugin_data['Name'] ); 730 730 $plugin_id_attr = $plugin_slug; 731 731 … … 754 754 $restrict_network_only = false; 755 755 756 $requires_php = isset( $plugin_data['RequiresPHP'] ) ? $plugin_data['RequiresPHP'] :null;757 $requires_wp = isset( $plugin_data['RequiresWP'] ) ? $plugin_data['RequiresWP'] :null;756 $requires_php = $plugin_data['RequiresPHP'] ?? null; 757 $requires_wp = $plugin_data['RequiresWP'] ?? null; 758 758 759 759 $compatible_php = is_php_version_compatible( $requires_php ); -
trunk/src/wp-admin/includes/class-wp-screen.php
r61300 r61456 809 809 ); 810 810 811 $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] :'';811 $old_help = self::$_old_compat_help[ $this->id ] ?? ''; 812 812 813 813 /** … … 1258 1258 1259 1259 if ( 'edit_comments_per_page' === $option ) { 1260 $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] :'all';1260 $comment_status = $_REQUEST['comment_status'] ?? 'all'; 1261 1261 1262 1262 /** This filter is documented in wp-admin/includes/class-wp-comments-list-table.php */ -
trunk/src/wp-admin/includes/class-wp-themes-list-table.php
r61440 r61456 33 33 array( 34 34 'ajax' => true, 35 'screen' => isset( $args['screen'] ) ? $args['screen'] :null,35 'screen' => $args['screen'] ?? null, 36 36 ) 37 37 ); -
trunk/src/wp-admin/includes/credits.php
r59541 r61456 121 121 */ 122 122 function wp_credits_section_list( $credits = array(), $slug = '' ) { 123 $group_data = isset( $credits['groups'][ $slug ] ) ? $credits['groups'][ $slug ] :array();123 $group_data = $credits['groups'][ $slug ] ?? array(); 124 124 $credits_data = $credits['data']; 125 125 if ( ! count( $group_data ) ) { -
trunk/src/wp-admin/includes/file.php
r61375 r61456 909 909 910 910 // All tests are on by default. Most can be turned off by $overrides[{test_name}] = false; 911 $test_form = isset( $overrides['test_form'] ) ? $overrides['test_form'] :true;912 $test_size = isset( $overrides['test_size'] ) ? $overrides['test_size'] :true;911 $test_form = $overrides['test_form'] ?? true; 912 $test_size = $overrides['test_size'] ?? true; 913 913 914 914 // If you override this, you must provide $ext and $type!! 915 $test_type = isset( $overrides['test_type'] ) ? $overrides['test_type'] :true;916 $mimes = isset( $overrides['mimes'] ) ? $overrides['mimes'] :null;915 $test_type = $overrides['test_type'] ?? true; 916 $mimes = $overrides['mimes'] ?? null; 917 917 918 918 // A correct form post will pass this test. … … 2497 2497 } 2498 2498 2499 $hostname = isset( $credentials['hostname'] ) ? $credentials['hostname'] :'';2500 $username = isset( $credentials['username'] ) ? $credentials['username'] :'';2501 $public_key = isset( $credentials['public_key'] ) ? $credentials['public_key'] :'';2502 $private_key = isset( $credentials['private_key'] ) ? $credentials['private_key'] :'';2503 $port = isset( $credentials['port'] ) ? $credentials['port'] :'';2504 $connection_type = isset( $credentials['connection_type'] ) ? $credentials['connection_type'] :'';2499 $hostname = $credentials['hostname'] ?? ''; 2500 $username = $credentials['username'] ?? ''; 2501 $public_key = $credentials['public_key'] ?? ''; 2502 $private_key = $credentials['private_key'] ?? ''; 2503 $port = $credentials['port'] ?? ''; 2504 $connection_type = $credentials['connection_type'] ?? ''; 2505 2505 2506 2506 if ( $error ) { -
trunk/src/wp-admin/includes/meta-boxes.php
r61440 r61456 1266 1266 } 1267 1267 1268 $link_rel = isset( $link->link_rel ) ? $link->link_rel :'';1268 $link_rel = $link->link_rel ?? ''; 1269 1269 $link_rels = preg_split( '/\s+/', $link_rel ); 1270 1270 … … 1455 1455 <tr> 1456 1456 <th scope="row"><label for="link_notes"><?php _e( 'Notes' ); ?></label></th> 1457 <td><textarea name="link_notes" id="link_notes" rows="10"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : '' ); // textarea_escaped ?></textarea></td>1457 <td><textarea name="link_notes" id="link_notes" rows="10"><?php echo $link->link_notes ?? ''; // textarea_escaped ?></textarea></td> 1458 1458 </tr> 1459 1459 <tr> -
trunk/src/wp-admin/includes/plugin-install.php
r61411 r61456 797 797 <div id="section-holder"> 798 798 <?php 799 $requires_php = isset( $api->requires_php ) ? $api->requires_php :null;800 $requires_wp = isset( $api->requires ) ? $api->requires :null;799 $requires_php = $api->requires_php ?? null; 800 $requires_wp = $api->requires ?? null; 801 801 802 802 $compatible_php = is_php_version_compatible( $requires_php ); -
trunk/src/wp-admin/includes/theme.php
r58813 r61456 733 733 } 734 734 735 $update_requires_wp = isset( $updates[ $slug ]['requires'] ) ? $updates[ $slug ]['requires'] :null;736 $update_requires_php = isset( $updates[ $slug ]['requires_php'] ) ? $updates[ $slug ]['requires_php'] :null;735 $update_requires_wp = $updates[ $slug ]['requires'] ?? null; 736 $update_requires_php = $updates[ $slug ]['requires_php'] ?? null; 737 737 738 738 $auto_update = in_array( $slug, $auto_updates, true ); -
trunk/src/wp-admin/options-privacy.php
r59667 r61456 31 31 ); 32 32 33 $action = isset( $_POST['action'] ) ? $_POST['action'] :'';33 $action = $_POST['action'] ?? ''; 34 34 35 35 get_current_screen()->add_help_tab(
Note: See TracChangeset
for help on using the changeset viewer.