I’m using the Thematic framework for a child theme. It has a number of hooks, but I’m looking at thematic_header() in particular. The thematic_header() hook adds the following actions (through add_action):
<?php
add_action('thematic_header', 'thematic_brandingopen', 1);
add_action('thematic_header', 'thematic_blogtitle', 3);
add_action('thematic_header', 'thematic_blogdescription', 5);
add_action('thematic_header', 'thematic_brandingclose', 7);
add_action('thematic_header', 'thematic_access', 9);
?>
The content of the actions is irrelevant.
My question is this: How can I change the priorities of the five actions in question. For instance, I want thematic_access() to load before thematic_brandingopen(). Only way to do this that I’ve been able to figure out is by removing and re-adding the actions, ala:
<?php
function remove_thematic_actions() {
remove_action('thematic_header', 'thematic_access');
add_action('thematic_header', 'thematic_access', 0); //puts it above thematic_brandingopen
}
add_action ('init', 'remove_thematic_actions');
That seems like a stupid way of accomplishing something very simple. Is there a way to access and sort/reorder whatever data structure stores actions in WP?
From WordPress
So I think you can first remove using following
and the add again using different
priority