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
| <?php | |
| /** | |
| * Retrieves a template part | |
| * | |
| * @since v1.5 | |
| * | |
| * Taken from bbPress | |
| * | |
| * @param string $slug | |
| * @param string $name Optional. Default null |
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{HTTP_HOST} ^old-domain.net$ [OR] | |
| RewriteCond %{HTTP_HOST} ^www.old-domain.net$ | |
| RewriteRule (.*)$ https://www.new-domain.com$1 [R=301,L] | |
| </IfModule> |
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 roots_nav_menu_css_class($classes, $item) { | |
| $slug = sanitize_title($item->title); | |
| if ($item->menu_item_parent == 0) { | |
| $active_class = 'active'; | |
| } else { | |
| $active_class = 'active-child'; | |
| } | |
| $classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', $active_class, $classes); |
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
| public function cssClasses($classes, $item) { | |
| $slug = sanitize_title($item->title); | |
| if ($item->menu_item_parent == 0) { | |
| $active_class = 'active'; | |
| } else { | |
| $active_class = 'active-child'; | |
| } | |
| if ($this->cpt) { |
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
| <?php | |
| namespace Roots\Sage\Nav; | |
| use Roots\Sage\Utils; | |
| /** | |
| * Cleaner walker for wp_nav_menu() | |
| * | |
| * Walker_Nav_Menu (WordPress default) example output: |
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 () { | |
| var Rollerblade = (function(){ | |
| function Rollerblade(element, options) { | |
| var _ = this; | |
| _.settings = $.extend($.fn.rollerblade.defaults, options); | |
| _.container = $(element); |
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
| <?php | |
| /** | |
| * Remove the id="" on nav menu items | |
| * Return 'menu-slug' for nav menu classes | |
| */ | |
| function roots_nav_menu_css_class($classes, $item) { | |
| $slug = sanitize_title($item->title); | |
| if (is_singular('post')) { | |
| $active_class = ''; |
NewerOlder