⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
/** | |
* Post IDs expects an array of values, or an array with a single value. | |
* Removing the '_elementor_edit_mode' turns elementor off. All the elementor settings | |
* are still saved in meta and will reapply if "Edit with elementor" is clicked again. | |
* | |
* The elementor content is stored in the _elementor_data post meta | |
*/ | |
function kanopi_convert_elementor_to_classic_block( $post_ids ){ |
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
#!/bin/bash | |
# | |
# Variable ROLEMAP will hold a reference list of all the current roles | |
# and the values to which they should be updated | |
declare -A ROLEMAP; | |
# List of roles to be converted to the 'editor' role | |
ROLE_TO_EDITOR=( | |
academy |
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
@mixin box-shadow($top, $left, $blur, $size, $color, $inset: false) { | |
@if $inset { | |
-webkit-box-shadow:inset $top $left $blur $size $color; | |
-moz-box-shadow:inset $top $left $blur $size $color; | |
box-shadow:inset $top $left $blur $size $color; | |
} @else { | |
-webkit-box-shadow: $top $left $blur $size $color; | |
-moz-box-shadow: $top $left $blur $size $color; | |
box-shadow: $top $left $blur $size $color; | |
} |
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 | |
/** | |
* Wordpress hook for hiding the WP Adminbar on the front end. | |
* @file functions.php | |
*/ | |
add_filter('show_admin_bar', '__return_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
// get the current date | |
var now = new Date(); | |
var curr_date = now.getDate(); | |
var curr_month = now.getMonth() + 1; | |
var curr_year = now.getFullYear(); | |
// format current date as it is in Redmine so we can do the math | |
var now = curr_month + '/' + curr_date + '/' + curr_year; | |
var now | |
console.log(now); |
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
// originally by Camden Ross. Thanks | |
/* bypass wordpress are you sure you want to logout screen when logging out of an already logged out account. */ | |
function smart_logout() { | |
if (!is_user_logged_in()) { | |
$smart_redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '/'; | |
wp_safe_redirect( $smart_redirect_to ); | |
exit(); | |
} else { | |
check_admin_referer('log-out'); |
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
// disable the admin bar for logged in users | |
if (!function_exists('disableAdminBar')) { | |
function disableAdminBar(){ | |
remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); // for the admin page | |
remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // for the front end | |
function remove_admin_bar_style_backend() { // css override for the admin page | |
echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>'; |
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
{ | |
"cmd": [ | |
"java", | |
"-jar", "${packages}/Google Closure Compiler/bin/compiler.jar", | |
"--js", "$file", "--js_output_file", "$file_base_name-min.js", "--compilation_level", "WHITESPACE_ONLY" | |
], | |
"windows": { | |
"cmd": ["${packages}/Google Closure Compiler/bin/compiler.cmd", "$file"], | |
"file_regex": "^(.*?):([0-9]*):", | |
"selector": "source.js" |