WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/19/2013 09:10:51 PM (7 years ago)
Author:
nacin
Message:

Pass $post to hooks in edit-form-advanced.php including edit_form_advanced and edit_form_after_*. fixes #24611.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r24388 r24446  
    152152    add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core');
    153153
    154 do_action('dbx_post_advanced');
     154do_action('dbx_post_advanced', $post);
    155155if ( post_type_supports($post_type, 'comments') )
    156156    add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core');
     
    317317</div>
    318318
    319 <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>>
     319<form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag', $post); ?>>
    320320<?php wp_nonce_field($nonce_action); ?>
    321321<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
     
    379379if ( has_action( 'edit_form_after_title' ) ) {
    380380    echo '<div class="edit-form-section">';
    381     do_action( 'edit_form_after_title' );
     381    do_action( 'edit_form_after_title', $post );
    382382    echo '</div>';
    383383}
     
    415415if ( has_action( 'edit_form_after_editor' ) ) {
    416416    echo '<div class="edit-form-section">';
    417     do_action( 'edit_form_after_editor' );
     417    do_action( 'edit_form_after_editor', $post );
    418418    echo '</div>';
    419419}
     
    425425
    426426if ( 'page' == $post_type )
    427     do_action('submitpage_box');
     427    do_action('submitpage_box', $post);
    428428else
    429     do_action('submitpost_box');
     429    do_action('submitpost_box', $post);
    430430
    431431do_meta_boxes($post_type, 'side', $post);
     
    439439
    440440if ( 'page' == $post_type )
    441     do_action('edit_page_form');
     441    do_action('edit_page_form', $post);
    442442else
    443     do_action('edit_form_advanced');
     443    do_action('edit_form_advanced', $post);
    444444
    445445do_meta_boxes(null, 'advanced', $post);
     
    449449<?php
    450450
    451 do_action('dbx_post_sidebar');
     451do_action('dbx_post_sidebar', $post);
    452452
    453453?>
Note: See TracChangeset for help on using the changeset viewer.