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('wfea_cal_list_event_extra_options', function($options) { | |
| $post= get_post(); | |
| $venue= ''; | |
| if ( !empty($post->venue)) { | |
| $venue = ' @ ' . $post->venue->name; | |
| } | |
| $options['title'] =$options['title'] . $venue; | |
| return $options; | |
| }); |
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
| if ( $replace_with_your_freemius_global->can_use_premium_code__premium_only() ) { | |
| // premium code users if they ever had a licence show the contact form | |
| $replace_with_your_freemius_global->add_filter( | |
| 'is_submenu_visible', | |
| function ( $is_visible, $menu_id ) { | |
| /** @var \Freemius $replace_with_your_freemius_global Freemius global object. */ | |
| global $replace_with_your_freemius_global; | |
| if ( 'contact' === $menu_id ) { | |
| return $replace_with_your_freemius_global->has_any_license(); | |
| } |
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 | |
| /* | |
| * Plugin Name: Custom Ranges for Display Eventbrite Events | |
| * Plugin Description: This plugin allows you to set custom ranges for the Display Eventbrite Events plugin. | |
| */ | |
| /** | |
| * Set the valid range for the list view. | |
| */ | |
| add_filter( 'wfea_cal_list_options' , function( $options ) { |
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
| /** | |
| * Pricing Table Buttons and Freemius Functionlity. | |
| */ | |
| $('.pricing-table__button__trigger').click(function (e) { | |
| debugger; | |
| let coupon = null; | |
| const article = document.querySelector("#home-pricing-id"); | |
| if ( article != null ) { | |
| coupon = article.dataset.coupon; | |
| } |
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 | |
| /** | |
| * Plugin Name: Display Eventbrite custom code filter | |
| */ | |
| add_filter( 'wfea_api_results', function ( $events, $query ) { | |
| $events = array_filter( $events, function ( $event ) { | |
| return ( isset( $event->post_title ) ) ? preg_match( '#More Than One Story#', $event->post_title ) : false; | |
| } ); | |
| return $events; |
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 | |
| /** | |
| * Plugin Name: Remove Protected code snippet | |
| * Description: Remove the protected from the content of a post | |
| **/ | |
| add_filter( 'protected_title_format', function ( $format ) { | |
| return '%s'; | |
| } ); |
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 | |
| // disable direct access | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| // sending and saving form submission | |
| if ( $error == false ) { | |
| // hook to support plugin Contact Form DB | |
| do_action( 'vscf_before_send_mail', $form_data ); |
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( | |
| 'qem_event_register', | |
| /** | |
| * @param $args https://developer.wordpress.org/reference/functions/register_post_type/#parameters | |
| * | |
| * @return array | |
| */ | |
| function ( $args ) { | |
| $args['rewrite'] = array( 'slug' => 'my_custom_event_slug' ); |
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( | |
| 'rest_authentication_errors', | |
| function() { | |
| if ( ( preg_match( '/users/i', $_SERVER['REQUEST_URI'] ) !== 0 ) || ( isset( $_REQUEST['rest_route'] ) && ( preg_match( '/users/i', $_REQUEST['rest_route'] ) !== 0 ) ) ) { | |
| if ( ! is_user_logged_in() ) { | |
| $this->sue_log(); | |
| return new WP_Error( 'rest_cannot_access', esc_html__( 'Only authenticated users can access the User endpoint REST API.', 'stop-user-enumeration' ), array( 'status' => rest_authorization_required_code() ) ); | |
| } | |
| } |
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( | |
| 'wfea_age_restriction', | |
| /** | |
| * @param $output string filterable output | |
| * @param $age string Eventbrite string or all_ages | |
| * | |
| * @return string filtered output | |
| * | |
| */ | |
| function ( $output, $age ) { |