- http://www.codanada.com -- Coming soon!
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
| /** | |
| * Makes a BB Column clickable. | |
| * Pre-requisite: There must be an A Tag contained within the column element. | |
| */ | |
| (function($){ | |
| // Exit if BB layout is in edit mode. | |
| if ( 'undefined' != typeof window.FLBuilderConfig ) { | |
| return; | |
| } | |
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_shortcode( 'paypal_buy_now' , function(){ | |
| ob_start(); | |
| ?> | |
| <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="FPVL6DHVC9KE8" /> | |
| <select name="os0"> | |
| <option value="Single Line">Single Line $25.00 USD</option> | |
| <option value="1/4 Page (4.5" x 2" or 2.25" x 4")">1/4 Page (4.5" x 2" or 2.25" x 4") $60.00 USD</option> | |
| <option value="1/2 Page (4.5" x 4")">1/2 Page (4.5" x 4") $115.00 USD</option> | |
| <option value="3/4 Page (4.5" x 6")">3/4 Page (4.5" x 6") $165.00 USD</option> | |
| <option value="Full Page (4.5" x 8")">Full Page (4.5" x 8") $225.00 USD</option> |
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_filter( 'fl_builder_row_attributes', function( $attrs, $row ){ | |
| if ( $row->settings->id === 'ROW-ID-HERE' ){ | |
| $attrs['data-THE-FIELD-HERE'] = 'THE-VALUE-HERE'; | |
| } | |
| return $attrs; | |
| }, 10, 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
| <?php | |
| /* | |
| Template Name: Puzzle Full Width | |
| Template Post Type: puzzle | |
| */ | |
| get_header(); |
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 this to the child theme's functions.php file. | |
| */ | |
| add_filter( 'fl_builder_loop_query_args', function( $query_args ){ | |
| $today = date( 'd.m.Y', time() ); | |
| // Past ( today > start_date ) | |
| if ( 'PAST_POST_MODULE_ID_HERE' == $query_args[ 'settings' ]->id ) { | |
| $query_args[ 'meta_query' ] = array( | |
| 'key' => 'end_date', |
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 | |
| // Compatibility issue with Elegant Product Gallery Zoon | |
| // https://www.silkypress.com/elegant-product-gallery-zoom/ | |
| add_filter ( "fl_theme_builder_woocommerce_template_html_woocommerce_show_product_images", function ( $func ) { | |
| return 'load_product_gallery_template'; | |
| } ); | |
| function load_product_gallery_template() { | |
| if ( in_array( 'product-gallery-zoom/product-gallery-zoom.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
| include_once ABSPATH . '/wp-content/plugins/product-gallery-zoom/includes/gallery-template.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
| /** | |
| * | |
| * Smooth Scrolling from another page. | |
| * To be paired with this code: | |
| * https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code | |
| * | |
| */ | |
| jQuery(document).ready(function($) { | |
| var hashLink = $(window.location.hash), | |
| offsetSize = $("header").innerHeight() + 40; |
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
| /** | |
| * | |
| * It's essentially the same code here: | |
| * https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code | |
| * | |
| * I'm just using "wp_footer" action hook to load the code to the bottom of the page (see priority = 999). | |
| * You need to change 'page-slug-here' in LINE 10 to correspond with the target page. | |
| * | |
| */ | |
| add_action ( 'wp_footer', function(){ |
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 the code to All Import > Settings > Function Editor. | |
| */ | |
| function clear_bb_cache_after_wpai_import($import_id) { | |
| FLBuilderModel::delete_asset_cache_for_all_posts(); | |
| } | |
| add_action( 'pmxi_after_xml_import', 'clear_bb_cache_after_wpai_import', 10, 1); |
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 | |
| /** | |
| * Helper class for child theme functions. This is a better version as it uses the child theme's version number. | |
| * | |
| * @class FLChildTheme | |
| */ | |
| final class FLChildTheme { | |
| /** | |
| * Enqueues scripts and styles. |