A list of everything that *could* go in the <head>
of your document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
function to add async and defer attributes | |
Will only work if the scripts are enqueued with wp_enqueue_script() | |
*/ | |
function defer_js_async($tag){ | |
## 1: list of scripts to defer. | |
$scripts_to_defer = array( | |
'owl-carousel.min.js', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*-----------------------------------------------------------------------------------*/ | |
/* Do not remove these lines, sky will fall on your head. | |
/*-----------------------------------------------------------------------------------*/ | |
define( 'MTS_THEME_NAME', 'schema' ); | |
define( 'MTS_THEME_VERSION', '3.1.2' ); | |
require_once( dirname( __FILE__ ) . '/theme-options.php' ); | |
if ( ! isset( $content_width ) ) { | |
$content_width = 680; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set X-UA-Compatible for IE | |
* | |
* Sends headers to browser in an attempt to have IE render the website using | |
* their latest rendering engine (i.e. IE=edge). Additionally, attempts to | |
* activate Chrome Frame add-on if it exists. | |
* | |
* IE browser may show compatibility icon in address bar when using HTML5 Boilerplate's | |
* heading markup which contains conditional comments on HTML tag. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Featured Image Description | |
* | |
* @param string $content Admin post thumbnail HTML markup. | |
* @param integer $content Post ID. | |
* @return string | |
*/ | |
function prefix_featured_image_description( $content, $post_id ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( !function_exists( 'add_opengraph_doctype' )): | |
//////////////////////////////////////////////////////////////////// | |
//Adding the Open Graph in the Language Attributes | |
//////////////////////////////////////////////////////////////////// | |
function add_opengraph_doctype( $output ) { | |
return $output . ' xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"'; | |
} | |
add_filter('language_attributes', 'add_opengraph_doctype'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="shortcut icon" href="/favicon/favicon.ico"> | |
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-touch-icon-57x57.png"> | |
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-touch-icon-114x114.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-touch-icon-72x72.png"> | |
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-touch-icon-144x144.png"> | |
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-touch-icon-60x60.png"> | |
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-touch-icon-120x120.png"> | |
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-touch-icon-76x76.png"> | |
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-touch-icon-152x152.png"> | |
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon-180x180.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: UTF8mb4-convert | |
Version: 1.0 | |
*/ | |
function update_db_to_utf8mb4() { | |
if ( ! isset( $_GET['update-utf8bm4'] ) ) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add custom contacts for WordPress user as we want user to have links to their Twitter, LinkedIn, etc accounts | |
*/ | |
function worduoso_contactmethods( $contactmethods ) { | |
$contactmethods['linkedin'] = 'Linked In'; // Add LinkedIn | |
$contactmethods['twitter'] = 'Twitter'; // Add Twitter | |
$contactmethods['facebook'] = 'Facebook'; // Add Facebook | |
return $contactmethods; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |