Viewing 2 replies - 1 through 2 (of 2 total)
  • on line 50 in cf7-infusionsoft-addon.php,
    the scripts are being added to the admin/backend, changed to only enqueue scripts on the frontend – used “wp_enqueue_scripts” instead of “admin_enqueue_scripts”

    • This reply was modified 7 years, 3 months ago by anondev.
    • This reply was modified 7 years, 3 months ago by anondev.

    Made the scripts only run under the contact form plugin
    on line 50 in cf7-infusionsoft-addon.php

    /**
    * Enqueue Scripts with CF7 Dependencies
    */
    function cf7_infusionsoft_enqueue_scripts($hook) {

    if($hook != ‘toplevel_page_wpcf7’) {
    return;
    }

    if( !function_exists(‘wpcf7_add_meta_boxes’) ) {
    wp_enqueue_script( ‘cf7-infusionsoft-scripts’, plugin_dir_url(__FILE__) . ‘cf7-infusionsoft-scripts.js’, array(‘jquery’, ‘wpcf7-admin-taggenerator’, ‘wpcf7-admin’), null, true );
    }
    }
    add_action( ‘admin_enqueue_scripts’, ‘cf7_infusionsoft_enqueue_scripts’ );

    • This reply was modified 7 years, 3 months ago by anondev.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Broken Dependencies’ is closed to new replies.