[wp-trac] [WordPress Trac] #11207: WordPress may display incorrect message when post is saved/published/etc
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 29 02:04:41 UTC 2010
#11207: WordPress may display incorrect message when post is saved/published/etc
----------------------------+-----------------------------------------------
Reporter: sirzooro | Owner: bsamrajni
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.0
Component: Administration | Version: 2.9
Severity: normal | Keywords: has-patch
----------------------------+-----------------------------------------------
Changes (by blepoxp):
* keywords: has-patch needs-testing => has-patch
Comment:
I did a little more testing, I think this is the best solution. The code
was always taking the final post status into account correctly. The
problem was that it also assumed that if $_POST[ 'publish' ] was set, the
status would not be draft.
I tested it by placing the following code in twentyten's functions.php and
changing the status. It works correctly for all possible stati:
{{{
function change_status( $data ) {
$data['post_status'] = 'publish';
return $data;
}
add_filter( 'wp_insert_post_data', 'change_status' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11207#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list