-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Labels
type: enhancementImprovements to existing functionalityImprovements to existing functionality
Description
As a WPGraphQL extension author, I would like to have my WPGraphQL extension be suggested if the plugin that it depends on is active. This behavior would be similar to how WPGraphQL for ACF is suggested when both WPGraphQL and ACF are active.
wp-graphql/src/Admin/AdminNotices.php
Lines 35 to 54 in d3542ef
| register_graphql_admin_notice( | |
| 'wpgraphql-acf-announcement', | |
| [ | |
| 'type' => 'info', | |
| 'message' => __( 'You are using WPGraphQL and Advanced Custom Fields. Have you seen the new <a href="https://acf.wpgraphql.com/" target="_blank" rel="nofollow">WPGraphQL for ACF</a>?', 'wp-graphql' ), | |
| 'is_dismissable' => true, | |
| 'conditions' => static function () { | |
| if ( ! class_exists( 'ACF' ) ) { | |
| return false; | |
| } | |
| // Bail if new version of WPGraphQL for ACF is active. | |
| if ( class_exists( 'WPGraphQLAcf' ) ) { | |
| return false; | |
| } | |
| return true; | |
| }, | |
| ] | |
| ); |
Metadata
Metadata
Assignees
Labels
type: enhancementImprovements to existing functionalityImprovements to existing functionality
Type
Projects
Status
🆕 New
