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 | |
function add_custom_assets_to_digits_page() { | |
wp_register_script( 'myprefix-js', '', array("jquery"), '', true ); | |
wp_enqueue_script( 'myprefix-js' ); | |
wp_add_inline_script( 'myprefix-js', "JS goes here"); | |
} | |
add_action( 'login_enqueue_scripts', 'add_custom_assets_to_digits_page', 99); |
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
<form method="post"> | |
<div class="g-recaptcha" data-sitekey="SITE_KEY" data-callback="verifyCaptcha"></div> | |
<div id="g-recaptcha-error"></div> | |
<input type="button" class="submit" value="Submit" /> | |
</form> | |
<script src='https://www.google.com/recaptcha/api.js'></script> | |
<script> | |
var recaptcha_response = ''; |
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 | |
if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])){ | |
$secret_key = 'SECERET_KEY'; | |
$verify_captcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret_key.'&response='.$_POST['g-recaptcha-response']); | |
$verify_response = json_decode($verify_captcha); | |
if($verify_response->success){ | |
//success | |
}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
<!-- HTML code --> | |
<div class="joinchat_button"> | |
<a href="https://wa.me/98xxxxxx" class="joinchat_button_open" target="_blank"></a> | |
</div> | |
<!-- CSS code --> | |
.joinchat_button { | |
right: auto; |
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
// First Register the Tab by hooking into the 'woocommerce_product_data_tabs' filter | |
add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' ); | |
function add_my_custom_product_data_tab( $product_data_tabs ) { | |
$product_data_tabs['my-custom-tab'] = array( | |
'label' => __( 'My Custom Tab', 'woocommerce' ), | |
'target' => 'my_custom_product_data', | |
'class' => array( 'show_if_simple' ), | |
); | |
return $product_data_tabs; | |
} |
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 | |
if(!function_exists('http_build_url')) | |
{ | |
// Define constants | |
define('HTTP_URL_REPLACE', 0x0001); // Replace every part of the first URL when there's one of the second URL | |
define('HTTP_URL_JOIN_PATH', 0x0002); // Join relative paths | |
define('HTTP_URL_JOIN_QUERY', 0x0004); // Join query strings | |
define('HTTP_URL_STRIP_USER', 0x0008); // Strip any user authentication information | |
define('HTTP_URL_STRIP_PASS', 0x0010); // Strip any password authentication information | |
define('HTTP_URL_STRIP_PORT', 0x0020); // Strip explicit port numbers |
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( 'woocommerce_default_address_fields', 'wc_reorder_fields_checkout_page' ); | |
function wc_reorder_fields_checkout_page( $fields ) { | |
// default priorities: | |
// 'first_name' – 10 | |
// 'last_name' – 20 | |
// 'company' – 30 | |
// 'country' – 40 |
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
body.rtl .vc_row[data-vc-full-width] { | |
position: relative; | |
width: 100vw !important; | |
right: 50% !important; | |
left: auto !important; | |
transform: translateX(50%) !important; | |
padding-left: calc( (100vw - 1140px) / 2 ) !important; | |
padding-right: calc( (100vw - 1140px) / 2 ) !important; | |
} | |
@media(max-width:767px){ |
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
//Credit to Stoyan Stefanov | |
location = location | |
location = location | |
location = location.href | |
location = window.location | |
location = self.location | |
location = window.location.href | |
location = self.location.href | |
location = location['href'] |
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('get_user_link', 'remove_link_from_author'); | |
function remove_link_from_author(){ | |
return ""; | |
} | |
add_filter('get_post_text', 'remove_link_from_post'); | |
function remove_link_from_post($content){ | |
$result = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $content); | |
return $result; | |
} |
NewerOlder