X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6c8f14c09105d0afa4c1574215c59b5021040e76..a349837896628462bf8c9bdc27d1477a10fe03eb:/wp-admin/includes/meta-boxes.php diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 2b0b2864..e77c9ecc 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -9,7 +9,7 @@ * * @param object $post */ -function post_submit_meta_box($post) { +function post_submit_meta_box($post, $args = array() ) { global $action; $post_type = $post->post_type; @@ -55,7 +55,7 @@ if ( 'publish' == $post->post_status ) {
-
+
post_status ) { @@ -99,13 +99,13 @@ switch ( $post->post_status ) { - +
-
+
post_status ) { @@ -138,12 +138,12 @@ echo esc_html( $visibility_trans ); ?> ID ) ); ?> />
/>
-
+
/>

- +

@@ -171,8 +171,26 @@ 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 ); +?> +
+ 0 && $revisions_to_keep <= $args['args']['revisions_count'] ) { + echo ''; + printf( __( 'Revisions: %s' ), '' . number_format_i18n( $args['args']['revisions_count'] ) . '+' ); + echo ''; + } else { + printf( __( 'Revisions: %s' ), '' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); + } +?> + +
+ -
+
@@ -260,7 +278,7 @@ function attachment_submit_meta_box( $post ) { $stamp = __('Uploaded on: %1$s'); $date = date_i18n( $datef, strtotime( $post->post_date ) ); ?> -
+
@@ -315,9 +333,9 @@ function post_format_meta_box( $post, $box ) { $post_formats[0][] = $post_format; ?>
- /> + /> -
/> +
/>
cap->assign_terms) ? 'disabled="disabled"' : ''; + $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms ); $comma = _x( ',', 'tag delimiter' ); ?>

labels->add_or_remove_items; ?>

-
- cap->assign_terms) ) : ?> +
+
labels->add_new_item; ?>

-

labels->separate_items_with_commas ); ?>

+

labels->separate_items_with_commas; ?>

-cap->assign_terms) ) : ?> +

labels->choose_from_most_used; ?>

$value ) { unset( $metadata[ $key ] ); } list_meta( $metadata ); -meta_form(); ?> +meta_form( $post ); ?>

use in your theme.'); ?>

-

+

$post->ID, 'number' => 1, 'count' => true ) ); @@ -602,8 +620,8 @@ function post_author_meta_box($post) { * * @param object $post */ -function post_revisions_meta_box($post) { - wp_list_post_revisions(); +function post_revisions_meta_box( $post ) { + wp_list_post_revisions( $post ); } // -- Page related Meta Boxes @@ -684,7 +702,7 @@ function link_submit_meta_box($link) {
-
+
@@ -944,11 +962,11 @@ function link_advanced_meta_box($link) { - + - + @@ -979,4 +997,4 @@ function link_advanced_meta_box($link) { function post_thumbnail_meta_box( $post ) { $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); echo _wp_post_thumbnail_html( $thumbnail_id, $post->ID ); -} \ No newline at end of file +}