protected function loadShortCodes()
    {
        if ($config = $this->loadConfigFile('shortcodes.php')) {
            $renderer = $this->renderer;
            $app      = $this->app;

            foreach ($config as $shortcode => $provider) {
                add_shortcode($shortcode, function ($attrs, $content) use ($app, $provider, $renderer)
                {
                    if (is_string($provider) && is_subclass_of($provider, 'Tev\Plugin\Shortcode\AbstractProvider')) {
                        $sp = new $provider($app, $renderer);
                        return $sp->shortcode($attrs, $content);
                    } elseif ($provider instanceof Closure) {
                        return $provider($attrs, $content, $renderer);
                    }
                });
            }
        }

        return $this;
    }
protected function loadShortCodes()
    {
        if ($config = $this->loadConfigFile('shortcodes.php')) {
            $renderer = $this->renderer;
            $app      = $this->app;

            foreach ($config as $shortcode => $provider) {
                add_shortcode($shortcode, function ($attrs, $content) use ($app, $provider, $renderer)
                {
                    if (is_string($provider) && is_subclass_of($provider, 'Tev\Plugin\Shortcode\AbstractProvider')) {
                        $sp = new $provider($app, $renderer);
                        return $sp->shortcode($attrs, $content);
                    } elseif ($provider instanceof Closure) {
                        return $provider($attrs, $content, $renderer);
                    }
                });
            }
        }

        return $this;
    }
protected function loadShortCodes ( ) { if ( $ config = $ this -> loadConfigFile ( 'shortcodes.php' ) ) { $ renderer = $ this -> renderer ; $ app = $ this -> app ; foreach ( $ config as $ shortcode => $ provider ) { add_shortcode ( $ shortcode , function ( $ attrs , $ content ) use ( $ app , $ provider , $ renderer ) { if ( is_string ( $ provider ) && is_subclass_of ( $ provider , 'Tev\Plugin\Shortcode\AbstractProvider' ) ) { $ sp = new $ provider ( $ app , $ renderer ) ; return $ sp -> shortcode ( $ attrs , $ content ) ; } elseif ( $ provider instanceof Closure ) { return $ provider ( $ attrs , $ content , $ renderer ) ; } } ) ; } } return $ this ; }
Load shortcodes from configuration files.

@return \Tev\Plugin\Loader This, for chaining
Load shortcodes from configuration files .