/** * Load our special font CSS files. * * @since Twenty Thirteen 1.0 */ function twentythirteen_custom_header_fonts() { // Add Source Sans Pro and Bitter fonts. wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null); // Add Genericons font. wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03'); }
function twentythirteen_setup() { /* * Makes Twenty Thirteen available for translation. * * Translations can be added to the /languages/ directory. * If you're building a theme based on Twenty Thirteen, use a find and * replace to change 'twentythirteen' to the name of your theme in all * template files. */ load_theme_textdomain('dtk', get_template_directory() . '/languages'); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style(array('css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url())); // Adds RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); /* * Switches default core markup for search form, comment form, * and comments to output valid HTML5. */ add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption')); /* * This theme supports all available post formats by default. * See http://codex.wordpress.org/Post_Formats */ add_theme_support('post-formats', array('aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video')); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Navigation Menu', 'twentythirteen')); /* * This theme uses a custom image size for featured images, displayed on * "standard" posts and pages. */ add_theme_support('post-thumbnails'); set_post_thumbnail_size(604, 270, true); // This theme uses its own gallery styles. add_filter('use_default_gallery_style', '__return_false'); }
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); } add_action('wp_dashboard_setup', 'remove_dashboard_widgets' ); add_action('admin_menu', 'remove_plugin_update_count'); function remove_plugin_update_count(){ global $menu,$submenu; $menu[65][0] = 'Plugins'; $submenu['index.php'][10][0] = 'Updates'; } */ if (!isset($content_width)) { $content_width = 604; }
/** * Adds additional stylesheets to the TinyMCE editor if needed. * * @uses twentythirteen_fonts_url() to get the Google Font stylesheet URL. * * @since Twenty Thirteen 1.0 * * @param string $mce_css CSS path to load in TinyMCE. * @return string */ function twentythirteen_mce_css($mce_css) { $fonts_url = twentythirteen_fonts_url(); if (empty($fonts_url)) { return $mce_css; } if (!empty($mce_css)) { $mce_css .= ','; } $mce_css .= esc_url_raw(str_replace(',', '%2C', $fonts_url)); return $mce_css; }
/** * Enqueue scripts and styles for the front end. * * @since Twenty Thirteen 1.0 */ function twentyhua_scripts_styles() { /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } // Adds Masonry to handle vertical alignment of footer widgets. if (is_active_sidebar('sidebar-1')) { wp_enqueue_script('jquery-masonry'); } // Loads JavaScript file with functionality specific to Twenty Thirteen. wp_enqueue_script('twentyhua-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20160302', true); // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. wp_enqueue_style('twentyhua-fonts', twentythirteen_fonts_url(), array(), null); // Add Genericons font, used in the main stylesheet. //wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' ); // Loads our main stylesheet. wp_enqueue_style('twentyhua-style', get_stylesheet_uri(), array(), '2016-03-24'); // Loads the Internet Explorer specific stylesheet. wp_enqueue_style('twentyhua-ie', get_template_directory_uri() . '/css/ie.css', array('twentyhua-style'), '2016-03-18'); wp_style_add_data('twentyhua-ie', 'conditional', 'lt IE 9'); /* added by Donghua */ // bootstrap wp_enqueue_script('twentythirteen-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20160301', true); wp_enqueue_style('twentythirteen-style', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '20160301'); wp_enqueue_style('twentythirteen-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '20160301'); global $g_hua; if ($g_hua['func_static_files'] != false) { $g_hua['func_static_files'](); //echo "func_static_files<br>"; } }
/** * Enqueue scripts and styles for the front end. * * @since Twenty Thirteen 1.0 */ function twentythirteen_scripts_styles() { /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } // Adds Masonry to handle vertical alignment of footer widgets. if (is_active_sidebar('sidebar-1')) { wp_enqueue_script('jquery-masonry'); } // Loads JavaScript file with functionality specific to Twenty Thirteen. wp_enqueue_script('twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20150330', true); // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null); // Add Genericons font, used in the main stylesheet. wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03'); // Loads our main stylesheet. wp_enqueue_style('twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18'); // Loads the Internet Explorer specific stylesheet. wp_enqueue_style('twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array('twentythirteen-style'), '2013-07-18'); wp_style_add_data('twentythirteen-ie', 'conditional', 'lt IE 9'); wp_enqueue_script('cb', get_template_directory_uri() . '/js/cb.js', false); wp_enqueue_script('jqc', get_template_directory_uri() . '/js/jquery.cycle.all.js', false); wp_enqueue_script('jq', get_template_directory_uri() . '/js/jquery-1.2.3.min.js', false); wp_enqueue_script('menu', get_template_directory_uri() . '/js/menu.js', false); wp_enqueue_script('mootools', get_template_directory_uri() . '/js/mootools-release-1.11.js', false); wp_enqueue_style('960', get_template_directory_uri() . '/css/960.css', array('twentythirteen-style'), '2013-07-18'); wp_enqueue_style('box', get_template_directory_uri() . '/css/box.css', array('twentythirteen-style'), '2013-07-18'); wp_enqueue_style('page', get_template_directory_uri() . '/css/page.css', array('twentythirteen-style'), '2013-07-18'); wp_enqueue_style('reset', get_template_directory_uri() . '/css/reset.css', array('twentythirteen-style'), '2013-07-18'); wp_enqueue_style('text', get_template_directory_uri() . '/css/text.css', array('twentythirteen-style'), '2013-07-18'); }
/** * Enqueue scripts and styles for the front end. * * @since Twenty Thirteen 1.0 */ function twentythirteen_scripts_styles() { /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } // Adds Masonry to handle vertical alignment of footer widgets. if (is_active_sidebar('sidebar-1')) { wp_enqueue_script('jquery-masonry'); } // Add jQuery wp_enqueue_script('jquery'); wp_enqueue_script('jquery-1.9.1', site_url() . '/wp-includes/js/jquery-1.9.1.min.js'); wp_enqueue_script('jquery-ui-1.11.4', site_url() . '/wp-includes/js/jquery-ui.min.js'); wp_enqueue_script('owl-carousel-js', site_url() . '/wp-includes/js/owl-carousel/owl.carousel.min.js'); // Loads JavaScript file with functionality specific to Twenty Thirteen. wp_enqueue_script('twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20150330', true); // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null); // Add Genericons font, used in the main stylesheet. wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03'); // Loads our main stylesheet. wp_enqueue_style('twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18'); // Loads the Internet Explorer specific stylesheet. wp_enqueue_style('twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array('twentythirteen-style'), '2013-07-18'); wp_enqueue_style('istar-style', get_template_directory_uri() . '/css/istarstyle.css', false, '2015-07-14'); wp_enqueue_style('owl-carousel', get_template_directory_uri() . '/css/owl.carousel.css', false, '2015-07-14'); wp_enqueue_style('owl-demo', get_template_directory_uri() . '/css/owl.demo.css', array('owl-carousel'), '2015-07-14'); wp_enqueue_style('owl-theme', get_template_directory_uri() . '/css/owl.theme.css', array('owl-carousel'), '2015-07-14'); wp_style_add_data('twentythirteen-ie', 'conditional', 'lt IE 9'); }