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
.navi-mobile-menu { | |
display: block; | |
overflow-x: hidden; | |
overflow-y: auto; | |
position: relative; | |
height: calc(100vh - 100px); | |
width: 100%; | |
background: #FBF8EC; | |
font-family: 'Graphik'; | |
font-weight: 700; |
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
git config alias.change-commits '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch --env-filter \"if [[ \\\"\$\`echo \$VAR\`\\\" = '\$OLD' ]]; then export \$VAR='\$NEW'; fi\" \$@; }; f " | |
git change-commits GIT_AUTHOR_NAME "<Old Name>" "<New Name>" -f | |
git change-commits GIT_AUTHOR_EMAIL <[email protected]> <[email protected]> -f | |
git change-commits GIT_COMMITTER_NAME "<Old Name>" "<New Name>" -f | |
git change-commits GIT_COMMITTER_EMAIL <[email protected]> <[email protected]> -f |
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 | |
$search_query = new WP_Query( | |
array( | |
's' => get_search_query(), | |
'paged' => $paged, | |
'post_status' => 'publish' | |
) | |
); | |
// Set CTP priority here. First comes first shows |
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 | |
/* | |
* Context: | |
* Sometime we may need to get the `order_id` in checkout page. When redirecting from `order-pay` you can grab it from `query_var`. But as soon as you reload the page it's lost. | |
*/ | |
// You can access it from WooCommerce Session. For pending order there is a key named `order_awaiting_payment` in WooCommerce Session. | |
// Method 1: using `WC_Session_Handler` | |
$wc_session = new WC_Session_Handler(); |
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
var tables = document.getElementsByClassName('geotable'); | |
var data = {}; | |
for (var i = 0; i < tables.length; i++) { | |
var rows = tables.item(i).rows; | |
var localArray = []; | |
for (j = 0; j < rows.length; j++){ | |
var oCells = rows.item(j).cells; |
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 | |
function add_elementor_widget_categories( $elements_manager ) { | |
$categories = []; | |
$categories['oceanic'] = | |
[ | |
'title' => 'Oceanic Widgets', | |
'icon' => 'fa fa-plug' | |
]; |
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
// iphone XPro Max | |
@mixin ipxm-p { | |
/* iPhone XPro Max portrait */ | |
@media only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait) { | |
@content; | |
} | |
} | |
@mixin ipxm-l { | |
/* iPhone XPro Max landscape */ |
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
//Modify this function only | |
function countries() { | |
$args = array( | |
'post_type' => 'country', //change as needed | |
'post_status' => 'publish', | |
'posts_per_page' => -1); | |
$slugs = array(); | |
$countries = new WP_Query( $args ); |
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 | |
function reading_time() { | |
$content = get_post_field( 'post_content', $post->ID ); | |
$word_count = str_word_count( strip_tags( $content ) ); | |
$readingtime = ceil($word_count / 200); | |
if ($readingtime == 1) { | |
$timer = " minute"; | |
} else { | |
$timer = " minutes"; |
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 | |
/*** | |
* This simple utf-8 word count function (it only counts) | |
* is a bit faster then the one with preg_match_all | |
* about 10x slower then the built-in str_word_count | |
* | |
* If you need the hyphen or other code points as word-characters | |
* just put them into the [brackets] like [^\p{L}\p{N}\'\-] | |
* If the pattern contains utf-8, utf8_encode() the pattern, |