X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..ef91a7f4f3c6468973e192335a27ec0e0faca0b5:/wp-admin/includes/meta-boxes.php diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 1627b1f5..c26ced42 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -13,7 +13,7 @@ * @param array $args { * Array of arguments for building the post submit meta box. * - * @type string $id Meta box ID. + * @type string $id Meta box 'id' attribute. * @type string $title Meta box title. * @type callable $callback Meta box display callback. * @type array $args Extra meta box arguments. @@ -32,7 +32,7 @@ function post_submit_meta_box( $post, $args = array() ) {
- +
@@ -74,9 +74,9 @@ do_action( 'post_submitbox_minor_actions', $post );
-
- - + post_status ) { case 'private': _e('Privately Published'); @@ -98,11 +98,12 @@ switch ( $post->post_status ) { ?> post_status || 'private' == $post->post_status || $can_publish ) { ?> -post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js"> +post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" role="button">
- post_status ) : ?> post_status, 'publish' ); ?> value='publish'> post_status ) : ?> @@ -144,7 +145,7 @@ if ( 'private' == $post->post_status ) { echo esc_html( $visibility_trans ); ?> - +
@@ -157,7 +158,7 @@ echo esc_html( $visibility_trans ); ?> ID ) ); ?> />
/>
-
+
/>

@@ -170,18 +171,22 @@ echo esc_html( $visibility_trans ); ?>

ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + /* translators: Post date information. 1: Date on which the post is currently scheduled to be published */ $stamp = __('Scheduled for: %1$s'); } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published + /* translators: Post date information. 1: Date on which the post was published */ $stamp = __('Published on: %1$s'); } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified $stamp = __('Publish immediately'); } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + /* translators: Post date information. 1: Date on which the post is to be published */ $stamp = __('Schedule for: %1$s'); } else { // draft, 1 or more saves, date specified + /* translators: Post date information. 1: Date on which the post is to be published */ $stamp = __('Publish on: %1$s'); } $date = date_i18n( $datef, strtotime( $post->post_date ) ); @@ -190,20 +195,12 @@ if ( 0 != $post->ID ) { $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); } -if ( ! empty( $args['args']['revisions_count'] ) ) : - $revisions_to_keep = wp_revisions_to_keep( $post ); -?> +if ( ! empty( $args['args']['revisions_count'] ) ) : ?>
- 0 && $revisions_to_keep <= $args['args']['revisions_count'] ) { - echo ''; - printf( __( 'Revisions: %s' ), '' . number_format_i18n( $args['args']['revisions_count'] ) . '+' ); - echo ''; - } else { + ' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); - } -?> + ?>
- +
@@ -263,14 +260,14 @@ if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 if ( $can_publish ) : if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> - + - + - + @@ -301,14 +298,15 @@ function attachment_submit_meta_box( $post ) {
- +
%1$s'); $date = date_i18n( $datef, strtotime( $post->post_date ) ); ?> @@ -334,7 +332,7 @@ function attachment_submit_meta_box( $post ) { ID ) ) if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { - echo "" . __( 'Trash' ) . ""; + echo "" . _x( 'Trash', 'verb' ) . ""; } else { $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; echo "" . __( 'Delete Permanently' ) . ""; @@ -345,7 +343,7 @@ function attachment_submit_meta_box( $post ) {
- +
@@ -364,7 +362,7 @@ function attachment_submit_meta_box( $post ) { * @param array $box { * Post formats meta box arguments. * - * @type string $id Meta box ID. + * @type string $id Meta box 'id' attribute. * @type string $title Meta box title. * @type callable $callback Meta box display callback. * @type array $args Extra meta box arguments. @@ -405,7 +403,7 @@ function post_format_meta_box( $post, $box ) { * @param array $box { * Tags meta box arguments. * - * @type string $id Meta box ID. + * @type string $id Meta box 'id' attribute. * @type string $title Meta box title. * @type callable $callback Meta box display callback. * @type array $args { @@ -441,16 +439,18 @@ function post_tags_meta_box( $post, $box ) {
-

+

labels->separate_items_with_commas; ?>

+ +

labels->no_terms; ?>

-

labels->choose_from_most_used; ?>

+

-

Learn more about manual excerpts.'); ?>

+

Learn more about manual excerpts.' ), + __( 'https://codex.wordpress.org/Excerpt' ) + ); +?>

to_ping) ) .'" />'; + $form_trackback = 'to_ping ) ) . '" aria-describedby="trackback-url-desc" />'; if ('' != $post->pinged) { $pings = '

'. __('Already pinged:') . '

    '; $already_pinged = explode("\n", trim($post->pinged)); @@ -603,8 +610,18 @@ function post_trackback_meta_box($post) { } ?> -


    ()

    -

    pingbacks, no other action necessary.'); ?>

    +

    + + +

    +

    +

    pingbacks, no other action necessary.' ), + __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) + ); +?>

    $value ) { list_meta( $metadata ); meta_form( $post ); ?>
-

use in your theme.'); ?>

+

use in your theme.' ), + __( 'https://codex.wordpress.org/Using_Custom_Fields' ) + ); +?>


- + 'authors', 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author, - 'include_selected' => true + 'include_selected' => true, + 'show' => 'display_name_with_login', ) ); } @@ -767,8 +796,7 @@ function post_revisions_meta_box( $post ) { * @param object $post */ function page_attributes_meta_box($post) { - $post_type_object = get_post_type_object($post->post_type); - if ( $post_type_object->hierarchical ) { + if ( is_post_type_hierarchical( $post->post_type ) ) : $dropdown_args = array( 'post_type' => $post->post_type, 'exclude_tree' => $post->ID, @@ -780,7 +808,7 @@ function page_attributes_meta_box($post) { ); /** - * Filter the arguments used to generate a Pages drop-down element. + * Filters the arguments used to generate a Pages drop-down element. * * @since 3.3.0 * @@ -791,20 +819,20 @@ function page_attributes_meta_box($post) { */ $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); $pages = wp_dropdown_pages( $dropdown_args ); - if ( ! empty($pages) ) { + if ( ! empty($pages) ) : ?> -

- +

post_type && 0 != count( get_page_templates( $post ) ) && get_option( 'page_for_posts' ) != $post->ID ) { - $template = !empty($post->page_template) ? $post->page_template : false; + endif; // end empty pages check + endif; // end hierarchical check. + + if ( count( get_page_templates( $post ) ) > 0 && get_option( 'page_for_posts' ) != $post->ID ) : + $template = ! empty( $post->page_template ) ? $post->page_template : false; ?> -

- - +post_type ); ?> - -

-

-post_type && get_current_screen()->get_help_tabs() ) { ?> -

- +post_type, 'page-attributes' ) ) : ?> +

+ +post_type && get_current_screen()->get_help_tabs() ) : ?> +

+
- +
@@ -891,9 +919,9 @@ if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('m
link_id) ) { ?> - + - +
@@ -995,7 +1023,7 @@ function xfn_check( $class, $value = '', $deprecated = '' ) { global $link; if ( !empty( $deprecated ) ) - _deprecated_argument( __FUNCTION__, '0.0' ); // Never implemented + _deprecated_argument( __FUNCTION__, '0.0.0' ); // Never implemented $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; $rels = preg_split('/\s+/', $link_rel); @@ -1173,6 +1201,8 @@ function link_advanced_meta_box($link) { * Display post thumbnail meta box. * * @since 2.9.0 + * + * @param WP_Post $post A post object. */ function post_thumbnail_meta_box( $post ) { $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); @@ -1184,7 +1214,7 @@ function post_thumbnail_meta_box( $post ) { * * @since 3.9.0 * - * @param WP_Post $post + * @param WP_Post $post A post object. */ function attachment_id3_data_meta_box( $post ) { $meta = array();