X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..febc815b2c9d85be5717da9e8d164bd2daa97e31:/wp-admin/edit-form-advanced.php diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index aff04131..bd229b90 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -11,9 +11,9 @@ if ( !defined('ABSPATH') ) die('-1'); /** - * @global string $post_type - * @global object $post_type_object - * @global WP_Post $post + * @global string $post_type + * @global WP_Post_Type $post_type_object + * @global WP_Post $post */ global $post_type, $post_type_object, $post; @@ -21,7 +21,7 @@ wp_enqueue_script('post'); $_wp_editor_expand = $_content_editor_dfw = false; /** - * Filter whether to enable the 'expand' functionality in the post editor. + * Filters whether to enable the 'expand' functionality in the post editor. * * @since 4.0.0 * @since 4.1.0 Added the `$post_type` parameter. @@ -129,7 +129,7 @@ if ( $viewable ) { } -/* translators: Publish box date format, see http://php.net/date */ +/* translators: Publish box date format, see https://secure.php.net/date */ $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ); $messages['post'] = array( @@ -160,10 +160,10 @@ $messages['page'] = array( 9 => sprintf( __( 'Page scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_page_link_html, 10 => __( 'Page draft updated.' ) . $preview_page_link_html, ); -$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now. +$messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now. /** - * Filter the post updated messages. + * Filters the post updated messages. * * @since 3.0.0 * @@ -197,7 +197,7 @@ $form_extra .= "post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { - foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { + foreach ( _wp_post_revision_fields( $post ) as $autosave_field => $_autosave_field ) { if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { $notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. View the autosave' ), get_edit_post_link( $autosave->ID ) ); break; @@ -219,7 +219,7 @@ $publish_callback_args = null; if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status ) { $revisions = wp_get_post_revisions( $post_ID ); - // We should aim to show the revisions metabox only when there are revisions. + // We should aim to show the revisions meta box only when there are revisions. if ( count( $revisions ) > 1 ) { reset( $revisions ); // Reset pointer for key() $publish_callback_args = array( 'revisions_count' => count( $revisions ), 'revision_id' => key( $revisions ) ); @@ -363,8 +363,8 @@ if ( 'post' == $post_type ) { $title_and_editor = '

' . __('Title — Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.') . '

'; $title_and_editor .= '

' . __( 'Post editor — Enter the text for your post. There are two modes of editing: Visual and Text. Choose the mode by clicking on the appropriate tab.' ) . '

'; - $title_and_editor .= '

' . __( 'Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. ') . '

'; - $title_and_editor .= '

' . __( 'The Text mode allows you to enter HTML along with your post text. Line breaks will be converted to paragraphs automatically.' ) . '

'; + $title_and_editor .= '

' . __( 'Visual mode gives you an editor that is similar to a word processor. Click the Toolbar Toggle button to get a second row of controls.' ) . '

'; + $title_and_editor .= '

' . __( 'The Text mode allows you to enter HTML along with your post text. Note that <p> and <br> tags are converted to line breaks when switching to the Text editor to make it less cluttered. When you type, a single line break can be used instead of typing <br>, and two line breaks instead of paragraph tags. The line breaks are converted back to tags automatically.' ) . '

'; $title_and_editor .= '

' . __( 'You can insert media files by clicking the icons above the post editor and following the directions. You can align or edit images using the inline formatting toolbar available in Visual mode.' ) . '

'; $title_and_editor .= '

' . __( 'You can enable distraction-free writing mode using the icon to the right. This feature is not available for old browsers or devices with small screens, and requires that the full-height editor be enabled in Screen Options.' ) . '

'; $title_and_editor .= '

' . __( 'Keyboard users: When you’re working in the visual editor, you can use Alt + F10 to access the toolbar.' ) . '

'; @@ -429,7 +429,7 @@ if ( 'post' == $post_type || 'page' == $post_type ) { if ( 'post' == $post_type ) { $publish_box = '

' . __('Several boxes on this screen contain settings for how your content will be published, including:') . '

'; $publish_box .= '