For swipes/slideshows: cubic-bezier(0.06, 0.46, 0.68, 0.94);
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
//dom_utils Class, keep this in a utils file of some sort | |
class dom_utils { | |
constructor(selector) { | |
this.node = selector; | |
} | |
exists() { | |
return typeof this.node !== 'undefined'; | |
} |
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 | |
/*———— -Determine environment and load the corresponding config file- ————*/ | |
//builds RegEx patterns with any number of optional hostnames | |
function host_pattern($carry, $item, $initial){ | |
return $carry . '(' . preg_quote($item) . ')?'; | |
} | |
$local_hosts = [ | |
'.docker', |
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
/* To disable the Gutenberg editor sitewide, | |
add the following snippet to functions.php or | |
any other PHP file that has been included in functions.php */ | |
add_filter('use_block_editor_for_post', '__return_false', 10); |
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
/* In order to use SESSION with AJAX etc in Wordpress. you must use add_action to hook into 'wp' */ | |
add_action('wp', 'rk_start_session'); | |
function rk_start_session() { | |
global $post; | |
//if you want to use anything from the $post variable you can | |
if(!session_id()): |
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
export default class NoFouc { | |
constructor() { | |
this.$elements = $('.no-fouc'); | |
} | |
removeFoucBlocker(){ | |
this.$elements.removeClass('.no-fouc'); | |
} | |
init() { |
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
class productsAccordion { | |
constructor($productsAccordion) { | |
this.$drawer = $productsAccordion; | |
this.$header = null; | |
this.headerHeight = null; | |
this.expandedSize = null; | |
} | |
getGroup(){ |
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
/* Two step Regex replace to make sure names always break into 2 lines: | |
1) Remove all spaces entered by Human error from the end of the Full Name | |
2) Replace spaces with <br/> tags. Definitions | |
(?!^\s) Don't match spaces that come at the beginning of the name | |
(?!\w+\s) Also don't match a space after the First Name if there is another | |
word followed by a space after that. This prevents breaking the line for Middle Names. | |
*/ | |
$title = preg_replace('/\s+$/', '', $title); | |
$title = preg_replace('/(?!^\s)\s(?!\w+\s)/', '<br/>', $title); |
-
Hard Refresh / Clear Cache:
To make sure you're seeing the latest updates, clear your cache by holding down the Shift key while you refresh the page. -
Screenshot the Console (Chrome):
Press keyboard shortcut: [Command Option J] ([Control Alt J] for Windows) and take a screenshot of the console that appears at the bottom of your browser window.
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 show_registered_post_types(){ | |
$args=array( | |
'public' => true, | |
'exclude_from_search' => false, | |
'_builtin' => false | |
); | |
$output = 'names'; // names or objects, note names is the default | |
$operator = 'and'; // 'and' or 'or' |