// hide admin toolbar add_filter('show_admin_bar', '__return_false'); // SECURITY STUFF // no author pages add_action('template_redirect', 'pirth_template_redirect'); function pirth_template_redirect() { if (is_author()) { wp_redirect(home_url()); exit; } } // clean up wp_head add_action('init', 'pirth_clean_head'); function pirth_clean_head(){ remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'start_post_rel_link'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'adjacent_posts_rel_link'); remove_action('wp_head', 'print_emoji_detection_script'); // find VC meta tag action name global $wp_filter; foreach (array_keys($wp_filter['wp_head'][10]) as $a){ if (strpos($a, "addMetaData") !== false){ remove_action('wp_head', $a); } } } // add categories to attachments add_action( 'init' , 'pirth_add_categories_to_attachments' ); function pirth_add_categories_to_attachments() { register_taxonomy_for_object_type( 'category', 'attachment' ); } // header/footer inserts include_once('addons/headerfooter.php'); // page container toggle include_once('addons/containpage.php'); ?>