This file contains hidden or 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
| /*-------------------------------------------*/ | |
| /* Register and enqueue scripts and styles | |
| /*-------------------------------------------*/ | |
| function jumpoff_scripts_and_styles() { | |
| if ( !is_admin() ) { | |
| //Register Styles | |
| wp_register_style( 'jumpoff_styles',get_template_directory_uri() . '/assets/css/app.min.css', false ); | |
| wp_register_style( 'jumpoff_fonts',get_template_directory_uri() . '/assets/css/fonts.min.css', false ); | |
This file contains hidden or 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
| /*-----------------------------------------------*/ | |
| /* Create new Role for: Client | |
| /*-----------------------------------------------*/ | |
| $result = add_role( 'client', __('Client' ), | |
| array( | |
| 'read' => true, // true allows this capability | |
| 'edit_posts' => false, // Allows user to edit their own posts | |
| 'edit_pages' => false, // Allows user to edit pages | |
| 'edit_others_posts' => false, // Allows user to edit others posts not just their own |
This file contains hidden or 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
| /*-----------------------------------------------*/ | |
| /* Create new Role for: Client | |
| /*-----------------------------------------------*/ | |
| $result = add_role( 'client', __('Client' ), | |
| array( | |
| 'read' => true, // true allows this capability | |
| 'edit_posts' => false, // Allows user to edit their own posts | |
| 'edit_pages' => false, // Allows user to edit pages | |
| 'edit_others_posts' => false, // Allows user to edit others posts not just their own |
This file contains hidden or 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
| // Exclude the iPad | |
| Modernizr.addTest('ipad', function () { | |
| return !!navigator.userAgent.match(/iPad/i); | |
| }); | |
| // Exclude the iPhone | |
| Modernizr.addTest('iphone', function () { | |
| return !!navigator.userAgent.match(/iPhone/i); | |
| }); |
This file contains hidden or 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
| /* | |
| * ICM Easter Eggs © 2014 | |
| * Version 1.0 | |
| * Author: Joe Furfaro | |
| * | |
| */ | |
| $(function(){ | |
| $('body').on('submit.easterEgg', 'form', function(e){ | |
| var $form = $(this), |
This file contains hidden or 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
| jQuery(window).on('scroll resize', function() { | |
| var scroll_top = jQuery(window).scrollTop(); | |
| var entry_region = jQuery('.sect-masthead'); | |
| var entry_region_bg = entry_region.find('.sect-masthead'); | |
| var entry_region_wrapper = entry_region.find('.sect-masthead'); | |
| var entry_region_height = entry_region.height(); | |
| if (scroll_top - 10 < entry_region_height) { | |
| var power_opacity = 1 - (scroll_top / entry_region_height * 1.2); | |
| var power_scale = 1.05 - (scroll_top / entry_region_height / 25); | |
| var power_scale_strong = 1 - (scroll_top / entry_region_height / 8); |
This file contains hidden or 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
| .foo{ | |
| /*---------------------------------------------- | |
| --Target ie10+ via ms-high-contrast mq (bestest) | |
| ----------------------------------------------- */ | |
| @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
| color: #111; | |
| } | |
| /*---------------------------------------------- | |
| --Target ie9+ (okay) |
This file contains hidden or 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
| function namespace_add_custom_types( $query ) { | |
| if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
| $query->set( 'post_type', array( | |
| 'post', 'nav_menu_item', 'your-custom-post-type-here' | |
| )); | |
| return $query; | |
| } | |
| } | |
| add_filter( 'pre_get_posts', 'namespace_add_custom_types' ); |
This file contains hidden or 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_filter( 'template_include', 'my_callback' ); | |
| function my_callback( $original_template ) { | |
| if ( some_condition() ) { | |
| return SOME_PATH . '/some-custom-file.php'; | |
| } else { | |
| return $original_template; | |
| } | |
| } |