WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #15327, comment 13


Ignore:
Timestamp:
01/20/12 20:31:27 (4 years ago)
Author:
ryan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15327, comment 13

    initial v1  
    1 We were split on whether use pure actions or a whitelist of core action that would be directly called.  This patch is something of a compromise. The core actions are added from a list after admin_init. This means the core actions cannot be removed easily using remove_action(). The core actions are added with priority 1. For a plugin to override they would have to explicitly use priority 0. These couple of hoops might at least make plugin authors a bit wary of overriding core ajax actions. 
     1We were split on whether to use pure actions or a whitelist of core action that would be directly called.  This patch is something of a compromise. The core actions are added from a list after admin_init. This means the core actions cannot be removed easily using remove_action(). The core actions are added with priority 1. For a plugin to override they would have to explicitly use priority 0. These couple of hoops might at least make plugin authors a bit wary of overriding core ajax actions. 
    22 
    33This approach could easily be converted from using add_action() to directly calling the core actions.