public function active(bool $slugify = true): array
    {
        global $blog_id; // Blog ID.

        $cache_key = '_'.(int) $blog_id.(int) $slugify;

        if (isset(static::$cache[__FUNCTION__][$cache_key])) {
            return static::$cache[__FUNCTION__][$cache_key];
        }
        $active = get_option('active_plugins');
        $active = is_array($active) ? $active : [];

        if ($slugify) { // Slugs w/ basename keys.
            $active = $this->s::pluginSlugs($active);
        }
        return static::$cache[__FUNCTION__][$cache_key] = $active;
    }
public function active(bool $slugify = true): array
    {
        global $blog_id; // Blog ID.

        $cache_key = '_'.(int) $blog_id.(int) $slugify;

        if (isset(static::$cache[__FUNCTION__][$cache_key])) {
            return static::$cache[__FUNCTION__][$cache_key];
        }
        $active = get_option('active_plugins');
        $active = is_array($active) ? $active : [];

        if ($slugify) { // Slugs w/ basename keys.
            $active = $this->s::pluginSlugs($active);
        }
        return static::$cache[__FUNCTION__][$cache_key] = $active;
    }
public function active ( bool $ slugify = true ) : array { global $ blog_id ; // Blog ID. $ cache_key = '_' . ( int ) $ blog_id . ( int ) $ slugify ; if ( isset ( static :: $ cache [ __FUNCTION__ ] [ $ cache_key ] ) ) { return static :: $ cache [ __FUNCTION__ ] [ $ cache_key ] ; } $ active = get_option ( 'active_plugins' ) ; $ active = is_array ( $ active ) ? $ active : [ ] ; if ( $ slugify ) { // Slugs w/ basename keys. $ active = $ this -> s :: pluginSlugs ( $ active ) ; } return static :: $ cache [ __FUNCTION__ ] [ $ cache_key ] = $ active ; }
Active plugins.

@since 160524 First documented version.

@param bool $slugify Slugs w/ basename keys?

@internal If false you'll get numerically indexed basenames.

@return array Active plugins.
Active plugins .