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
add_action( 'wp_enqueue_scripts', 'jk_masonry' ); | |
function jk_masonry() { | |
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) ); | |
} | |
/* | |
How to use? | |
$('#container').masonry({ singleMode: true }); |
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 wpsites_modify_comment_form_fields($fields){ | |
$fields['author'] = '<p class="comment-form-author">' . '<label for="author">' . __( 'Author', 'wpsites.net' ) . '</label> ' . | |
( $req ? '<span class="required">*</span>' : '' ) . | |
'<input id="author" name="author" type="text" placeholder="Real name, please, no keyword spamming!" value="' . | |
esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>'; | |
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 add_new_comment_form_field($fields) { | |
$fields['phone'] = '<p class="comment-form-phone"><label for="phone">' . __( 'Phone', 'wpsites.net' ) . '</label>' . | |
'<input id="url" name="url" type="text" placeholder="E.T Phone Home Please" value="' . | |
esc_attr( $commenter['comment_author_phone'] ) . '" size="30" /></p>'; | |
return $fields; | |
} |
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 wpsites_customize_comment_form_text_area($arg) { | |
$arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( 'Your Feedback Is Appreciated', 'noun' ) . '</label><textarea id="comment" name="comment" placeholder="Please Use Pastebin or Github Gists If You Want To Leave PHP Code In Your Comment. Thanks!"cols="45" rows="1" aria-required="true"></textarea></p>'; | |
return $arg; | |
} | |
add_filter('comment_form_defaults', 'wpsites_customize_comment_form_text_area'); |
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 wpsites_modify_comment_form_text_area($arg) { | |
$arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( 'Your Feedback Is Appreciated', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="1" aria-required="true"></textarea></p>'; | |
return $arg; | |
} | |
add_filter('comment_form_defaults', 'wpsites_modify_comment_form_text_area'); |
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 | |
// Modify the default WooCommerce orderby dropdown | |
// | |
// Options: menu_order, popularity, rating, date, price, price-desc | |
// In this example I'm removing price & price-desc but you can remove any of the options | |
function my_woocommerce_catalog_orderby( $orderby ) { | |
unset($orderby["price"]); | |
unset($orderby["price-desc"]); | |
return $orderby; | |
} |
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
/** | |
* Add "Ingredients" and "Benefits" tabs to WooCommerce products | |
* | |
* @link http://blackhillswebworks.com/?p=5453 | |
* @link http://www.sean-barton.co.uk/2013/03/remove-woocommerce-20-reviews-tab | |
* @link http://www.php.net/manual/en/function.htmlspecialchars-decode.php | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'bhww_woo_extra_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
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) { | |
text-shadow: @string; | |
} | |
.box-shadow (@string) { | |
-webkit-box-shadow: @string; | |
-moz-box-shadow: @string; | |
box-shadow: @string; | |
} | |
.drop-shadow (@x: 0, @y: 1px, @blur: 2px, @spread: 0, @alpha: 0.25) { | |
-webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha); |
OlderNewer