Search Results for 'dequeue'

Home Forums Search Search Results for 'dequeue'

Viewing 15 results - 121 through 135 (of 274 total)
  • Author
    Search Results
  • #1126653
    Josh
    Participant

    Hey James,

    Thanks for following up here. I can see a little bit of what you’re describing on your site with the styles disappearing. Unfortunately I’m still unable to replicate the issue locally with the latest version of the plugin. When you notice the issue, are all of your custom styles added in the theme style override lost when switching views or is it just a few of the styles.

    The javascript error you describe would definitely be a performance issue with the plugin. It looks like it is also the root issue with the mobile event issue you describe. That error is triggered on resize so if you resize to mobile, the calendar doesn’t work. However, if you then do a refresh on the page (without resizing) the mobile calendar works perfectly.

    Finding the root of that js error and dequeueing that script or modifying would help that issue and could potentially get us closer on the style issue as well.

    Let me know if this helps.

    Thanks!

     

    #1121359
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    I created this coding to prevent the javascript and css from being loaded:

    add_action( 'wp_enqueue_scripts', 'tribe_disable_this_week_scripts', 20 );
    function tribe_disable_this_week_scripts() {
    wp_dequeue_script( 'tribe-this-week' );
    wp_dequeue_style( 'widget-this-week-pro-style' );
    wp_dequeue_style( 'tribe_events-widget-this-week-pro-style' );
    }

    Add that to your theme’s functions.php and that should fix it.

    It worked in my test site. Let me know if it works for you.

    Cheers

    Brook
    Participant

    Howdy bkozlowski,

    Thanks for taking the time to reach out about this. Truth be told we view this as a bug, we don’t want our scripts loading on other pages anymore than you do. Site performance is a top consideration in our book.

    The solution from 3 years ago does not look super relevant today. Over the years thais has been an issue that disappears and reappears. You will see this problem mentioned in a few forums posts over the years, but often times it is a different script in each one people are trying to get rid of. We are working on fundamentally reworking this system so that it is inherintly better and more resistant to this sort of problem.

    Until then here was a recently tested solution to this problem. As you can see George tested Diane’s code, but he hooked using:

    add_action( 'wp_enqueue_scripts', 'dequeue_tribe_events_scripts_and_styles' );

    I suspect Diane was initially having issues because she did not hook the right action. Does that solution work for you?

    PS. I added your topic to those who would be interested in being notified when this bug is fixed. We will respond here once an updated release is out that contains a fix.

    Cheers!

    – Brook

     

    Allen Presher
    Participant

    Three places a quick google search turned up that users have come to this forum, asked for the exact same information, and received it:

    I did state where I wanted to remove these assets from: all pages other than those generated by the Events Calendar. That should be simple enough as the Events Calendar plugin defines a custom post type through which it operates, therefore any calls could be placed in logic such as:

    if ( !is_post_type_archive('tribe_events') && !is_singular('tribe_events') )

    Recap: Update hurts clients’ sites, no fix for months, refusal to provide a solution that was provided repeatedly in the past. I give up. Please close the thread.

    Apologies to anyone in the community who finds this thread looking for a solution.

    #1112731

    In reply to: The map doesn't work

    Geoff
    Member

    Thanks for doing that, Sergio!

    Themes conflicts are very tough for us since we are not familiar with the theme codebase. In these kinds of circumstances, reaching out to the theme author is going to be your best bet for getting a solid answer.

    One thing to check for is whether the theme also uses the Google Maps API. If it does, then that can certainly lead to conflicts since the API is being called twice. In that case, the theme author might be able to provide you with a snippet to dequeue the theme’s Google Maps API call on events posts/pages.

    Sorry I don’t have a concrete answer for you here, but I hop this at least helps get the ball rolling in the right direction. And, of course, I’m happy to leave this thread open in case the theme author has any questions I can help with.

    Thanks,
    Geoff

    George
    Participant

    If you modify core code of a plugin or theme, every time you update it it any changes to core code will be overwritten. There is not anything we can do to alter this truth, but the code fix I shared is a temporary way to fix a problem you described as very negative.

    If you don’t want that fix, then the best option is to wait for an official plugin update that does this.


    In regards to dequeueing scripts, I do not know where on your site you want things dequeued, and where you will then selectively be re-enqueueing them (if at all).

    But you’re right that simply dequeueing a script is easy, so you should have no problem dequeuing any script or stylehseet you would like.

    To find scripts and styles you want to dequeue, simply open the plugin code for The Events Calendar or Events Calendar Pro in your code editor of choice, and use its “Find in Folder” feature to look for all instances of wp_enqueue_script() and wp_enqueue_style().

    If you find an instance and it is a script or stylesheet you want to dequeue, then make a simple little one-liner like you described above and you’re good to go! 😀

    Cheers and best of luck with your modifications,
    George

    Allen Presher
    Participant

    The temporary fix for the jQuery load isn’t particularly sufficient as it requires the editing of core code (and the editing of core code on every site this has been deployed). If you guys choose to ship a plugin update that does not include the fix, you will have undone my efforts across every site I’ve patched this. Can you commit to not wiping out my work (as has happened in the past with this same issue)?

    At not point have I demanded “extensive custom coding”. I’m just looking for you to give me the code required to dequeue them. Here’s what such code might look like:

    wp_dequeue_script( 'ASSET-NAME-HERE');

    Was that extensive? We’re talking 3-4 one liners, purely declarative. Lines Events Calendar support has provided in the past as a simple search on this forum will show. Not sure why you’re refusing to answer this now.

    Allen Presher
    Participant

    Please provide me the code required to dequeue these assets on all pages but those generated by the Events Calendar. While I understand that I can reverse engineer the plugin and figure this out on my own, I don’t think that’s something that I as a customer should have to do.

    Regarding the loading of jQuery I am correct that the Events Calendar is effectively overwriting our theme preference of loading jQuery in the footer (an industry best practice for performance) and placing it in the head. As much as I hate reverse engineering a plugin we pay for when I’ve specific information that could used to solve the problem, the offending line is:

    Line 39:
    /plugins/events-calendar-pro/src/Tribe/This_Week.php

    And that line is as follows:

    wp_enqueue_script( 'tribe-this-week', tribe_events_pro_resource_url( 'widget-this-week.min.js' ), array( 'jquery' ), apply_filters( 'tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION ) );
    

    You can see that script is being enqued to the head, and requires jQuery, thus forcing jQuery to be loaded first into the head. This is a terrible thing to do to your customers sites by default and without consent.

    Please consider developers who buy many licenses, deploy the Events Calendar on multiple sites in development, realize that the plugin has the default behavior of loading assets on every page, then come here and ask you guys for a solution. We then use the solution you guys provide, the sites go live, and then 6 months later we find out that an update injected a bunch of assets on every page of each site, and even changed the loading location of jQuery to the head which totally blocks page rendering.

    This could all be easily solved by building an option into the plugin that developers could check off that simply says “load Events Calendar assets only on pages generated by the Events Calendar”. That option could work from tomorrow, till a decade from now, and if you’re concerned that restricting the loading of assets to only Events Calendar pages could cause some theme integration problems that’s why the option would be off by default, with a warning message that it’s for developers only. Bury the option somewhere. Even just make it a PHP flag for us.

    George
    Participant

    Hey @Stratejusinc,

    At this time, the only way to un-load scripts from our plugins is to search the plugin folders for any instance of wp_enqueue_script(). Then you can use wp_dequeue_script() in your theme or a custom plugin to disable these scripts, and then selectively load them where needed/wanted.

    As for our plugins loading jQuery in the header, I do not find this to be the case on my own sites. Perhaps another plugin or your theme is making this happen?

    If possible, please post the “System information” of one of these afflicted sites you mention—you can learn how to do so here → https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    Thank you,
    George

    #1111057
    Hunter
    Moderator

    Hey Matt,

    Thanks for reaching out and I’d be happy to address your questions 🙂

    The “errors/notices littering the console” are all just diagnostic information, no errors.

    Unfortunately, dequeueing scripts is still a manual process. The best we can recommend is to get a code editor with a “Find in Folder” search feature and search for all instances inside our plugins of wp_enqueue_script(). Copy the script handle from these functions, then write a function that performs wp_dequeue_script() for each script handle.

    Lastly, would you be able to temporarily open your site for public viewing? It is currently blocked and requires authorization to view. We cannot use customer credentials, so if possible, please open it publicly so that we can see what the actual JavaScript conflict is.

    Thanks again for the inquiry and I look forward to your response. Take care and enjoy your day!

    #1105782
    Brook
    Participant

    Howdy Eric,

    I would love to help you with this. That’s a great question, we could certainly make the guide a little more specific here.

    No, it is not possible to override the admin-views folder. We are however considering making this possible, at the very least we would like to make all admin-views that are used in Community Events plugin overridable, if not all of them in general.

    However, it is possible to add your settings to the filter ‘tribe_general_settings_tab_fields’. You’ll note at the very end of tribe-options-general.php it runs this filter, and passes the $generalTabFields array. So you can add your items to that array via the filter.

    You can also use the WP script enqueue/dequeue system to override and JavaScript, including ours. Those two links elaborate quite a bit on the topic.

    Does that answer your question? Are you able to do your customization now?

    Cheers!

    – Brook

    #1105584

    In reply to: change grid photo view

    Hunter
    Moderator

    Hey Ed,

    Welcome back to the forums and Happy Thursday 🙂

    I recently helped another customer with a similar request. I’ll copy/paste my reply below. Please note that this type of customization extends beyond what we’re able to provide, but we’re always happy to point you in the right direction.

    To get started changing the columns from 3 to 4, you’ll need to familiarize yourself with the Isotope Script as it’s what we use to create the layout.

    Then we run a script to initialize Isotope on that page.

    /events-calendar-pro/resources/tribe-events-photo-view.min.js

    Non-minified Version:

    /events-calendar-pro/resources/tribe-events-photo-view.js

    So to change the formatting you can wp_dequeue_script the first script and then replace it with your own.

    Best of luck with the customizations and thanks for choosing PRO!

    #1103488
    Hunter
    Moderator

    Hello Hani,

    Welcome back!

    The functionality you describe is not a built-in feature, but I can definitely see the validity in it! If you have a second, please visit our UserVoice Feature Ideas and add the feature as a request if it hasn’t been already.

    To get started changing the columns from 3 to 4, you’ll need to familiarize yourself with the Isotope Script as it’s what we use to create the layout.

    Then we run a script to initialize Isotope on that page.

    /events-calendar-pro/resources/tribe-events-photo-view.min.js

    Non-minified Version:

    /events-calendar-pro/resources/tribe-events-photo-view.js

    So to change the formatting you can wp_dequeue_script the first script and then replace it with your own.

    Good luck with the customizations and thanks for reaching out. Have a great weekend!

    Abraham
    Participant

    Problem persists with 2015 theme.
    I had checked my funtions file and it looked fine.

    For reference, here is the functions.php file:

    <?php
    /**
    * progression functions and definitions
    *
    * @package progression
    * @since progression 1.0
    */

    if ( ! function_exists( ‘progression_setup’ ) ) :
    /**
    * Sets up theme defaults and registers support for various WordPress features.
    *
    * Note that this function is hooked into the after_setup_theme hook, which runs
    * before the init hook. The init hook is too late for some features, such as indicating
    * support post thumbnails.
    *
    * @since progression 1.0
    */

    function progression_setup() {

    if(function_exists( ‘set_revslider_as_theme’ )){
    add_action( ‘init’, ‘pro_ezio_custom_slider_rev’ );
    function pro_ezio_custom_slider_rev() { set_revslider_as_theme(); }
    }
    add_action( ‘vc_before_init’, ‘progression_SetAsTheme’ );
    function progression_SetAsTheme() { vc_set_as_theme( $disable_updater = true ); }

    // Post Thumbnails
    add_theme_support( ‘post-thumbnails’ );
    add_image_size(‘progression-blog’, 800, 350, true); // Blog Post Image
    add_image_size(‘progression-wine’, 380, 830, false); // Wine Post Image
    add_image_size(‘progression-event’, 600, 350, true); // Wine Post Image

    /**
    * Make theme available for translation
    * Translations can be filed in the /languages/ directory
    * If you’re building a theme based on progression, use a find and replace
    * to change ‘progression’ to the name of your theme in all the template files
    */
    load_theme_textdomain( ‘progression’, get_template_directory() . ‘/languages’ );

    /**
    * Add default posts and comments RSS feed links to head
    */
    add_theme_support( ‘automatic-feed-links’ );

    /**
    * Custom Widgets
    */
    require( get_template_directory() . ‘/inc/widgets/widgets.php’ );

    /*
    * Let WordPress manage the document title.
    * By adding theme support, we declare that this theme does not use a
    * hard-coded <title> tag in the document head, and expect WordPress to
    * provide it for us.
    */
    add_theme_support( ‘title-tag’ );

    /**
    * Enable support for Post Formats
    */
    add_theme_support( ‘post-formats’, array( ‘gallery’, ‘video’, ‘audio’, ‘link’ ) );

    /**
    * This theme uses wp_nav_menu() in one location.
    */
    register_nav_menus( array(
    ‘primary’ => esc_html__( ‘Primary Menu’, ‘progression’ ),
    ) );

    }
    endif; // progression_setup
    add_action( ‘after_setup_theme’, ‘progression_setup’ );

    /**
    * Set the content width based on the theme’s design and stylesheet.
    *
    * @since progression 1.0
    */
    if ( ! isset( $content_width ) )
    $content_width = 1200; /* pixels */

    /**
    * Register widgetized area and update sidebar with default widgets
    *
    * @since progression 1.0
    */
    function progression_widgets_init() {
    register_sidebar( array(
    ‘name’ => __( ‘Sidebar’, ‘progression’ ),
    ‘description’ => ‘Default sidebar’,
    ‘id’ => ‘sidebar-1’,
    ‘before_widget’ => ‘<div id=”%1$s” class=”sidebar-item widget %2$s”>’,
    ‘after_widget’ => ‘</div><div class=”sidebar-divider-pro”></div>’,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘

    ‘,
    ) );

    register_sidebar( array(
    ‘name’ => __( ‘Footer Widgets’, ‘progression’ ),
    ‘description’ => __( ‘Footer widgets’, ‘progression’ ),
    ‘id’ => ‘footer-widgets’,
    ‘before_widget’ => ‘<div id=”%1$s” class=”widget-pro %2$s”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘

    ‘,
    ) );

    register_sidebar( array(
    ‘name’ => __( ‘Shop Sidebar’, ‘progression’ ),
    ‘description’ => ‘WooCommerce sidebar’,
    ‘id’ => ‘sidebar-shop’,
    ‘before_widget’ => ‘<div id=”%1$s” class=”sidebar-item widget %2$s”>’,
    ‘after_widget’ => ‘</div><div class=”sidebar-divider-pro”></div>’,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘

    ‘,
    ) );
    }
    add_action( ‘widgets_init’, ‘progression_widgets_init’ );

    /**
    * Enqueue scripts and styles
    */
    function progression_scripts() {
    wp_enqueue_style( ‘progression-style’, get_stylesheet_uri() );
    wp_enqueue_style( ‘google-fonts’, ‘http://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,600,700|Lato:100,300,400,700’, array( ‘progression-style’ ) );
    wp_enqueue_script( ‘plugins’, get_template_directory_uri() . ‘/js/plugins.js’, array( ‘jquery’ ), ‘20120206’, true );
    wp_enqueue_script( ‘scripts’, get_template_directory_uri() . ‘/js/script.js’, array( ‘jquery’ ), ‘20120206’, true );
    wp_enqueue_script( ‘google_maps’, ‘http://maps.google.com/maps/api/js?sensor=false&#8217;, 1 );
    wp_enqueue_script( ‘gomap’, get_template_directory_uri() . ‘/js/jquery.gomap-1.3.3.min.js’, array( ‘jquery’ ), ‘20120206’, false );

    wp_enqueue_style( ‘prettyphoto’ );

    if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) { wp_enqueue_script( ‘comment-reply’ ); }

    }
    add_action( ‘wp_enqueue_scripts’, ‘progression_scripts’ );

    /**
    * Remove plugin scripts and styles
    */
    function pro_deregisterstyles() {
    wp_deregister_style( ‘flexslider’ );
    wp_deregister_style( ‘font-awesome’ );
    wp_deregister_script( ‘prettyphoto’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘pro_deregisterstyles’, 100 );

    /**
    * Custom Editor Styles
    */
    function progression_add_editor_styles() {
    add_editor_style( ‘inc/editor-style.css’ );
    }
    add_action( ‘admin_init’, ‘progression_add_editor_styles’ );

    /**
    * Custom template tags for this theme.
    */
    require get_template_directory() . ‘/inc/template-tags.php’;

    /**
    * Custom functions that act independently of the theme templates.
    */
    require get_template_directory() . ‘/inc/extras.php’;

    /**
    * Custom Metabox Fields
    */
    require get_template_directory() . ‘/inc/Custom-Meta-Boxes/custom-meta-boxes.php’;

    /**
    * Theme Customizer
    */
    require get_template_directory() . ‘/inc/default-customizer.php’;

    /**
    * Theme Customizer
    */
    require get_template_directory() . ‘/inc/mega-menu/mega-menu-framework.php’;

    /**Change buttons on Events Details page – no longer requested
    add_filter(‘tribe_get_event_website_link_label’, ‘tribe_get_event_website_link_label_default’);

    function tribe_get_event_website_link_label_default ($label) {
    if( $label == tribe_get_event_website_url() ) {
    $label = “Buy Tickets Now »”;
    $class = “pro-button-shortcode event-btn default-style-pro small-size-pro tickets-button”;
    }

    return ‘‘ . $label . ‘ ‘;
    } */

    /**Hide items from Admin Menu */
    add_action( ‘admin_menu’, ‘oc_remove_menus’, 999 );
    function oc_remove_menus() {

    remove_menu_page( ‘edit-comments.php’ ); // Comments
    remove_menu_page( ‘edit.php?post_type=wine’ ); //Wines

    }

    /**
    * WooCommerce Functions
    */
    if ( ! function_exists( ‘woocommerce’ ) ) require get_template_directory() . ‘/inc/woocommerce-functions.php’;

    /**
    * Load Plugin Activiation
    */
    require get_template_directory() . ‘/inc/tgm-plugin-activation/plugin-activation.php’;

    /* Remove Password Strength Meter */
    function wc_ninja_remove_password_strength() {
    if ( wp_script_is( ‘wc-password-strength-meter’, ‘enqueued’ ) ) {
    wp_dequeue_script( ‘wc-password-strength-meter’ );
    }
    }
    add_action( ‘wp_print_scripts’, ‘wc_ninja_remove_password_strength’, 100 );

    /**
    * Manipulate default state and countries
    *
    * As always, code goes in your theme functions.php file
    */
    add_filter( ‘default_checkout_country’, ‘change_default_checkout_country’ );
    add_filter( ‘default_checkout_state’, ‘change_default_checkout_state’ );

    function change_default_checkout_country() {
    return ‘US’; // country code
    }

    function change_default_checkout_state() {
    return ‘CA’; // state code
    }

    // Simply remove anything that looks like an archive title prefix (“Archive:”, “Foo:”, “Bar:”).
    add_filter(‘get_the_archive_title’, function ($title) {
    return preg_replace(‘/^\w+: /’, ”, $title);

    });
    /**
    * Disables the public attendee lists on all events
    *
    * Removes the tribe_events_single_event_after_the_meta action that injects the attendee
    * list that was introduced with the initial 4.1 release of Event Tickets Plus
    */
    function disable_attendee_list_on_post() {
    if ( ! class_exists( ‘Tribe__Tickets_Plus__Attendees_List’ ) ) {
    return;
    }

    remove_action(
    ‘tribe_events_single_event_after_the_meta’,
    array(
    Tribe__Tickets_Plus__Attendees_List::instance(),
    ‘render’
    ),
    4
    );
    }

    add_action( ‘wp’, ‘disable_attendee_list_on_post’ );

    // Check the password and confirm password fields match before allow checkout to proceed.
    add_action( ‘woocommerce_after_checkout_validation’, ‘wc_check_confirm_password_matches_checkout’, 10, 2 );
    function wc_check_confirm_password_matches_checkout( $posted ) {
    $checkout = WC()->checkout;
    if ( ! is_user_logged_in() && ( $checkout->must_create_account || ! empty( $posted[‘createaccount’] ) ) ) {
    if ( strcmp( $posted[‘account_password’], $posted[‘account_password2’] ) !== 0 ) {
    wc_add_notice( __( ‘Passwords do not match.’, ‘woocommerce’ ), ‘error’ );
    }
    }
    }

    add_action(“admin_menu”, “createMyMenus”);
    function createMyMenus() {
    add_users_page (“Export OCWS”, “Export OCWS”, 0 , “/api/?userExport=true” );
    }

    #1093589
    Geoff
    Member

    Hi Ivan and thanks for getting in touch! I hope that Community Events and The Events Calendar will both work well for you. 🙂

    Good question. If the datepicker is not working, then it could be a conflict with the theme or another plugin. We use a Javascript plugin for the datepicker and it’s very possible that it is conflicting with the scripts from somewhere else.

    There is a way to dequeue the calendar’s scripts, so that might be something you would be interested in trying to resolve any conflicts. You can also follow the troubleshooting steps listed here to pinpoint where any conflicts are coming from.

    I also want to remind you that we have a really nice refund policy that allows you to return any of our products within 30 days of purchase, should something not work out as expected. Definitely take advantage of that if you’d like to test the compatibility further.

    Does this help answer your questions? Please let me know.

    Cheers,
    Geoff

Viewing 15 results - 121 through 135 (of 274 total)