-
-
Save anonymous/48379c736894f057877f to your computer and use it in GitHub Desktop.
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 | |
// Tell the main theme that a child theme is running. Do not remove this. | |
$GLOBALS['builder_child_theme_loaded'] = true; | |
// Load translations | |
load_theme_textdomain( 'it-l10n-Builder-Base', get_stylesheet_directory() . '/lang' ); | |
/** | |
* Registers support for post formats. | |
*/ | |
function builder_base_child_setup() { | |
/** | |
* Enable support for Post Formats. | |
* | |
* @link http://codex.wordpress.org/Post_Formats | |
*/ | |
add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) ); | |
} | |
add_action( 'after_setup_theme', 'builder_base_child_setup' ); | |
/** | |
* forces fonts to be registered to get around https problems | |
*/ | |
function add_my_code() { | |
// load the font | |
wp_register_style('googleFonts-Open-Sans', '//fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700'); | |
wp_enqueue_style( 'googleFonts-Open-Sans'); | |
} | |
add_action('wp_enqueue_scripts', 'add_my_code'); | |
// Do not load custom font over http | |
add_filter( 'builder_base_enable_custom_font', '__return_false'); | |
/* Add custom roles for newsletter sign ups */ | |
add_role('contact_us', 'Contact Us', array( | |
'read' => true, | |
'edit_posts' => true, | |
'delete_posts' => true, | |
)); | |
add_role('news', 'News Sign Ups', array( | |
'read' => true, | |
'edit_posts' => true, | |
'delete_posts' => true, | |
)); | |
add_role('pre_reg', 'Pre Register', array( | |
'read' => true, | |
'edit_posts' => true, | |
'delete_posts' => true, | |
)); | |
add_action('wp_footer','add_custom_js_for_hover'); | |
function add_custom_js_for_hover() { ?> | |
<script> | |
jQuery(function($){ | |
$( "img[src*=sizeanddelivery.jpg]" ).hover( | |
function() { | |
$( this ).attr("src", "https://www.since1664.com/wp-content1664/uploads/2014/02/sizeanddeliveryover.jpg"); | |
}, function() { | |
$( this ).attr("src", "https://www.since1664.com/wp-content1664/uploads/2014/02/sizeanddelivery.jpg"); | |
} | |
); | |
}); | |
</script> <?php | |
} | |
/**end*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment