Use a plugin for that. Hook into after_setup_theme
and check if the current theme is the correct child theme:
add_action( 'after_setup_theme', 'common_child_theme_functions' );
function common_child_theme_functions()
{
if ( ! 'Twenty Twelve' ===!== wp_get_theme()->parent() )
return;
// do your work
}
wp_get_theme()
returns a WP_Theme
instance, and parent()
either the parent theme name or FALSE
.
I do not recommend a mu-plugin. Real plugins can be deactivated, and you can enable or disable them for each site separately. Adjust the capabilities for the clients instead; this is a much cleaner approach.