Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #49614


Ignore:
Timestamp:
03/10/2020 01:27:34 PM (5 years ago)
Author:
jonoaldersonwp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49614 – Description

    initial v1  
    77At the moment, there's no way for plugins or integrations to take action based on these events; making it incredibly difficult to alter or add to the behaviour or outcomes of these processes.
    88
    9 Specifically, it limits the ability to maintain an up-to-date overview of the relationships between posts and their attachments.
    10 
    119To address this, **we should add an action hook following the successful execution of the query** (i.e., if `$results` returns true), using either of the following approaches:
    1210  - `do_action('wp_media_attach_action', $attach, $attachment_id, $parent_id)` (where `$attach` is `true` for 'attach' actions, and `false` for 'detach' actions); OR