[wp-trac] [WordPress Trac] #28253: Cannot delete published post
WordPress Trac
noreply at wordpress.org
Sat Jun 14 13:33:21 UTC 2014
#28253: Cannot delete published post
-----------------------------------+------------------------------
Reporter: Parthiban Sagittarius | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 3.9.1
Severity: normal | Resolution: worksforme
Keywords: | Focuses:
-----------------------------------+------------------------------
Changes (by jigneshkaila):
* status: new => closed
* resolution: => worksforme
Comment:
Hi @Parthiban Sagittarius, thanks for the first bug report!
I have check with your code like below:
{{{
array(
'comment_status' => 'closed',
'ping_status' => 'closed',
'post_status' => 'publish',
'post_type' => 'post',
'post_title' => $posttitle,
'post_content' => $postcontent,
)
);
}}}
it not create any post with empty post_title and post_content.
Note: Please make sure $postcontent variable may overight with other
variable.
I have try with below example:
{{{
$post_id = wp_insert_post(
array(
'comment_status' => 'closed',
'ping_status' => 'closed',
'post_status' => 'publish',
'post_type' => 'post',
'post_title' => $posttitle,
'post_content' => 'This is my post.',
)
);
}}}
it's create post with "(no title)" I mean empty title.
after creation we also delete from admin panel. it's working fine for me.
Please confirm if $postcontent variable should not be overight, let me
know for the same.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28253#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list