10 ) ); if ( !is_wp_error( $response ) && is_array( $response ) ) { $body = $response['body']; // use the content $add_ons = json_decode($body, TRUE); if ( $add_ons !== FALSE && is_array($add_ons) && !empty($add_ons) ) { $features = $add_ons; set_transient( 'propertyhive_features', $features, DAY_IN_SECONDS ); } } } $features = apply_filters( 'propertyhive_pro_features', $features ); return $features; } // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- Legacy public global helper get_ph_pro_feature; the established callable name is part of the plugin/extension API and must remain stable. function get_ph_pro_feature( $requested_feature ) { $features = get_ph_pro_features(); foreach ( $features as $feature ) { $slug = explode("/", $feature['wordpress_plugin_file']); $slug = $slug[0]; if ( $slug == $requested_feature ) { return $feature; } } return false; }