Astra_Ext_Extension::get_enabled_addons()
Provide Enable Extension array().
Description
Return
(array())
Source
File: classes/class-astra-ext-extension.php
public static function get_enabled_addons() { $enabled_data = array(); $extensions = self::get_addons(); $enabled_extensions = Astra_Admin_Helper::get_admin_settings_option( '_astra_ext_enabled_extensions' ); if ( empty( $enabled_extensions ) ) { foreach ( $extensions as $slug => $data ) { $enabled_data[ $slug ] = ( isset( $data['default'] ) ) ? $data['default'] : false; } $enabled_data['all'] = 'all'; } else { $enabled_data = $enabled_extensions; if ( isset( $enabled_extensions['all'] ) && false != $enabled_extensions['all'] ) { // add new key. foreach ( $extensions as $slug => $data ) { if ( ! array_key_exists( $slug, $enabled_extensions ) ) { $enabled_data[ $slug ] = ( isset( $data['default'] ) ) ? $data['default'] : false; } } } } return apply_filters( 'astra_ext_enabled_extensions', $enabled_data ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0 | Introduced. |