Changeset 61456 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 01/09/2026 04:20:21 AM (6 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ajax-actions.php (modified) (10 diffs)
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 */
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)