[wp-trac] [WordPress Trac] #21331: Allow dashboard and welcome panel to be filtered and modified
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 26 00:04:08 UTC 2012
#21331: Allow dashboard and welcome panel to be filtered and modified
---------------------------+------------------------------
Reporter: martythornley | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: UI | Version:
Severity: normal | Resolution:
Keywords: has-patch |
---------------------------+------------------------------
Comment (by martythornley):
Replying to [comment:6 nacin]:
> If you look through default-filters.php, this is a fairly standard
design pattern in core.
That all assumes no one else has tied into it either. If several
plugins/themes have added their own functions you need to find what those
hooked actions are then remove them all. Whereas if the name of the
function for the whole thing can be filtered, you can change it in one
line and just adjust priority.
I think they are two different ideas, just depending on how much control
you want to give developers and how easy you want to make it on them. One
lets you swap the function as a whole, the other just lets plugins tack
their two cents on at a specific spot.
Maybe the do_action( 'welcome_panel' ); could exist in the
'wp_welcome_panel' function and plugins could just add a little there.
That way you could either just add a little widget or section to the
existing panel.
Then if a plugins has swapped out the function as a whole, they could
include all the hooked actions in their new function by adding the
do_action( 'welcome_panel' ) in the right spot to allow others to add on.
Same as if you want your theme to work correctly you need to include the
wp_head();
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21331#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list