php 儿童主题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 儿童主题相关的知识,希望对你有一定的参考价值。
<?php
function powell_WI_dequeue_script() {
// Dequeue Styles
wp_dequeue_style( 'flexslider' );
wp_dequeue_style( 'owl.carousel' );
wp_dequeue_style( 'shapely-fonts' );
// Dequeue Scripts
// wp_dequeue_script( 'flexslider' );
wp_dequeue_script( 'owl.carousel' );
}
add_action( 'wp_print_scripts', 'powell_WI_dequeue_script', 100 );
// import parent css styles, do not use @import!
function enqueue_parent_theme_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
// Our Google fonts
function add_theme_scripts() {
wp_enqueue_style( 'google_fonts', 'https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700|Montserrat', array(), '1.1', 'all');
//wp_enqueue_script( 'myscript', get_template_directory_uri() . '/js/myscript.js', array ( 'jquery' ), 1.1, true);
}
add_action( 'wp_enqueue_scripts', 'add_theme_scripts' );
// add SVG support for theme customizer
function filter_header_image( $url ) {
$url = sprintf( '%s/images/logo.svg', get_stylesheet_directory_uri() );
return $url;
}
add_filter( 'theme_mod_header_image', 'filter_header_image', 10, 1 );
// Hide menu items from dashboard
function powell_remove_admin_menu_links() {
remove_menu_page('edit.php'); // Hide Posts
remove_menu_page('edit-comments.php'); // Hide Comments
}
add_action( 'admin_menu', 'powell_remove_admin_menu_links',999 );
// Add SVG support to media uploader
function add_file_types_to_uploads($file_types){
$new_filetypes = array();
$new_filetypes['svg'] = 'image/svg+xml';
$file_types = array_merge($file_types, $new_filetypes );
return $file_types;
}
add_action('upload_mimes', 'add_file_types_to_uploads');
// Custom login Styles
function powell_custom_login() {
echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('stylesheet_directory') . '/login/custom-login-styles.css" />';
}
add_action('login_head', 'powell_custom_login');
// return current site url
function my_login_logo_url() {
return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
// change default WP title
function my_login_logo_url_title() {
return 'Powell Transport Solutions';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
以上是关于php 儿童主题的主要内容,如果未能解决你的问题,请参考以下文章