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( 'wcc_hide_notice', 'my_special_notice' ); | |
| function my_special_notice() { | |
| $notice = 'My special notice'; | |
| return $notice; | |
| } |
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
| $passwords = array('123', '345', '678' ); | |
| if ( true === passster\PS_Conditional::are_passwords_valid( $passwords ) ) { | |
| the_content(); | |
| } |
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( 'pre_get_posts', 'pp_exact_search', 10 ); | |
| /** | |
| * Adding exact match to wp search | |
| * | |
| * @param object $query current query object. | |
| * @return void | |
| */ | |
| function pp_exact_search( $query ) { | |
| if ( ! is_admin() && $query->is_main_query() && $query->is_search ) { |
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( 'show_user_profile', 'add_kdnr_field' ); | |
| add_action( 'edit_user_profile', 'add_kdnr_field' ); | |
| function add_kdnr_field( $user ) { ?> | |
| <table class="form-table"> | |
| <tr> | |
| <th><label for="address">Kundennummer</label></th> | |
| <td> | |
| <input type="text" name="kdnr" id="kdnr" value="<?php echo esc_attr( get_the_author_meta( 'kdnr', $user->ID ) ); ?>" class="regular-text" /><br /> | |
| <span class="description">Bitte füge deine Kundennummer ein.</span> |
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 price per unit, it plugin https://woocommerce.com/products/google-product-feed/ is used | |
| add_filter( 'woocommerce_gpf_feed_item',function ( $feed_item, $product ) { | |
| if ( class_exists( 'WGM_Price_Per_Unit' ) ) { | |
| if ( method_exists( $product, 'get_type' ) ) { | |
| if ( 'variation' === $product->get_type() ) { | |
| $price_per_unit_data = wcppufv_get_price_per_unit_data( $product->get_id(), $product ); |
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 | |
| /** | |
| * Google Produkt Feed mit Germanized | |
| * | |
| * @param object $feed_item the current feed item. | |
| * @param object $product the product object. | |
| * @return object | |
| */ | |
| function gz_woocommerce_gpf_add_unit_price( $feed_item, $product ) { |
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( 'passster_password_form', 'passster_new_template' ); | |
| /** Filters the password template from passster */ | |
| function passster_new_template() { | |
| $path = get_stylesheet_directory() . '/passster/template.php'; | |
| return $path; | |
| } |
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 additional content to passster */ | |
| add_filter( 'passster_content', 'passster_scroller_element', 10, 1 ); | |
| function passster_scroller_element( $content ) { | |
| $content .= '<span id="passster-scroll"></span>'; | |
| return $content; | |
| } | |
| /* add a auto scroller when content successfully unlocked */ |
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('wp_footer', 'pp_convert_youtube' ); | |
| function pp_convert_youtube() { | |
| ?> | |
| <script> | |
| jQuery(document).ready(function( $ ) { | |
| $(".wpb_video_wrapper iframe").each( function() { | |
| var old_src = $(this).attr("src"); | |
| /* get the youtube id from the src attribute */ |
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( 'wc_google_analytics_pro_do_not_track', 'pp_block_ga_tracking', 3, 10 ); | |
| function pp_block_ga_tracking( $do_not_track, $admin_event, $user_id ) { | |
| $do_not_track = true; | |
| if ( function_exists( 'cn_cookies_accepted' ) && cn_cookies_accepted() ) { | |
| $do_not_track = false; | |
| } | |
| return $do_not_track; | |
| } |