A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| function excerpt_function($ID, $searchTerms) { | |
| global $wpdb; | |
| $thisPost = get_post_meta($ID); | |
| foreach ($thisPost as $key => $value) { | |
| if ( false !== stripos($value[0], $searchTerms) ) { | |
| $found = substr(strip_tags($value[0]), 0, 150); | |
| echo $found . ' ...'; | |
| } | |
| } | |
| } |
| /* | |
| This JS creates collapsible Gravity Form sections breaks | |
| IMPORTANT: | |
| 1 - Within the Gravity form, you must add the class collapsible to each section break. | |
| 2 - All fields within those section breaks must have the class collapsible_field | |
| 3 - You must include both the CSS and the JS |
| <?php | |
| /* | |
| Plugin Name: Add Item Meta & Order Meta for your WooComerce order | |
| Description: A simple demo plugin on how to add add cart item meta & order item meta for your WooComerce order. | |
| Author: Bhavik Kiri | |
| Version: 1.0 | |
| */ | |
| add_action( 'woocommerce_before_add_to_cart_button', 'add_fields_before_add_to_cart' ); |