diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-admin/edit-form-advanced.php --- a/wp/wp-admin/edit-form-advanced.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-admin/edit-form-advanced.php Fri Sep 05 18:40:08 2025 +0200 @@ -12,8 +12,8 @@ } /** - * @global string $post_type - * @global WP_Post_Type $post_type_object + * @global string $post_type Global post type. + * @global WP_Post_Type $post_type_object Global post type object. * @global WP_Post $post Global post object. */ global $post_type, $post_type_object, $post; @@ -316,8 +316,8 @@ 'tools.php' ) . '

' . '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Writing and Editing Posts' ) . '

' . - '

' . __( 'Support' ) . '

' + '

' . __( 'Documentation on Writing and Editing Posts' ) . '

' . + '

' . __( 'Support forums' ) . '

' ); } elseif ( 'page' === $post_type ) { $about_pages = '

' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.' ) . '

' . @@ -333,9 +333,9 @@ get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Adding New Pages' ) . '

' . - '

' . __( 'Documentation on Editing Pages' ) . '

' . - '

' . __( 'Support' ) . '

' + '

' . __( 'Documentation on Adding New Pages' ) . '

' . + '

' . __( 'Documentation on Editing Pages' ) . '

' . + '

' . __( 'Support forums' ) . '

' ); } elseif ( 'attachment' === $post_type ) { get_current_screen()->add_help_tab( @@ -346,20 +346,20 @@ '

' . __( 'This screen allows you to edit fields for metadata in a file within the media library.' ) . '

' . '

' . __( 'For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.' ) . '

' . '

' . __( 'Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.' ) . '

' . - '

' . __( 'Remember to click Update Media to save metadata entered or changed.' ) . '

', + '

' . __( 'Remember to click Update to save metadata entered or changed.' ) . '

', ) ); get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Edit Media' ) . '

' . - '

' . __( 'Support' ) . '

' + '

' . __( 'Documentation on Edit Media' ) . '

' . + '

' . __( 'Support forums' ) . '

' ); } if ( 'post' === $post_type || 'page' === $post_type ) { $inserting_media = '

' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the “Create a new gallery” button.' ) . '

'; - $inserting_media .= '

' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. Learn more about embeds.' ) . '

'; + $inserting_media .= '

' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. Learn more about embeds.' ) . '

'; get_current_screen()->add_help_tab( array( @@ -377,7 +377,7 @@ ''; if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) { - $publish_box .= '
  • ' . __( 'Format — Post Formats designate how your theme will display a specific post. For example, you could have a standard blog post with a title and paragraphs, or a short aside that omits the title and contains a short text blurb. Your theme could enable all or some of 10 possible formats. Learn more about each post format.' ) . '
  • '; + $publish_box .= '
  • ' . __( 'Format — Post Formats designate how your theme will display a specific post. For example, you could have a standard blog post with a title and paragraphs, or a short aside that omits the title and contains a short text blurb. Your theme could enable all or some of 10 possible formats. Learn more about each post format.' ) . '
  • '; } if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) { @@ -440,17 +440,43 @@
    - -

    - - -

    - - +' . $notice . '

    ', + array( + 'type' => 'warning', + 'id' => 'notice', + 'paragraph_wrap' => false, + ) + ); +endif; +if ( $message ) : + wp_admin_notice( + $message, + array( + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + ) + ); +endif; + +$connection_lost_message = sprintf( + ' %1$s %2$s', + __( 'Connection lost. Saving has been disabled until you are reconnected.' ), + __( 'This post is being backed up in your browser, just in case.' ) +); + +wp_admin_notice( + $connection_lost_message, + array( + 'id' => 'lost-connection-notice', + 'additional_classes' => array( 'error', 'hidden' ), + ) +); +?>
    '; $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) ); if ( $last_user ) { - /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */ - printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); + printf( + /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */ + __( 'Last edited by %1$s on %2$s at %3$s' ), + esc_html( $last_user->display_name ), + mysql2date( __( 'F j, Y' ), $post->post_modified ), + mysql2date( __( 'g:i a' ), $post->post_modified ) + ); } else { - /* translators: 1: Post edited date, 2: Post edited time. */ - printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); + printf( + /* translators: 1: Post edited date, 2: Post edited time. */ + __( 'Last edited on %1$s at %2$s' ), + mysql2date( __( 'F j, Y' ), $post->post_modified ), + mysql2date( __( 'g:i a' ), $post->post_modified ) + ); } echo ''; }