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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+o"], "command": "prompt_open_folder" }, | |
{ "keys": ["ctrl+pagedown"], "command": "next_view_in_stack" }, | |
{ "keys": ["ctrl+pageup"], "command": "prev_view_in_stack" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["alt+`"], "command": "toggle_terminus_panel" } |
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
jQuery( document ).ready( function() { | |
jQuery( '.clampThis' ).each( function( index, element ) { | |
$clamp( | |
element, | |
{ | |
clamp: 1, | |
useNativeClamp: false | |
} | |
); | |
}); |
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 https://github.com/vodkabears/Vide/issues/206 | |
*/ | |
function cameronjoneswebAutoPlayVideo( video ) { | |
if ( video.readyState === 4 ) { | |
video.play(); | |
} else { | |
setTimeout( cameronjoneswebAutoPlayVideo, 100, video ); | |
} | |
} |
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 | |
// Example. | |
$myclasses = [ 'my-class', 'some-other-class', '<script>console.log(hi);</script>' ]; | |
printf( | |
'<div %1$s>%2$s</div>', | |
cameronjonesweb_generate_class_attribute( $myclasses ), | |
'My content' | |
); |
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_filter( 'nav_menu_link_attributes','cameronjonesweb_move_custom_menu_item_class_to_anchor_element', 10, 4 ); | |
add_filter( 'nav_menu_css_class', 'cameronjonesweb_remove_custom_menu_item_class_from_li_element', 10, 4 ); | |
/** | |
* Get the custom item menu classes and add them to the anchor element | |
* | |
* @link https://cameronjonesweb.com.au/blog/how-to-move-the-custom-menu-item-classes-to-the-anchor-element/ | |
* @param array $atts The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored. |
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 | |
/** | |
* Removes the `current_page_parent` class from the blog page link when not viewing a blog related page | |
* | |
* @param array $classes The CSS classes that are applied to the menu item's `<li>` element. | |
* @param WP_Post $item The current menu item. | |
* @param stdClass $args An object of wp_nav_menu() arguments. | |
* @param int $depth Depth of menu item. Used for padding. | |
*/ | |
function cameronjonesweb_remove_current_page_parent( $classes, $item, $args, $depth ) { |
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_filter( 'gform_field_css_class', 'cameronjonesweb_add_field_type_to_class', 10, 3 ); | |
/** | |
* Adds a class that defines the type of field to the li element in Gravity Forms | |
* | |
* @param string $css_class The existing CSS classes. | |
* @param GF_Field $field The field object. | |
* @param array $form The form object. | |
* @return string |
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_action( 'init', 'cameronjonesweb_yoast_front_page_head' ); | |
function cameronjonesweb_yoast_front_page_head() { | |
if ( class_exists( 'WPSEO_Frontend' ) ) { | |
add_action( 'wpseo_head', array( WPSEO_Frontend::get_instance(), 'webmaster_tools_authentication' ), 90 ); | |
add_action( 'login_head', array( WPSEO_Frontend::get_instance(), 'webmaster_tools_authentication' ), 90 ); | |
} | |
} |
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
shopt -s globstar | |
for i in **; do | |
if [ -d "$i" ]; then | |
# update this line to include directories to ignore | |
if [[ "${i##/*}" != *"node_modules"* && "${i##/*}" != *"bower_components"* ]]; then | |
if [ ! -f "${i##/*}/index.php" ]; then | |
printf "Creating index file in %s\n" "${i##/*}" | |
printf "<?php\n// Silence is golden." > ${i##/*}/index.php | |
fi | |
fi |