Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| <!-- Replace http://yoursite.com/link-to-a-page with the actual link to the page you want to link to --> | |
| <a href="http://yoursite.com/link-to-a-page"> | |
| <!-- Replace http://yoursite.com/wp-content/uploads/2016/02/your-image.jpg with the actual image URL --> | |
| <img src="http://yoursite.com/wp-content/uploads/2016/02/your-image.jpg" alt="" /> | |
| <div class="hover-text">The text you want to display</div> | |
| </a> |
| // We want to know the widget-4 part below. Yours will likely be a different number depending on where your widget is in the widget area. | |
| <div class="widget-4 widget-even widget-wrap"> |
| /* Replace the width and height values with your image's width and height */ | |
| /* You may need to play with the margin-top and margin-left values to get the hover effect lined up exactly over your image */ | |
| .hover-text { | |
| width: 250px; | |
| height: 184px; | |
| display: none; | |
| margin-top: -193px; | |
| margin-left: 13px; | |
| } | |
| /* This uses a black background with 75% opacity, and white text that is aligned in the center. Adjust as necessary. */ |
| /* Resize hover text area for screen sizes smaller than 480px wide. Repeat for other screen sizes as needed */ | |
| @media only screen and (max-width: 480px) { | |
| .hover-text { | |
| width: 261px; | |
| height: 192px; | |
| display: none; | |
| margin-top: -201px; | |
| margin-left: 13px; | |
| } | |
| .widget-4:focus .hover-text { |
| <?php | |
| /* | |
| Plugin Name: Strip Shortcodes | |
| Description: Strip shortcodes from home/blog posts page | |
| */ | |
| function strip_shortcode_from_excerpt( $content ) { | |
| if ( is_home() ) { | |
| $content = strip_shortcodes( $content ); | |
| } | |
| return $content; |
| jQuery(document).ready(function() | |
| { | |
| jQuery("#order_comments").attr('maxlength','140'); // make sure to change the 140 number here to match the number after remaining below | |
| countdownCharacters(); | |
| jQuery('#order_comments').change(updateCountdown); | |
| jQuery('#order_comments').keyup(updateCountdown); | |
| }); | |
| function countdownCharacters() { | |
| // 140 is the max message length | |
| var remaining = 140 - jQuery('#order_comments').val().length; |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| // Replace this | |
| function wp_jv_prg_add_rg_meta_box_head() { | |
| add_meta_box('wp_jv_prg_sectionid','WP JV Reading Groups','wp_jv_prg_add_rg_meta_box', 'post','side','high'); | |
| add_meta_box('wp_jv_prg_sectionid','WP JV Reading Groups','wp_jv_prg_add_rg_meta_box', 'page','side','high'); | |
| } | |
| // With this | |
| function wp_jv_prg_add_rg_meta_box_head() { | |
| $post_types = wp_jv_prg_get_post_types(); |
| <?php | |
| // Function to add a new card for your customer. | |
| function sd_process_add_customer_card(){ | |
| $redirect = false; | |
| if ( isset( $_POST['action'] ) && $_POST['action'] == 'add_customer_card' && wp_verify_nonce( $_POST['stripe_nonce'], 'stripe-nonce' ) ){ | |
| if ( !isset( $_POST['card_number'] ) || !isset( $_POST['card_cvc'] ) || !isset( $_POST['card_exp_month'] ) || !isset( $_POST['card_exp_year'] ) ){ | |
| $redirect = add_query_arg( array( | |
| 'card' => 'not-created', | |
| ), $_POST['redirect'] ); |
| // for add child site | |
| $params = array( | |
| 'url' => 'http://childsite.com', // child site url | |
| 'name' => 'my child site', // set name | |
| 'wpadmin' => 'admin-user-name', | |
| 'unique_id' => '', // set value if needed | |
| 'groupids' => array( ... ), // array of group ids | |
| 'ssl_verify' => 0, // or 1, 2 | |
| 'ssl_version' => 'auto', | |
| 'http_user' => '', // set value if needed |