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
alias ll='ls -alF' | |
alias ls="ls --color -l -h" # add colors to ls | |
alias grep="grep -n --color" # add line numbers to grep | |
alias rnm="rm -rf node_modules" # remove node_modules | |
alias nlg="npm list -g --depth 0" #list global packages installed | |
alias vc="code" | |
alias vco="code ." # open current directory in vscode | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias c='clear' |
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
const isMobileOrTablet = () => { | |
let check = false; | |
(function (a) { | |
if ( | |
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test( | |
a | |
) || | |
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i23 |
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
https://forum.webflow.com/t/overflow-hidden-round-corners-not-working-on-safari/67805 | |
The issue is the combination of overflow, border-radius, and transition | |
This is the solution: | |
On the element with overflow: | |
.transitionfix() { | |
-webkit-backface-visibility: hidden; | |
-moz-backface-visibility: hidden; |
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
function matchCase(text, pattern, tag = '') { | |
var result = ''; | |
for(var i = 0; i < text.length; i++) { | |
var c = text.charAt(i); | |
var p = pattern.charCodeAt(i); | |
if(p >= 65 && p < 65 + 26) { | |
result += c.toUpperCase(); | |
} else { |
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
/** | |
* @param {event} evt = e (from the element) | |
* @param {bool} isZIP=false | |
* @returns {bool} | |
*/ | |
const validateNumberHelper = (evt, isZIP = false) => { | |
var theEvent = evt || window.event; | |
// Handle paste | |
if (theEvent.type === "paste") { |
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
function ping_app_fetch_counts(WP_REST_Request $request) | |
{ | |
if (is_request_not_from_the_same_domain()) { | |
wp_send_json_error( "Not authorized", 401 ); | |
return false; | |
} | |
$ping_env_id = get_option('wrwps_ping_env_id'); | |
$base_endpoint = 'https://api.pingone.com/v1/environments/' . $ping_env_id . '/'; | |
$token = get_jwt_token_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
// removes ACF data upon field deletion | |
// this action is run by ACF whenever a field is deleted | |
// and is called for every field in a field group when a field group is deleted | |
add_action('acf/delete_field', 'delete_acf_content_on_delete_field'); | |
function delete_acf_content_on_delete_field($field) { | |
// runs when acf deletes a field | |
// find all occurences of the field key in all tables and delete them | |
// and the custom field associated with them | |
global $wpdb; |
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 | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
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 | |
/** | |
* List of global WP variables. | |
* | |
* @since 0.3.0 | |
* @since 0.11.0 Changed visibility from public to protected. | |
* @since 0.12.0 Renamed from `$globals` to `$wp_globals` to be more descriptive. | |
* @since 0.12.0 Moved from WordPress_Sniffs_Variables_GlobalVariablesSniff to WordPress_Sniff | |
* | |
* @var array |
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 | |
// Added by Nikola on 2/10/2020 to fix the footer recent articles issues that's been probably happening due the ome server missconfiguration | |
// or some added plugins that caused the conflict, and caused the original one not to work properly | |
class CustomRecentPostsWidget extends WP_Widget { | |
function CustomRecentPostsWidget() { | |
parent::WP_Widget(false, $name = 'Custom Recent Posts'); | |
} | |
function form($instance) { | |
$title = esc_attr($instance['title']); |
NewerOlder