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
| class trueMetaBox { | |
| function __construct($options) { | |
| $this->options = $options; | |
| $this->prefix = $this->options['id'] .'_'; | |
| add_action( 'add_meta_boxes', array( &$this, 'create' ) ); | |
| add_action( 'save_post', array( &$this, 'save' ), 1, 2 ); | |
| } | |
| function create() { | |
| foreach ($this->options['post'] as $post_type) { | |
| if (current_user_can( $this->options['cap'])) { |
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 grd_client_filter_products_cpt( $args, $post_type ) { | |
| // If not courses CPT, bail. | |
| if ( 'courses' !== $post_type ) { | |
| return $args; | |
| } | |
| // Add additional courses CPT options. | |
| $args = array( | |
| 'has_archive' => false, | |
| ); | |
| // Merge args together. |
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
| var $form = $('form#telegram'), | |
| url = 'https://script.google.com/macros/s/------/exec' | |
| $('.telegram').submit(function (e) { | |
| e.preventDefault(); | |
| $.ajax({ | |
| url: url, | |
| method: "GET", | |
| dataType: "json", | |
| data: $(this).serialize() |
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
| #hmenu_load_2 .hmenu_navigation_holder > ul{position:relative;} | |
| #hmenu_load_2 .hmenu_mega_sub{width: max-content;} | |
| .hmenu_text_item a{color:#666!important;} | |
| .hmenu_text_item a:hover{color:#cc6600!important;} | |
| .hmenu_col_6 {width: max-content;} | |
| .hmenu_col_3 {width: max-content;} | |
| #hmenu_load_2 .hmenu_navigation_holder > ul li a .hmenu_nav_uni_9 span{display:none!important;} | |
| #hmenu_load_2 .hmenu_navigation_holder > ul li a .hmenu_nav_uni_10 span { | |
| display: none; | |
| } |
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
| <!--//https://heroplugins.com/product/hero-menu/documentation/?section=knowledge_base&article=Enfold//--> | |
| <?php | |
| if(!$blank) //blank templates dont display header nor footer | |
| { | |
| if(!class_exists( 'hmenu_frontend')){ | |
| //fetch the template file that holds the main menu, located in includes/helper-menu-main.php | |
| get_template_part( 'includes/helper', 'main-menu' ); | |
| } else { | |
| // wp_nav_menu( array( 'theme_location' => 'avia' ) ); | |
| echo do_shortcode( "[hmenu id=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
| jQuery(document).ready(function( $ ){ | |
| //$('.searchicon a').attr('data-avia-search-tooltip', '<form action="https://www.ambir.com/" id="searchform" method="get" class=""><div><input type="submit" value="" id="searchsubmit" class="button avia-font-entypo-fontello" /><input type="text" id="s" name="s" value="" placeholder="Search" /></div></form>'); | |
| $('.searchicon').append('<div class="avia-search-tooltip avia-tt" style="top: 95px; left: -138.5px; display: none; opacity: 1;"><div class="inner_tooltip"><form action="https://www.ambir.com/" id="searchform" method="get" class=""><div><input type="submit" value="" id="searchsubmit" class="button avia-font-entypo-fontello" style="background: #cc6600;color: #fff;"><input type="text" id="s" name="s" value="" placeholder="Search"></div></form></div><span class="avia-arrow-wrap"><span class="avia-arrow"></span></span></div>'); | |
| $('.searchicon a').click(function(e){ | |
| e.preventDefault(); | |
| console.log('click'); | |
| $('.avia-search-tooltip').toggle(); |
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_action( 'woocommerce_after_checkout_billing_form', 'primary_contact_fields' ); | |
| function primary_contact_fields( $checkout ){ | |
| if( is_virtual() ) { | |
| echo '</div>'; | |
| echo '<div class="woocommerce-primary_contact-fields" style="float:left;">'; | |
| echo '<h3>Primary Contact Information</h3>'; | |
| echo '<div class="woocommerce-primary_contact-fields__field-wrapper">'; | |
| woocommerce_form_field( 'primarycontactname', array( | |
| 'type' => 'text', // text, textarea, select, radio, checkbox, password, about custom validation a little later | |
| 'required' => true, // actually this parameter just adds "*" to the field |
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 | |
| require_once( dirname( __FILE__ ) . '/wp-load.php' ); | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'posts_per_page' => 9999999 | |
| ); |
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 | |
| // Use an ACF image field | |
| // Set the 'return value' option to "array" (this is the default) | |
| // This example uses three image sizes, called medium, medium_large, thumbnail | |
| $imageobject = get_field('image'); | |
| if( !empty($imageobject) ): | |
| echo '<img alt="' . $imageobject['title'] . '" src="' . $imageobject['sizes']['medium'] . '" srcset="' . $imageobject['sizes']['medium_large'] .' '. $imageobject['sizes']['medium_large-width'] .'w, '. $imageobject['sizes']['medium'] .' '. $imageobject['sizes']['medium-width'] .'w, '. $imageobject['sizes']['thumbnail'] .' '. $imageobject['sizes']['thumbnail-width'] .'w">'; | |
| endif; | |
| ?> |