diff --git a/inc/main.php b/inc/main.php index ff97a119..04e478ab 100644 --- a/inc/main.php +++ b/inc/main.php @@ -108,6 +108,7 @@ public static function instance() { add_filter( 'optml_register_conflicts', [ __CLASS__, 'register_conflicts' ] ); add_filter( 'optimole_wp_logger_data', [ __CLASS__, 'add_settings' ] ); add_filter( 'optimole_wp_ai_connect_metadata', [ __CLASS__, 'add_ai_connect_metadata' ] ); + add_filter( 'optimole_wp_support_hub_metadata', [ __CLASS__, 'add_support_hub_metadata' ] ); self::$_instance = new self(); self::$_instance->manager = Optml_Manager::instance(); self::$_instance->rest = new Optml_Rest(); @@ -200,6 +201,24 @@ public static function add_ai_connect_metadata() { ]; } + /** + * Opt in to the SDK Support Hub: the links shown in the Help form. + * + * @return array{is_pro: bool, links: array} + */ + public static function add_support_hub_metadata() { + return [ + 'is_pro' => false, + 'links' => [ + [ + 'icon' => 'groups', + 'text' => __( 'Community Forum', 'optimole-wp' ), + 'url' => 'https://wordpress.org/support/plugin/optimole-wp/', + ], + ], + ]; + } + /** * Register product into SDK. *