e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
320 stars 213 forks source link

[Question]: Why e_library from frontend theme is applied in admin area? #5265

Open Jimmi08 opened 4 months ago

Jimmi08 commented 4 months ago

Question

For the frontend theme, I am excluding jQuery with e_library in the theme folder. I noticed that it influences admin theme too and jquery is not loaded then.

Expected Source

My working e_library in frontend theme: //after fix admin loading

class theme_library
{

    /**
     * Provides information about external libraries.
     */
    function config()
    {
        return array();
    }

    /**
     * Alters library information before detection and caching takes place.
     */
    function config_alter(&$libraries)
    {

        if (e_ADMIN_AREA)
        {
        }
        else
        {
            $libraries['cdn.jquery'] = array();
            $libraries['jquery'] = array();
            $libraries['cdn.jquery3'] = array();
            $libraries['jquery3'] = array();

        //  unset($libraries['cdn.jquery3']);
        //  unset($libraries['jquery3']);
        }

    }

}

Additional Context

This question is for core developers, otherwise, I would create a discussion topic. They dislike issues with non-related comments. Thanks for understanding.