Hello!
Currently I am using a simple Wordpress plugin in order to prevent duplicate post entries. It is a simple Wordpress function:
<?php
function clearDuplicatePosts(){
global $wpdb;
$prefix = $wpdb->prefix;
$wpdb->query("DELETE bad_rows . * FROM ".$prefix."posts AS bad_rows INNER JOIN (
SELECT ".$prefix."posts.post_title, MAX( ".$prefix."[login to view URL] ) AS max_id
FROM ".$prefix."posts
GROUP BY post_title
HAVING COUNT( * ) >1
) AS good_rows ON ( good_rows.post_title = bad_rows.post_title
AND good_rows.max_id <> [login to view URL] )");
}
add_action('publish_post', 'clearDuplicatePosts');
?>
This plugin is used on an autoblog and deletes the old post with the same title, keeping the new one instead.
I want to adapt this plugin, to be able to delete the the attached images of the old post, not only the database entry. So, the old post should be deleted completely, including the attached images. That's it...
Wp Plugin Expert here, can make it happen right now... All payments through Milestone Payment (Escrow)... Online 16 Hours a day, Can start right away.. Thanks
*******Dear Sir, We are experts with similar expertise to your project requirement. We are very much interested & eager to provide professional and quality service for you. Please check private message to discuss further in this regard. Thank you.*******