WordPress.org

Make WordPress Core

Changeset 26918


Ignore:
Timestamp:
01/08/2014 04:06:01 AM (7 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/includes/meta-boxes.php.

Props SpencerFinnell for the initial patch.
Fixes #26092.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r26834 r26918  
    4343} else {
    4444    $preview_link = set_url_scheme( get_permalink( $post->ID ) );
     45    /**
     46     * Filter the URI of a post preview in the post submit box.
     47     *
     48     * @since 2.0.5
     49     *
     50     * @param string $preview_link URI the user will be directed to for a post preview.
     51     */
    4552    $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) );
    4653    $preview_button = __( 'Preview' );
     
    199206<?php endif; ?>
    200207
    201 <?php do_action('post_submitbox_misc_actions'); ?>
     208<?php
     209/**
     210 * Fires after the post time/date setting in the Publish meta box.
     211 *
     212 * @since 2.9.0
     213 */
     214do_action( 'post_submitbox_misc_actions' );
     215?>
    202216</div>
    203217<div class="clear"></div>
     
    205219
    206220<div id="major-publishing-actions">
    207 <?php do_action('post_submitbox_start'); ?>
     221<?php
     222/**
     223 * Fires at the beginning of the publishing actions section of the Publish meta box.
     224 *
     225 * @since 2.7.0
     226 */
     227do_action( 'post_submitbox_start' );
     228?>
    208229<div id="delete-action">
    209230<?php
     
    283304    </div><!-- .misc-pub-section -->
    284305
    285     <?php do_action('attachment_submitbox_misc_actions'); ?>
     306    <?php
     307    /**
     308     * Fires after the 'Uploaded on' section of the Save meta box
     309     * in the attachment editing screen.
     310     *
     311     * @since 3.5.0
     312     */
     313    do_action( 'attachment_submitbox_misc_actions' );
     314    ?>
    286315</div><!-- #misc-publishing-actions -->
    287316<div class="clear"></div>
     
    526555    <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e( 'Allow comments.' ) ?></label><br />
    527556    <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php printf( __( 'Allow <a href="%s" target="_blank">trackbacks and pingbacks</a> on this page.' ), __( 'http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) ); ?></label>
    528     <?php do_action('post_comment_status_meta_box-options', $post); ?>
     557    <?php
     558    /**
     559     * Fires at the end of the Discussion meta box on the post editing screen.
     560     *
     561     * @since 3.1.0
     562     *
     563     * @param WP_Post $post WP_Post object of the current post.
     564     */
     565    do_action( 'post_comment_status_meta_box-options', $post );
     566    ?>
    529567</p>
    530568<?php
     
    589627 */
    590628function post_slug_meta_box($post) {
    591 ?>
    592 <label class="screen-reader-text" for="post_name"><?php _e('Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( apply_filters('editable_slug', $post->post_name) ); ?>" />
     629/** This filter is documented in wp-admin/edit-tag-form.php */
     630?>
     631<label class="screen-reader-text" for="post_name"><?php _e('Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( apply_filters( 'editable_slug', $post->post_name ) ); ?>" />
    593632<?php
    594633}
     
    647686        );
    648687
     688        /**
     689         * Filter the arguments used to generate a Pages drop-down element.
     690         *
     691         * @since 3.3.0
     692         *
     693         * @see wp_dropdown_pages()
     694         *
     695         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
     696         * @param WP_Post $post          The current WP_Post object.
     697         */
    649698        $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
    650699        $pages = wp_dropdown_pages( $dropdown_args );
     
    711760
    712761<div id="major-publishing-actions">
    713 <?php do_action('post_submitbox_start'); ?>
     762<?php
     763/** This action is documented in wp-admin/includes/meta-boxes.php */
     764do_action( 'post_submitbox_start' );
     765?>
    714766<div id="delete-action">
    715767<?php
     
    728780<div class="clear"></div>
    729781</div>
    730 <?php do_action('submitlink_box'); ?>
     782<?php
     783/**
     784 * Fires at the end of the Publish box in the Link editing screen.
     785 *
     786 * @since 2.5.0
     787 */
     788do_action( 'submitlink_box' );
     789?>
    731790<div class="clear"></div>
    732791</div>
Note: See TracChangeset for help on using the changeset viewer.