From 3086f189ccba742b9c3a0d4ae549d6f46dfb70a9 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 8 Jan 2014 04:06:01 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/includes/meta-boxes.php. Props SpencerFinnell for the initial patch. Fixes #26092. git-svn-id: https://develop.svn.wordpress.org/trunk@26918 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/meta-boxes.php | 73 +++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index e77c9ecc4f..01ac430433 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -42,6 +42,13 @@ 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' ); } @@ -198,13 +205,27 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> - +
- +
ID ) ) { @@ -282,7 +303,15 @@ function attachment_submit_meta_box( $post ) {
- +
@@ -525,7 +554,16 @@ function post_comment_status_meta_box($post) {


- +

- + 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) ) { @@ -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
- +