• Hello miniOrange,

    I am developing a custom theme.

    In the mo_adfs_sso_settings_script function into /wp-content/plugins/miniorange-adfs-login/mo-adfs-sso-settings.php file and in the mo_adfs_login_settings_script_widget function into public/wp-content/plugins/miniorange-adfs-login/actions/mo-login-adfs-sso-widget.php I think that it is necessarry that the wp_enqueue_script function depend on jQuery. At the moment in custom themes, the scripts of plugin load before the jQuery script.

    Of

    function mo_adfs_sso_settings_script() {
    wp_enqueue_script( ‘mo_adfs_sso_admin_settings_script’, plugins_url( ‘includes/js/settings.js’, __FILE__ ) );
    wp_enqueue_script( ‘mo_adfs_sso_admin_settings_phone_script’, plugins_url(‘includes/js/phone.js’, __FILE__ ) );
    }

    function mo_adfs_login_settings_script_widget() {
    wp_enqueue_script(‘jquery’);
    wp_enqueue_script( ‘mo_adfs_sso_admin_settings_script_widget’, plugins_url().’/miniorange-adfs-login/includes/js/settings.js’ );
    }

    to

    function mo_adfs_sso_settings_script() {
    wp_enqueue_script(‘mo_adfs_sso_admin_settings_script’, plugins_url( ‘includes/js/settings.js’, __FILE__ ), array( ‘jquery’ ) );
    wp_enqueue_script(‘mo_adfs_sso_admin_settings_phone_script’, plugins_url(‘includes/js/phone.js’, __FILE__ ), array( ‘jquery’ ) );
    }

    function mo_adfs_login_settings_script_widget() {
    wp_enqueue_script(‘jquery’);
    wp_enqueue_script( ‘mo_adfs_sso_admin_settings_script_widget’, plugins_url().’/miniorange-adfs-login/includes/js/settings.js’, array(‘jquery’) );
    }

    Grettings José J. Peleato Pradel

  • The topic ‘jQuery dependencies’ is closed to new replies.