Returns the list of plugins that can work as sitepolicy handlers (have class PLUGINNAME\privacy\sitepolicy\handler)
@return array
178919
public function get_all_handlers() {
        $sitepolicyhandlers = [];
        foreach (\core_component::get_plugin_types() as $ptype => $unused) {
            $plugins = \core_component::get_plugin_list_with_class($ptype, 'privacy\local\sitepolicy\handler') +
                \core_component::get_plugin_list_with_class($ptype, 'privacy_local_sitepolicy_handler');
            // Allow plugins to have the class either with namespace or without (useful for unittest).
            foreach ($plugins as $pname => $class) {
                $sitepolicyhandlers[$pname] = $class;
            }
        }
        return $sitepolicyhandlers;
    }
1293162
public static function getHandlerList()
    {
        $handlerList = array();
        $ini = eZINI::instance( 'http.ini' );
        if ( $ini->hasGroup( 'HTTPCacheHandlers' ) && $ini->hasVariable( 'HTTPCacheHandlers', 'Handlers' ) )
            $handlerList = $ini->variable( 'HTTPCacheHandlers', 'Handlers' );
        
        return $handlerList;
    }
121180
private static function get_network_plugins() {
            self::require_plugin_essentials();

            $all_plugins = fs_get_plugins();

            $network_active_basenames = is_multisite() ?
                get_site_option( 'active_sitewide_plugins' ) :
                array();

            foreach ( $all_plugins as $basename => &$data ) {
                // By default set to inactive (next foreach update the active plugins).
                $data['is_active'] = false;
                // Enrich with plugin slug.
                $data['slug'] = self::get_plugin_slug( $basename );
            }

            // Flag active plugins.
            foreach ( $network_active_basenames as $basename ) {
                if ( isset( $all_plugins[ $basename ] ) ) {
                    $all_plugins[ $basename ]['is_active'] = true;
                }
            }

            return $all_plugins;
        }
908988
public function getPluginActivities() {
		$activities = $this->getActivities();

		if ( ! isset( $activities[ $this->plugin ] ) ) {
			$activities[ $this->plugin ] = array();
		}

		return $activities[ $this->plugin ];
	}
435139
public function get_avaliable_policies() {
        if ($this->policies === null) {
            $this->policies = [];
            foreach (\tool_policy\api::list_policies() as $policy) {
                // Make a list of all versions that are not draft and are not guest-only.
                $policy->versions = [];
                if ($policy->currentversion && $policy->currentversion->audience != policy_version::AUDIENCE_GUESTS) {
                    $policy->versions[$policy->currentversion->id] = $policy->currentversion;
                } else {
                    $policy->currentversion = null;
                }
                foreach ($policy->archivedversions as $version) {
                    if ($version->audience != policy_version::AUDIENCE_GUESTS) {
                        $policy->versions[$version->id] = $version;
                    }
                }
                if ($policy->versions) {
                    $this->policies[$policy->id] = $policy;
                }
            }
        }
        return $this->policies;
    }
824364
private function get_current_plugins() {
		$updates_avail = get_site_transient( 'update_plugins' );

		$msg = '';
		foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
			$plugin_data = get_plugin_data( $plugin );

			$plugin_file = str_replace( trailingslashit( WP_PLUGIN_DIR ), '', $plugin );

			if ( isset( $updates_avail->response[ $plugin_file ] ) ) {
				$msg .= '<i class="icon-close1"></i> ';
			}
			$msg .= '<a href="' . $plugin_data['PluginURI'] . '">' . $plugin_data['Name'] . '</a> v' . $plugin_data['Version'] . '<br/>';
		}

		return $msg;
	}
906021
public function getHandlers()
    {
        $handlers = &gplcart_static('install.handlers');

        if (isset($handlers)) {
            return $handlers;
        }

        $handlers = array();
        $this->hook->attach('install.handlers', $handlers, $this);

        foreach ($handlers as $id => &$handler) {

            if (empty($handler['module'])) {
                unset($handlers[$id]);
                continue;
            }

            $info = $this->module->getInfo($handler['module']);

            if (empty($info['type']) || $info['type'] !== 'installer') {
                unset($handlers[$id]);
                continue;
            }

            $handler['id'] = $id;
            $handler['weight'] = isset($handler['weight']) ? $handler['weight'] : 0;
        }

        $handlers = array_merge($handlers, $this->getDefaultHandler());
        gplcart_array_sort($handlers);
        return $handlers;
    }
910960
public function getInternalPlugins()
    {
        // Return only plugins with no custom url
        $plugins = [];
        foreach ($this->getPlugins() as $name => $url) {
            if (empty($url)) {
                $plugins[] = $name;
            }
        }
        return $plugins;
    }
302564
protected function getPlugins(): array
    {
        if ($this->plugins) {
            return $this->plugins;
        }

        // Load WordPress's plugin helper functions.
        require_once ABSPATH.'wp-admin/includes/plugin.php';

        $plugins = array_diff_key(
            get_plugins('/'.$this->getRelativePath()),
            get_mu_plugins()
        );

        $this->plugins = array_unique($plugins, SORT_REGULAR);

        return $this->plugins;
    }
845573
public function getFilters()
    {
        return array(
            'timeAgo' => new \Twig_Filter_Method($this, 'timeAgo'),
            'homeLink' => new \Twig_Filter_Method($this, 'homeLink'),
            'activeLink' => new \Twig_Filter_Method($this, 'activeLink'),
            'activeRoute' => new \Twig_Filter_Method($this, 'activeRoute'),
            'compareRoute' => new \Twig_Filter_Method($this, 'compareRoute'),
            'autoLink' => new \Twig_Filter_Method($this, 'autoLink')
        );
    }
485176
private function setup_skip_plugins_filters() {
		$wp_cli_filter_active_plugins = function( $plugins ) {
			$skipped_plugins = WP_CLI::get_runner()->config['skip-plugins'];
			if ( true === $skipped_plugins ) {
				return array();
			}
			if ( ! is_array( $plugins ) ) {
				return $plugins;
			}
			foreach ( $plugins as $a => $b ) {
				// active_sitewide_plugins stores plugin name as the key.
				if ( false !== strpos( current_filter(), 'active_sitewide_plugins' ) && Utils\is_plugin_skipped( $a ) ) {
					unset( $plugins[ $a ] );
					// active_plugins stores plugin name as the value.
				} elseif ( false !== strpos( current_filter(), 'active_plugins' ) && Utils\is_plugin_skipped( $b ) ) {
					unset( $plugins[ $a ] );
				}
			}
			// Reindex because active_plugins expects a numeric index.
			if ( false !== strpos( current_filter(), 'active_plugins' ) ) {
				$plugins = array_values( $plugins );
			}
			return $plugins;
		};

		$hooks = array(
			'pre_site_option_active_sitewide_plugins',
			'site_option_active_sitewide_plugins',
			'pre_option_active_plugins',
			'option_active_plugins',
		);
		foreach ( $hooks as $hook ) {
			WP_CLI::add_wp_hook( $hook, $wp_cli_filter_active_plugins, 999 );
		}
		WP_CLI::add_wp_hook(
			'plugins_loaded',
			function() use ( $hooks, $wp_cli_filter_active_plugins ) {
				foreach ( $hooks as $hook ) {
					remove_filter( $hook, $wp_cli_filter_active_plugins, 999 );
				}
			},
			0
		);
	}
1109371
public function getActionHandlers()
    {
        $handlers = &gplcart_static('image.style.action.handlers');

        if (isset($handlers)) {
            return (array) $handlers;
        }

        $handlers = (array) gplcart_config_get(GC_FILE_CONFIG_IMAGE_ACTION);
        $this->hook->attach('image.style.action.handlers', $handlers, $this);
        return (array) $handlers;
    }
1117829
public function getControllerPluginConfig()
    {
        return [
            'aliases' => [
                'tssEmail' => Controller\Plugin\EmailPlugin::class,
                'tssImageThumb' => Controller\Plugin\ImageThumbPlugin::class,
                'tssReferer' => Controller\Plugin\Referer::class,
            ],
            'factories' => [
                Controller\Plugin\EmailPlugin::class => Controller\Plugin\EmailPluginFactory::class,
                Controller\Plugin\ImageThumbPlugin::class => Controller\Plugin\ImageTumbPluginFactory::class,
                Controller\Plugin\Referer::class => InvokableFactory::class,
            ],
        ];
    }
739249
public function getPluginNamespaces()
    {
        $classNames = [];

        foreach ($this->getVendorAndPluginNames() as $vendorName => $vendorList) {
            foreach ($vendorList as $pluginName => $pluginPath) {
                $namespace = '\\'.$vendorName.'\\'.$pluginName;
                $namespace = Str::normalizeClassName($namespace);
                $classNames[$namespace] = $pluginPath;
            }
        }

        return $classNames;
    }
545314
public static function get_enabled_plugins() {
        global $DB, $CFG;
        require_once("$CFG->libdir/filterlib.php");

        $enabled = array();
        $filters = $DB->get_records_select('filter_active', "active <> :disabled AND contextid = :contextid", array(
            'disabled' => TEXTFILTER_DISABLED, 'contextid' => \context_system::instance()->id), 'filter ASC', 'id, filter');
        foreach ($filters as $filter) {
            $enabled[$filter->filter] = $filter->filter;
        }

        return $enabled;
    }
764014
public function getSelectedPluginObjects()
    {
        $selected = [];
        $plugins = $this->getSelectedPlugins();
        foreach ($plugins as $key) {
            $selected[] = $this->plugins[$key];
        }

        return $selected;
    }
785060
public function getSelectedPlugins()
    {
        $manager = $this;

        return array_filter($this->selectedPlugins, function ($plugin) use ($manager) {
            return $manager->isAvailable($plugin);
        });
    }