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
<script> | |
function defer(method) { | |
if (window.jQuery) { | |
method(); | |
} else { | |
setTimeout(function() { defer(method) }, 50); | |
} | |
} |
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
/* Copyright (c) 2017 Haggai Nuchi | |
Available for use under the MIT License: | |
https://opensource.org/licenses/MIT | |
*/ | |
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
toolbarbutton#alltabs-button { | |
-moz-binding: url("userChrome.xml#js"); | |
} |
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 _interopRequireDefault(obj) { | |
return obj && obj.__esModule ? obj : { default: obj }; | |
} | |
const _path = _interopRequireDefault(require('path')); | |
module.exports = Ferdium => { | |
const getMessages = () => { | |
let direct = 0; | |
const badgeDiv = document.querySelector( |
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
#F1:: | |
SetInputLang(0x0409) | |
Sleep, 100 | |
SoundPlay, %A_WinDir%\Media\Speech On.wav | |
ToolTip, EN | |
SetTimer, RemoveToolTip, -1000 | |
Return | |
#F2:: |
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
{"theme":"","controlStyles[0].target":"Taskbar.TaskListLabeledButtonPanel@RunningIndicatorStates > Rectangle#RunningIndicator","controlStyles[0].styles[0]":"Height=2","resourceVariables[0].variableKey":"","resourceVariables[0].value":"","controlStyles[0].styles[1]":"Margin=2,0,2,-4","controlStyles[1].target":"taskbar:TaskListLabeledButtonPanel@RunningIndicatorStates > muxc:ProgressBar#ProgressIndicator > Grid#LayoutRoot","controlStyles[1].styles[0]":"Height=2","controlStyles[2].target":"taskbar:TaskListLabeledButtonPanel@RunningIndicatorStates > muxc:ProgressBar#ProgressIndicator","controlStyles[2].styles[0]":"Margin=2,0,2,-4"} |
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 | |
add_filter('acf/validate_value/name=user_password_confirm', 'my_validated_password_filter', 10, 4); | |
function my_validated_password_filter($valid, $value, $field, $input) { | |
if (!$valid) { | |
return $valid; | |
} | |
// field key of the field you want to validate against | |
$password_field = 'field_5de8dff728aa2'; | |
if ($value != $_POST['acf'][$password_field]) { | |
$valid = 'Does Not Match Password'; |
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 update_controls( $elements ) { | |
$new_elements = array(); | |
foreach ( $elements as $element_index => $element ) { | |
foreach ( $element as $key => $value ) { | |
if ( $key == 'elements' && ! empty( $value ) ) { | |
$new_elements[$element_index][$key] = update_controls( $value ); |
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 | |
$value = [ | |
[ | |
'attribute_type' => 'pa_merchant', | |
'pa_merchant' => [ 305 ], | |
], | |
[ | |
'attribute_type' => 'pa_brand', | |
'pa_brand' => [ 692 ], | |
], |
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 | |
// MS Dynamic tags | |
add_action( 'elementor/dynamic_tags/register_tags', function( $dynamic_tags ) { | |
// conditional archive title (TEXT) | |
class MS_Custom_Archive_Title_Tag extends \Elementor\Core\DynamicTags\Tag { | |
public function get_name() { | |
return 'MS_Custom_Archive_Title_Tag'; | |
} | |
public function get_categories() { |
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
add_filter( 'woocommerce_related_products', 'exclude_oos_related_products', 10, 3 ); | |
function exclude_oos_related_products( $related_posts, $product_id, $args ){ | |
$out_of_stock_product_ids = (array) wc_get_products( array( | |
'status' => 'publish', | |
'limit' => -1, | |
'stock_status' => 'outofstock', | |
'return' => 'ids', | |
) ); | |
$exclude_ids = $out_of_stock_product_ids; |
NewerOlder