slug ] ) ) ? $feature_settings[ $this->slug ] : false; } /** * Returns true if feature is active * * @since 2.2 * @return boolean */ public function is_active() { if ( defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ) { $feature_settings = get_site_option( 'ep_feature_settings', [] ); } else { $feature_settings = get_option( 'ep_feature_settings', [] ); } $active = false; if ( ! empty( $feature_settings[ $this->slug ] ) && $feature_settings[ $this->slug ]['active'] ) { $active = true; } /** * Filter whether a feature is active or not * * @hook ep_feature_active * @param {bool} $active Whether feature is active or not * @param {array} $feature_settings Current feature settings * @param {Feature} $feature Current feature * @since 2.2 * @return {bool} New active value */ return apply_filters( 'ep_feature_active', $active, $feature_settings, $this ); } /** * To be run after initial feature activation * * @since 2.1 */ public function post_activation() { /** * Fires after feature is activated * * @hook ep_feature_post_activation * @param {string} $slug Feature slug * @param {Feature} $feature Current feature * @since 2.1 */ do_action( 'ep_feature_post_activation', $this->slug, $this ); } /** * Outputs feature box * * @since 2.1 */ public function output_feature_box() { $this->output_feature_box_summary(); /** * Fires before feature box summary is shown * * @hook ep_feature_box_summary * @param {string} $slug Feature slug * @param {Feature} $feature Current feature * @since 2.1 */ do_action( 'ep_feature_box_summary', $this->slug, $this ); ?>
requirements_status(); ?> message ) ) : $messages = (array) $requirements_status->message; ?>