Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #28774, comment 2


Ignore:
Timestamp:
08/22/2014 04:14:30 AM (10 years ago)
Author:
jshreve
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28774, comment 2

    initial v1  
    44There are a few places where we are embedding stuff from core (like the media manager or wplink) on NewDash (WordPress.com / blog id 1) - for example in the new posting experience at WordPress.com/post/.
    55
    6 To embed/use the functionality outside of wp-admin we pass in a blog ID to the ajax call and unhook some of the wp_ajax_* hooks, switch_to_blog; cap check, call the wp_ajax_* function, restore_current_blog.
     6To embed/use the functionality outside of wp-admin we pass in a blog ID to the ajax call and unhook some of the wp_ajax_* hooks, rehook with switch_to_blog; cap check, call the wp_ajax_* function, restore_current_blog.
    77
    88I don't think I ended up needing to do anything with wp_ajax_upload_attachment itself - but I think the patch is still valid (its the only wp_ajax_* action you can't touch with hooks).