Changeset 61445 for trunk/src/wp-includes/post.php
- Timestamp:
- 01/06/2026 06:05:20 AM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/post.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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!).
Note: See TracChangeset
for help on using the changeset viewer.