Themosis::setup PHP Метод

setup() защищенный Метод

At this moment, all activated plugins have been loaded. Each plugin has its service providers registered.
protected setup ( )
        protected function setup()
        {
            /*
             * Add view paths.
             */
            $viewFinder = $this->container['view.finder'];
            $viewFinder->addLocation(themosis_path('sys') . 'Metabox' . DS . 'Views');
            $viewFinder->addLocation(themosis_path('sys') . 'Page' . DS . 'Views');
            $viewFinder->addLocation(themosis_path('sys') . 'PostType' . DS . 'Views');
            $viewFinder->addLocation(themosis_path('sys') . 'Field' . DS . 'Fields' . DS . 'Views');
            $viewFinder->addLocation(themosis_path('sys') . 'Taxonomy' . DS . 'Views');
            $viewFinder->addLocation(themosis_path('sys') . 'User' . DS . 'Views');
            /*
             * Add paths to asset finder.
             */
            $url = plugins_url('src/Themosis/_assets', __FILE__);
            $assetFinder = $this->container['asset.finder'];
            $assetFinder->addPaths([$url => themosis_path('sys') . '_assets']);
            /*
             * Add framework core assets URL to the global
             * admin JS object.
             */
            add_filter('themosisAdminGlobalObject', function ($data) use($url) {
                $data['_themosisAssets'] = $url;
                return $data;
            });
            /*
             * Register framework media image size.
             */
            $images = new Themosis\Config\Images(['_themosis_media' => [100, 100, true, __('Mini', THEMOSIS_FRAMEWORK_TEXTDOMAIN)]], $this->container['filter']);
            $images->make();
            /*
             * Register framework assets.
             */
            $this->container['asset']->add('themosis-core-styles', 'css/_themosisCore.css', ['wp-color-picker'])->to('admin');
            $this->container['asset']->add('themosis-core-scripts', 'js/_themosisCore.js', ['jquery', 'jquery-ui-sortable', 'underscore', 'backbone', 'mce-view', 'wp-color-picker'], '1.3.0', true)->to('admin');
        }