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
/** | |
* Put this code into your functions.php file | |
* 3 = Strong (default) | |
* 2 = Medium | |
* 1 = Weak | |
* 0 = Very Weak / Anything | |
*/ | |
function raj_woocommerce_pass_strength( $strength ) { | |
return 2; | |
} |
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
//Just put this code into your functions.php file | |
//removing default Woocommerce password strenght | |
function raj_remove_password_strength() { | |
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
} | |
add_action( 'wp_print_scripts', 'raj_remove_password_strength', 100 ); |
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 billing fields | |
* | |
*/ | |
function my_custom_function(){ | |
global $woocommerce; | |
$checkout = $woocommerce->checkout(); | |
//print_r($checkout); | |
$checkout_fields = $checkout->checkout_fields['billing']; | |
unset( $checkout_fields['billing_email']); |
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
//Check Safari | |
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) { | |
alert('Its Safari'); | |
} | |
//Check Firefox | |
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){ | |
// Do Firefox-related activities | |
alert('Its Fire Chaa...Firefox'); | |
} |
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
if(navigator.userAgent.indexOf('Mac') > 0) { | |
alert("I am MAC"); | |
} |
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
$( document.body ).on( 'updated_cart_totals', function(){ | |
//re-do your jquery | |
}); |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldsite.com', 'http://www.newsite.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.oldsite.com', 'http://www.newsite.com'); |
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
$array1 = Array | |
( | |
'hemraj' => Array | |
( | |
'name' => 'hemraj', | |
'age' => '26', | |
), | |
'bishnu' => Array | |
( | |
'name' => 'bishnu', |
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
1. Add following div just after <body> tag | |
<div class="top-loader-wrapper"> | |
<div class="cssload-container"> | |
<div class="cssload-speeding-wheel"></div> | |
</div> | |
</div> | |
2. Include jquery | |
3. Add style at head for the icon design | |
.top-loader-wrapper { | |
z-index: 9999999; |
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 | |
/** | |
* Excerpt customization | |
*/ | |
function wp_excerpt_more( $more ) { | |
return ' <span>...</span><a class="more-link" href="'. get_permalink() . '">Read More ></a>'; | |
} | |
add_filter( 'excerpt_more', 'wp_excerpt_more' ); | |
?> |
NewerOlder