Make WordPress Core

Ticket #26092: 26092.patch

File 26092.patch, 5.3 KB (added by SpencerFinnell, 12 years ago)
  • wp-admin/includes/meta-boxes.php

    diff --git wp-admin/includes/meta-boxes.php wp-admin/includes/meta-boxes.php
    index 357fec8..8ebfc57 100644
    if ( 'publish' == $post->post_status ) { 
    4242        $preview_button = __( 'Preview Changes' );
    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.11
     49         *
     50         * @param string $preview_link The URI the user will be directed to.
     51         */
    4552        $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) );
    4653        $preview_button = __( 'Preview' );
    4754}
    if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> 
    198205</div><?php // /misc-pub-section ?>
    199206<?php endif; ?>
    200207
    201 <?php do_action('post_submitbox_misc_actions'); ?>
     208<?php
     209/**
     210 * Fires after post miscellaneous actions.
     211 *
     212 * @since 2.9
     213 */
     214do_action('post_submitbox_misc_actions');
     215?>
    202216</div>
    203217<div class="clear"></div>
    204218</div>
    205219
    206220<div id="major-publishing-actions">
    207 <?php do_action('post_submitbox_start'); ?>
     221<?php
     222/**
     223 * Fires before the post submit actions.
     224 *
     225 * @since 2.7
     226 */
     227do_action('post_submitbox_start');
     228?>
    208229<div id="delete-action">
    209230<?php
    210231if ( current_user_can( "delete_post", $post->ID ) ) {
    function attachment_submit_meta_box( $post ) { 
    282303                <span id="timestamp"><?php printf($stamp, $date); ?></span>
    283304        </div><!-- .misc-pub-section -->
    284305
    285         <?php do_action('attachment_submitbox_misc_actions'); ?>
     306        <?php
     307        /**
     308         * Fires after attachment miscellaneous actions.
     309         *
     310         * @since 3.5
     311         */
     312        do_action('attachment_submitbox_misc_actions');
     313        ?>
    286314</div><!-- #misc-publishing-actions -->
    287315<div class="clear"></div>
    288316</div><!-- #minor-publishing -->
    function post_comment_status_meta_box($post) { 
    525553<p class="meta-options">
    526554        <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 />
    527555        <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); ?>
     556        <?php
     557        /**
     558         * Fires after attachment miscellaneous actions.
     559         *
     560         * @since 3.1
     561         *
     562         * @param object $post The current post being edited.
     563         */
     564        do_action('post_comment_status_meta_box-options', $post);
     565        ?>
    529566</p>
    530567<?php
    531568}
    function post_comment_meta_box( $post ) { 
    588625 * @param object $post
    589626 */
    590627function post_slug_meta_box($post) {
     628/**
     629 * Filter the editable slug value in the slug form field.
     630 *
     631 * @since 2.6
     632 *
     633 * @param string $post->post_name The post name.
     634 */
    591635?>
    592636<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) ); ?>" />
    593637<?php
    function page_attributes_meta_box($post) { 
    646690                        'echo'             => 0,
    647691                );
    648692
     693                /**
     694                 * Filter the arguments for Pages dropdown when assigning a page parent.
     695                 *
     696                 * @since 3.3
     697                 *
     698                 * @param array $dropdown_args {
     699                 *     Optional. Override default arguments.
     700                 *
     701                 *     @type string $post_type The type of post to retreive. Must be hierarchical.
     702                 *     @type int $exclude_tree Define a parent Page ID to be excluded. Use this parameter to exclude a parent and all of that parent's child Pages.
     703                 *     @type int $selected Page ID of the page to be 'selected' or presented in the display box.
     704                 *     @type string $name Name assigned to the dropdown form.
     705                 *     @type string $show_option_none Causes the HTML for the dropdown to allow you to select NONE of the pages. If not empty, this string will be used as the option text.
     706                 *     @type string $sort_column Which column(s) to sort the results by. Comma separated.
     707                 *     @type int $echo Toggles the display of the generated list of links or return the list as an HTML text string to be used in PHP.
     708                 * }
     709                 * @param object $post The current post object.
     710                 */
    649711                $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
    650712                $pages = wp_dropdown_pages( $dropdown_args );
    651713                if ( ! empty($pages) ) {
    function link_submit_meta_box($link) { 
    710772</div>
    711773
    712774<div id="major-publishing-actions">
    713 <?php do_action('post_submitbox_start'); ?>
     775<?php
     776/** This action is documented in wp-admin/includes/meta-boxes.php */
     777do_action('post_submitbox_start');
     778?>
    714779<div id="delete-action">
    715780<?php
    716781if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>
    if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('m 
    727792</div>
    728793<div class="clear"></div>
    729794</div>
    730 <?php do_action('submitlink_box'); ?>
     795<?php
     796/**
     797 * Fires after major publishing actions when adding a link.
     798 *
     799 * @since 2.5
     800 */
     801do_action('submitlink_box');
     802?>
    731803<div class="clear"></div>
    732804</div>
    733805<?php