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
| jQuery(document).ready(function() { | |
| jQuery(".builder-module-navigation .menu").addClass("mobile-menu-hidden"); | |
| jQuery(".builder-module-navigation").addClass("mobile"); | |
| jQuery(".mobile-menu-hidden").before('<div class="mobile-menu">≡ Menu</div>'); | |
| jQuery(".mobile-menu").click(function(){ | |
| jQuery(this).next().slideToggle(); | |
| }); |
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( 'woocommerce_return_to_shop_redirect', 'syb_shop_redirect' ); | |
| function syb_shop_redirect(){ | |
| return 'https://simontbailey.com/shiftyourbrilliance/'; | |
| } |
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
| //Conditional Terms of Service | |
| add_filter( 'woocommerce_checkout_show_terms' , 'syb_remove_terms' ); | |
| function syb_remove_terms( $fields ) { | |
| foreach ( WC()->cart->get_cart() as $item ) { | |
| if ( $item['product_id'] == '401') { | |
| return true; | |
| } | |
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 //You will probally need to remove this | |
| function tip_meta_box(){ | |
| add_meta_box('tip_box', 'Things to Remember', 'tip_callback', 'post', 'side', 'high'); | |
| } | |
| add_action('add_meta_boxes', 'tip_meta_box'); | |
| function tip_callback($post){ | |
| ?> |
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
| /** Seperate freepromo products from other Items - forcing multiple carts **/ | |
| add_filter( 'woocommerce_cart_shipping_packages', 'ps_two_shipping_methods_in_cart' ); | |
| function ps_two_shipping_methods_in_cart( $packages ) { | |
| $packages = array(); | |
| $freepromo_items = array(); | |
| $regular_items = array(); | |
| $freeshipclass= 'freepromo'; | |
| $shipto = array( | |
| 'country' => WC()->customer->get_shipping_country(), |
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
| //custom readmore for a specific category | |
| add_filter( 'excerpt_more', 'pp_cat_more_link' ); | |
| function pp_cat_more_link() { | |
| if(is_category('podcasts' )){ | |
| return ' <a class="more-link" href="' . get_permalink() . '">Listen Now</a>'; | |
| }else{ | |
| return ' <a class="more-link" href=' . get_permalink() . '">Read More...</a>'; | |
| } | |
| } |
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 cleanstring(dirty){ | |
| var smartchr = [ "’","‘","“","”","–","—","…", " ", '„', '‚' , '«','»', '‹', '›']; | |
| var correctchr = ["'", "'", '"', '"', '-', '-', '...', '', '"', "'", '"', '"', "'", "'"]; | |
| var thestring = dirty; | |
| var regex; | |
| for (var i = 0; i < smartchr.length; i++) { | |
| regex = new RegExp(smartchr[i], "g"); | |
| thestring = thestring.replace(regex, correctchr[i]); | |
| } |
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
| .awac-wrapper{ | |
| border:1px solid #333; | |
| background:#f3f3f7; | |
| margin-bottom:1em; | |
| padding:.8em | |
| } | |
| .awac{ | |
| margin-bottom:.8em | |
| } | |
| .awac .gform_wrapper .gform_footer{ |
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 | |
| if ( is_admin() ) | |
| return; | |
| if ( ! class_exists( 'ExtensionNoTitleLayout' ) ) { | |
| class ExtensionNoTitleLayout { | |
| function ExtensionNoTitleLayout() { | |
| it_classes_load( 'it-file-utility.php' ); | |
| $this->_base_url = ITFileUtility::get_url_from_file( dirname( __FILE__ ) ); | |
| add_action( 'builder_layout_engine_render', array( &$this, 'change_render_content' ), 0 ); |
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 | |
| $path = "http://mydomain.com/myfiles"; //Set this to where files are located; | |
| if ($handle = opendir('.')) { | |
| while (false !== ($entry = readdir($handle))) { | |
| if ($entry != "." && $entry != "..") { | |
| $fullentry = $path.'/'.$entry; | |
| echo "<a href='".$fullentry."'>".$entry."</a><br />"; | |
| } | |
| } | |
| closedir($handle); |