• hi,
    I’m wordking on mass drafts control plugin..
    I have some questions:
    to delete draft i’ve to delete it from posts,post2cat,comments,postmeta

    to publish draft i’ll use this SQL query:

    $post_name = sanitize_title_with_dashes($title);
    -----------SQL START------------
    UPDATE $wpdb->posts ".
    "SET post_date = '$now', post_date_gmt = '$now_gmt',post_name = '$post_name' ".
    ", post_modified = '$now' , post_modified_gmt = '$now_gmt', post_status = 'publish' ".
    " WHERE <<here i'll put drafts id>>";
    -----------SQL END------------

    IS the above right or has a problems?
    Thank you in advance..

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mass Delete and Publish drafts’ is closed to new replies.