• I needed to clean up an RSS feed with multiple duplicated titles, I’ve been banging my head against a brick wall with it for weeks and nothing I tried worked reliably. This did the trick ??

    I needed an immediate check for duplicates on a post being published rather than the default hourly check (to stop an update automatically being sent to twitter by another plugin). Support from the author was brilliant and he supplied the needed changes which “just worked”. I include the changes below if anyone else needs them.

    ———————————————————-

    The add_action for ‘publish_post’ can go at the start of the dupe deleter’s php file, along with the ones already there – as long as it runs once, the line will always work.

    So you go from:

    // Add actions to define scheduled job and place settings menu on the Dashboard.
    add_action(‘my_expiry_job’, ‘do_TIEdupedeleter’);
    add_action(‘admin_menu’, ‘TIEdupedeleter_settings_page’);

    to:

    // Remove scheduled job, place settings menu on the Dashboard and hook dupe check to post publish.
    wp_clear_scheduled_hook(‘TIEdupedeleter_job’);
    add_action(‘publish_post’, ‘do_TIEdupedeleter’,10,2);
    add_action(‘admin_menu’, ‘TIEdupedeleter_settings_page’);

  • The topic ‘Does the job simply and easily’ is closed to new replies.