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 | |
| add_filter( 'gform_field_input', 'gf_field_input', 10, 5 ); | |
| function gf_field_input($input, $field, $value, $lead_id, $form_id) { | |
| // we don't want to change the admin look behavior of the form field | |
| if ( IS_ADMIN ) | |
| return $input; | |
| // lets create custom form html in case it had the css class assigned |
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
| * { | |
| color: blue; | |
| } |
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 | |
| /** | |
| * Loop Add to Cart | |
| * | |
| * @author WooThemes | |
| * @package WooCommerce/Templates | |
| * @version 1.6.4 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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
| $('body').on('adding_to_cart', function(event, param1, param2) { | |
| // pick the data from somewhere and define extra product_data parameter | |
| // event and param1 parameteres serve no need in that case | |
| param2.logo_text = 'My great logo!'; | |
| }); |
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 | |
| add_action( 'woocommerce_ajax_added_to_cart', 'ac_add_product_custom_field' ); | |
| /** | |
| * | |
| * @hook woocommerce_ajax_added_to_cart | |
| */ | |
| function ac_add_product_custom_field($product_id) { | |
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 | |
| add_shortcode( 'table', 'ssl_table_shortcode' ); | |
| /** | |
| * Render ACF table shortcode given several parameters | |
| */ | |
| function ssl_table_shortcode($atts) { | |
| global $post; | |
| // extract the necessary attributes |
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
| (function($) { | |
| "use strict"; | |
| var Site = { | |
| basePrice: 0, //$('.ginput_amount').val(), | |
| gfield_original_title: "", | |
| gformId: 22, | |
| init: function() { | |
| Site.selectChangeEvents(); |
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 | |
| /** | |
| * Generate the navigation for blog listing pages | |
| * | |
| * @global obj $wp_query | |
| */ | |
| function bg_page_navi($query = null, $paged = null) { | |
| ?> | |
| <ul class="page-navi"> | |
| <?php |
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 | |
| /** | |
| * Validate data and send mail. | |
| * | |
| * @see http://codex.wordpress.org/Function_Reference/wp_mail | |
| * @return {int} Status of message: | |
| * -2 => Invalid data | |
| * -1 => Failed to send | |
| * 1 => OK |
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 | |
| $output = ''; | |
| if ( $related_posts->have_posts() ){ | |
| $out .= '<h3> Related Posts</h3>'; | |
| $out .= '<ul>'; | |
| while ( $related_posts->have_posts() ){ | |
| $related_posts->the_post(); | |
| $out .= '<li><a href="'.the_permalink().'">'.get_the_title().'</a></li>'; |