WordPress.org

Make WordPress Core

Ticket #18236: change-post_edit_form_tag_hook-from-action-to-filter.diff

File change-post_edit_form_tag_hook-from-action-to-filter.diff, 804 bytes (added by mikeschinkel, 3 years ago)

Change hook 'post_edit_form_tag' from an action to a filter

  • wp-admin/edit-form-advanced.php

     
    202202<?php if ( $message ) : ?> 
    203203<div id="message" class="updated"><p><?php echo $message; ?></p></div> 
    204204<?php endif; ?> 
    205 <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>> 
     205<form name="post" action="post.php" method="post" id="post"<?php echo apply_filters( 'post_edit_form_tag', '' ); ?>> 
    206206<?php wp_nonce_field($nonce_action); ?> 
    207207<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 
    208208<input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ) ?>" />