76 lines
2.8 KiB
PHP
76 lines
2.8 KiB
PHP
<?php
|
|
|
|
// function file for mfwpt
|
|
|
|
// enqueue the stye
|
|
|
|
function mytheme_enqueue_style() {
|
|
wp_enqueue_style( 'style', get_stylesheet_uri() );
|
|
}
|
|
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_style' );
|
|
|
|
//set up the menus
|
|
|
|
function register_my_menus() {
|
|
register_nav_menus(
|
|
array(
|
|
'header-menu' => __( 'Header Menu' ),
|
|
'extra-menu' => __( 'Extra Menu' )
|
|
)
|
|
);
|
|
} // register_my_menus
|
|
add_action( 'init', 'register_my_menus' );
|
|
|
|
// remove unused word press features from header
|
|
|
|
function remove_actions_parent_theme() {
|
|
// remove_action('wp_head', 'rsd_link');
|
|
// remove_action('wp_head', 'wp_generator');
|
|
// remove_action('wp_head', 'feed_links', 2);
|
|
// remove_action('wp_head', 'index_rel_link');
|
|
// remove_action('wp_head', 'wlwmanifest_link');
|
|
// remove_action('wp_head', 'feed_links_extra', 3);
|
|
// remove_action('wp_head', 'start_post_rel_link', 10, 0);
|
|
// remove_action('wp_head', 'parent_post_rel_link', 10, 0);
|
|
// remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
|
|
wp_dequeue_style( 'wp-block-library' );
|
|
wp_dequeue_style( 'wp-block-library-theme' );
|
|
wp_dequeue_style( 'wc-block-style' );
|
|
wp_dequeue_style( 'global-styles' );
|
|
|
|
remove_action( 'wp_head', '_wp_render_title_tag', 1);
|
|
// remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
|
|
remove_action( 'wp_head', 'wp_resource_hints', 2);
|
|
remove_action( 'wp_head', 'feed_links', 2);
|
|
remove_action( 'wp_head', 'feed_links_extra', 3);
|
|
remove_action( 'wp_head', 'rsd_link');
|
|
remove_action( 'wp_head', 'wlwmanifest_link');
|
|
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
|
|
remove_action( 'wp_head', 'locale_stylesheet');
|
|
remove_action( 'wp_head', 'noindex', 1);
|
|
remove_action( 'wp_head', 'print_emoji_detection_script', 7);
|
|
//remove_action( 'wp_head', 'wp_print_styles', 8 );
|
|
remove_action( 'wp_head', 'wp_print_head_scripts', 9);
|
|
remove_action( 'wp_head', 'wp_generator');
|
|
remove_action( 'wp_head', 'rel_canonical');
|
|
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0);
|
|
remove_action( 'wp_head', 'wp_custom_css_cb', 101);
|
|
remove_action( 'wp_head', 'wp_site_icon', 99);
|
|
} // remove_actions_parent_theme
|
|
add_action( 'wp_enqueue_scripts', 'remove_actions_parent_theme');
|
|
|
|
function disable_emojis() {
|
|
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
|
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
|
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
|
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
|
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
|
|
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
|
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
|
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
|
|
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
|
|
} // disable_emojis
|
|
add_action( 'init', 'disable_emojis' );
|
|
|
|
?>
|