Justin Tadlock recently wrote a great post about making a better functions.php file
where (if I remember correctly) he deals with this exact issue.
Unfortunately his site is down at the moment so I have to rely on my memory for now.
You are on the right track with the after_setup_theme
hook.
- As far as I remember the trick is to wrap your filters and actions into it’s function.
See example below. - You do that in both parent and child
functions.php
files. - Then you can play with the priority of these two hooks.
Little bit of code worth thousand words – your parent theme’s function.php
should look like this:
add_action( 'after_setup_theme', 'your_parent_theme_setup', 9 );
function your_parent_theme_setup() {
add_action(admin_init, your_admin_init);
add_filter(the_content, your_content_filter);
}
function your_admin_init () {
...
}
function your_content_filter() {
...
}