522912 Create / Extend simple wordpress plugin

Currently I am using a simple Wordpress plugin in order to prevent duplicate post entries. It is a simple Wordpress function:


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."[url removed, login to view] ) AS max_id

FROM ".$prefix."posts

GROUP BY post_title


) AS good_rows ON ( good_rows.post_title = bad_rows.post_title

AND good_rows.max_id <> [url removed, login to view] )");


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.

But this doesn't delete the post-historie and also don't delete the attachments.

You have to rewrite the plugin so it uses wordpress functions and also delete all historie entries and all attachements.

Only a very small change.

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...

Beceriler: Her şey Kabul, Makale Yeniden Yazım, PHP, WordPress

Daha fazlasını gör: wordpress group, prefix function, simple query, wordpress create, extend php, rewrite function php, wordpress create post, wordpress function php, wordpress global post, query plugin wordpress, wordpress functions, query plugin database wordpress, duplicate wordpress plugin, wordpress duplicate title, wordpress select plugin, php database wordpress plugin, php simple order database, attachements, wordpress query database delete images, create autoblog, wordpress database entry, simple database entry php, simple order entry database, database entry wordpress, database using wordpress

İşveren Hakkında:
( 64 değerlendirme ) Köln, Germany

Proje NO: #2268850



That's the lowest I can go. Best regards.

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(217 Değerlendirme)