Give plugins the ability to do extra processing on a post before it is inserted/updated. See #5196.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-08-13 05:53:48 +00:00
parent 94ad9a773f
commit fa410bb8f4
3 changed files with 3 additions and 0 deletions

View File

@ -147,6 +147,7 @@ if ( 0 != $post_ID ) {
</div>
<p class="submit">
<?php do_action('post_submitbox_start'); ?>
<input type="submit" name="save" id="save-post" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
<?php
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {

View File

@ -123,6 +123,7 @@ if ( 0 != $post_ID ) {
</div>
<p class="submit">
<?php do_action('page_submitbox_start'); ?>
<input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" />
<?php
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {

View File

@ -1428,6 +1428,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
// expected_slashed (everything!)
$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) );
$data = apply_filters('wp_insert_post', $data, $postarr);
$data = stripslashes_deep( $data );
$where = array( 'ID' => $post_ID );