WordPress.org

Support

Support » Plugins and Hacks » Hacks » Update Function for Post_Date via a Filter or Action ?

Update Function for Post_Date via a Filter or Action ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • bcworkz
    Participant

    @bcworkz

    Hook the filter ‘wp_insert_post_data’. Your function will be passed an array which in part has the date fields. You will want to change the array values for the keys ‘post_date’ and ‘post_date_gmt’. Then return the altered array.

    Thanks a lot !!! Exactly what I needed to get it done 🙂

    Driftless
    Member

    @driftless1

    Shameless plugin plug

    Along the same lines – I just released a plugin that does this (updates post dates to attached photo’s EXIF date) in bulk for the post type of your choosing: EXIFize My Dates

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Update Function for Post_Date via a Filter or Action ?’ is closed to new replies.