Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ramon fincken

    (@ramon-fincken)

    I am looking into WP_query,

    if you are in a hurry feel free to change this while loop

    if ($post_date_plus_visibleperiod < $now) {
    							// GOGOGO !
    							$this->delete_post_and_attachments($post->ID,$force_delete);
    
    							// Mail admin?
    							if(!empty($this->conf['settings']['admin_email']))
    							{
    								$body = "Deleting post ID : ".$post->ID. "\n";
    								$body .= "Post title : ".$post->post_title. "\n";
    								$body .= "Settings (Delete or Trash) : ".( ($force_delete) ? 'Delete' : 'Trash' ). "\n";
    								wp_mail($this->conf['settings']['admin_email'],'Plugin auto prune posts notification',$body);
    							}
    						}

    adding an if statement based on post->comment_count

    Plugin Author ramon fincken

    (@ramon-fincken)

    I’ve written a patch for WordPress Core and hope to submit it real soon.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Auto remove non commented posts’ is closed to new replies.