Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context for Media #9

Closed
4 of 6 tasks
frankiejarrett opened this issue Nov 27, 2013 · 4 comments
Closed
4 of 6 tasks

Add context for Media #9

frankiejarrett opened this issue Nov 27, 2013 · 4 comments
Assignees
Milestone

Comments

@frankiejarrett
Copy link
Contributor

Media actions should be added as a core context of the Stream plugin.

Possible actions:

  • Added
  • Attached
  • Unattached
  • Updated
  • Edited (images have an edit mode)
  • Deleted
@ghost ghost assigned shadyvb Nov 28, 2013
@shadyvb
Copy link
Contributor

shadyvb commented Dec 5, 2013

WIP 6bd7779

@shadyvb
Copy link
Contributor

shadyvb commented Dec 7, 2013

@fjarrett There is currently no way of detecting the 'attached' action, see: https://github.com/WordPress/WordPress/blob/0e959f06dce1040c88bf2aa729a947732197ff49/wp-admin/upload.php#L55
The only available way would be to track wp_redirect or _REQUEST on all requests, which sounds too much to me.

Also there is no such action as 'deattached', i'm unable to deattach an attachment from a post, neither from the post gallery dialog nor from the media library, also it doesn't have any trace in the referenced file.

@frankiejarrett
Copy link
Contributor Author

@shadyvb Sad news! Well we will have to live without these for now. Closing the issue.

Are there hook placements that we can suggest for capturing these? If so, we should open a Trac ticket for it.

@shadyvb
Copy link
Contributor

shadyvb commented Dec 8, 2013

@fjarrett As for the 'attach' action, yes i think we can suggest a hook at https://github.com/WordPress/WordPress/blob/master/wp-admin/upload.php?source=c#L76 , something like do_action( 'media_attached', $attach, $parent_id ). It'll probably need to be called as well on the media upload dialog from post edit screen, probably here: https://github.com/WordPress/WordPress/blob/master/wp-admin/async-upload.php?source=c#L82

But for the unattach action, AFAIK it doesn't really exist at all!

What i would really want to push for is to add hooks for filesystem operations, like delete and edit.

frankiejarrett added a commit that referenced this issue Aug 22, 2014
Changing strings to be related to Reports Plugin
frankiejarrett added a commit that referenced this issue Aug 22, 2014
Stream Cloud Database Adaptor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants