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 | |
| // first unhook the title. | |
| remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title' ); | |
| // then hook your own. | |
| add_action( 'woocommerce_shop_loop_item_title', 'pp_custom_title', 30 ); | |
| /** | |
| * Modify the template loop title markup | |
| * | |
| * @return void |
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( 'excerpt_length', function($length) { | |
| return 11; | |
| } ); |
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_compatibility_actions', function( $content, $post_id ){ | |
| $your_field = get_field( 'selector', $post_id ); | |
| return $your_field; | |
| }, 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 | |
| add_action( 'passster_validation_success', function( $password ) { | |
| ?> | |
| <script> | |
| ga( 'send', 'event', 'Unlock Content', 'track_unlock', <?php echo $password; ?> ); | |
| </script> | |
| <?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 | |
| add_action( 'wp_footer', function() { | |
| $args = array( 'post_type' => 'post' ); | |
| $posts = get_posts( $args ); | |
| foreach ( $posts as $post ) { | |
| $post->content = preg_replace( '/<a class="fddd".*</a>/', '', $content ); | |
| echo '<pre>'; | |
| var_dump( $post->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
| <?php | |
| add_filter( 'exactmetrics_track_user', function( $track_user, $user ) { | |
| if ( function_exists( 'cn_cookies_accepted' ) && cn_cookies_accepted() ) { | |
| $track_user = true; | |
| } else { | |
| $track_user = false; | |
| } | |
| return $track_user; | |
| }, 2, 10 ); |
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_public_js_version_number', function(){ | |
| return '3.3'; | |
| }); |
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( 'passster_validation_success', function( $password ) { | |
| ?> | |
| <script> | |
| window.location.href = "https://yourawesomewebsite.com/success"; | |
| </script> | |
| <?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 | |
| add_filter( 'passster_compatibility_actions', function( $content, $post_id ){ | |
| $content = get_field( $post_id, 'your-acf-field' ); | |
| return $content; | |
| }, 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 | |
| add_action('wp_head', 'ps_disable_menu_links' ); | |
| function ps_disable_menu_links() { | |
| ?> | |
| <script> | |
| jQuery(document).ready(function( $ ) { | |
| let ps_cookie = cookie.get('passster'); | |