Haddon2016/functions.php

32 lines
1.1 KiB
PHP
Raw Normal View History

2020-06-28 14:33:05 -04:00
<?php
# function file for Haddon 2016 child theme
2020-06-28 14:33:05 -04:00
# Enqueue the css
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles');
2020-06-28 14:33:05 -04:00
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
} # theme_enqueue_styles
2020-06-28 14:33:05 -04:00
# Remove the custom CSS from customizer.php
add_action( 'wp_enqueue_scripts', 'remove_actions_parent_theme');
function remove_actions_parent_theme() {
remove_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 );
remove_action( 'wp_enqueue_scripts', 'twentysixteen_link_color_css', 11 );
remove_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );
remove_action( 'wp_enqueue_scripts', 'twentysixteen_secondary_text_color_css', 11 );
} # remove_actions_parent_theme
2020-06-28 14:33:05 -04:00
# Add additional file types to the media
add_filter( 'upload_mimes', 'my_myme_types', 1, 1 );
2020-06-28 14:33:05 -04:00
function my_myme_types( $mime_types ) {
$mime_types['epub'] = 'application/epub+zip'; // Adding .svg extension
$mime_types['mobi'] = 'application/octet-stream'; // Adding .json extension
return $mime_types;
} # my_myme_types
2020-06-28 14:33:05 -04:00
?>