true, 'version' => aisentic()->version, // Registration done, API key present. Reported for consumers that want // to say something about it — the handoff below no longer depends on it. 'configured' => $configured, /* * The chat bundle is on this specific screen, so `aisentic_ask` is (or is * about to be) registered and a prompt can be handed off here. * * Deliberately not ANDed with `configured`: an unregistered site can still * take the prompt, because the widget asks for the account itself and then * answers the question. Requiring a key here would send the user to an * onboarding form to retype what they already typed. */ 'chatAvailable' => ( new Admin_Assets() )->is_chat_enabled( $screen ), 'onboardingUrl' => admin_url( 'admin.php?page=aisentic' ), ]; /** * Filter the presence payload exposed to consumer plugins. * * @since 1.0.0 * * @param array $presence Presence payload. * @param \WP_Screen|null $screen Current screen object. */ $presence = apply_filters( 'aisentic_presence', $presence, $screen ); printf( '' . "\n", wp_json_encode( $presence ) ); } }