X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..888fa4ed68091f3314f711c5f6fe75858bf5410b:/wp-admin/includes/meta-boxes.php diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index cefa5a96..9f7f469a 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -42,11 +42,18 @@ if ( 'publish' == $post->post_status ) { $preview_button = __( 'Preview Changes' ); } else { $preview_link = set_url_scheme( get_permalink( $post->ID ) ); + /** + * Filter the URI of a post preview in the post submit box. + * + * @since 2.0.5 + * + * @param string $preview_link URI the user will be directed to for a post preview. + */ $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); $preview_button = __( 'Preview' ); } ?> - + @@ -55,7 +62,7 @@ if ( 'publish' == $post->post_status ) {
-
+
post_status ) { @@ -79,7 +86,7 @@ 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">
@@ -99,13 +106,13 @@ switch ( $post->post_status ) { - +
-
+
post_status ) { @@ -125,7 +132,7 @@ if ( 'private' == $post->post_status ) { echo esc_html( $visibility_trans ); ?> - +
@@ -138,12 +145,12 @@ echo esc_html( $visibility_trans ); ?> ID ) ); ?> />
/>
-
+
/>

- +

@@ -151,7 +158,7 @@ echo esc_html( $visibility_trans ); ?>
ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date @@ -174,7 +181,7 @@ if ( 0 != $post->ID ) { if ( ! empty( $args['args']['revisions_count'] ) ) : $revisions_to_keep = wp_revisions_to_keep( $post ); ?> -
+
0 && $revisions_to_keep <= $args['args']['revisions_count'] ) { echo ' +
-
+
- +
- +
- +
ID ) ) { @@ -273,16 +294,24 @@ function attachment_submit_meta_box( $post ) {
%1$s'); $date = date_i18n( $datef, strtotime( $post->post_date ) ); ?> -
+
- +
@@ -506,7 +535,7 @@ foreach ( $metadata as $key => $value ) { unset( $metadata[ $key ] ); } list_meta( $metadata ); -meta_form(); ?> +meta_form( $post ); ?>

use in your theme.'); ?>


- +

-

+

$post->ID, 'number' => 1, 'count' => true ) ); @@ -588,8 +626,9 @@ function post_comment_meta_box( $post ) { * @param object $post */ function post_slug_meta_box($post) { +/** This filter is documented in wp-admin/edit-tag-form.php */ ?> - + 0, ); + /** + * Filter the arguments used to generate a Pages drop-down element. + * + * @since 3.3.0 + * + * @see wp_dropdown_pages() + * + * @param array $dropdown_args Array of arguments used to generate the pages drop-down. + * @param WP_Post $post The current WP_Post object. + */ $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); $pages = wp_dropdown_pages( $dropdown_args ); if ( ! empty($pages) ) { @@ -656,7 +705,7 @@ function page_attributes_meta_box($post) { post_type && 0 != count( get_page_templates() ) ) { + if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) ) { $template = !empty($post->page_template) ? $post->page_template : false; ?>

@@ -702,7 +751,7 @@ function link_submit_meta_box($link) {
-
+
@@ -710,7 +759,10 @@ function link_submit_meta_box($link) {
- +
@@ -727,7 +779,14 @@ if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('m
- +
- + @@ -962,11 +1021,11 @@ function link_advanced_meta_box($link) { - + - + @@ -998,3 +1057,29 @@ 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 ); } + +/** + * Display fields for ID3 data + * + * @since 3.9.0 + * + * @param WP_Post $post + */ +function attachment_id3_data_meta_box( $post ) { + $meta = array(); + if ( ! empty( $post->ID ) ) { + $meta = wp_get_attachment_metadata( $post->ID ); + } + + foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) : ?> +

+
+ +

+