roundcubemail/program/lib/Roundcube/rcube_plugin_api.php
public function load_plugins($plugins_enabled, $required_plugins = array())
    {
        foreach ($plugins_enabled as $plugin_name) {
            $this->load_plugin($plugin_name);
        }

        // check existance of all required core plugins
        foreach ($required_plugins as $plugin_name) {
            $loaded = false;
            foreach ($this->plugins as $plugin) {
                if ($plugin instanceof $plugin_name) {
                    $loaded = true;
                    break;
                }
            }

            // load required core plugin if no derivate was found
            if (!$loaded) {
                $loaded = $this->load_plugin($plugin_name);
            }

            // trigger fatal error if still not loaded
            if (!$loaded) {
                rcube::raise_error(array(
                    'code' => 520, 'type' => 'php',
                    'file' => __FILE__, 'line' => __LINE__,
                    'message' => "Requried plugin $plugin_name was not loaded"), true, true);
            }
        }
    }
public function load_plugins($plugins_enabled, $required_plugins = array())
    {
        foreach ($plugins_enabled as $plugin_name) {
            $this->load_plugin($plugin_name);
        }

        // check existance of all required core plugins
        foreach ($required_plugins as $plugin_name) {
            $loaded = false;
            foreach ($this->plugins as $plugin) {
                if ($plugin instanceof $plugin_name) {
                    $loaded = true;
                    break;
                }
            }

            // load required core plugin if no derivate was found
            if (!$loaded) {
                $loaded = $this->load_plugin($plugin_name);
            }

            // trigger fatal error if still not loaded
            if (!$loaded) {
                rcube::raise_error(array(
                    'code' => 520, 'type' => 'php',
                    'file' => __FILE__, 'line' => __LINE__,
                    'message' => "Requried plugin $plugin_name was not loaded"), true, true);
            }
        }
    }
public function load_plugins ( $ plugins_enabled , $ required_plugins = array ( ) ) { foreach ( $ plugins_enabled as $ plugin_name ) { $ this -> load_plugin ( $ plugin_name ) ; } // check existance of all required core plugins foreach ( $ required_plugins as $ plugin_name ) { $ loaded = false ; foreach ( $ this -> plugins as $ plugin ) { if ( $ plugin instanceof $ plugin_name ) { $ loaded = true ; break ; } } // load required core plugin if no derivate was found if ( ! $ loaded ) { $ loaded = $ this -> load_plugin ( $ plugin_name ) ; } // trigger fatal error if still not loaded if ( ! $ loaded ) { rcube :: raise_error ( array ( 'code' => 520 , 'type' => 'php' , 'file' => __FILE__ , 'line' => __LINE__ , 'message' => "Requried plugin $plugin_name was not loaded" ) , true , true ) ; } } }
Load and init all enabled plugins

This has to be done after rcmail::load_gui() or rcmail::json_init()
was called because plugins need to have access to rcmail->output

@param array List of configured plugins to load
@param array List of plugins required by the application
Load and init all enabled plugins