connection = get_option( self::$connection_key, null ); if ( null === $this->connection && ( ! isset( $_GET['page'] ) || 'appsero_helper' != $_GET['page'] ) ) { add_action( 'admin_notices', [ $this, 'not_connected_notice' ] ); } add_action( 'admin_menu', [ $this, 'admin_menu' ] ); } /** * Generate the `Appsero Helper` menu * @return [type] [description] */ public function admin_menu() { add_options_page( 'Appsero Helper', 'Appsero Helper', 'manage_options', 'appsero_helper', [ $this, 'page_output' ] ); } /** * HTML output of the `Appsero Helper` page */ public function page_output() { if ( isset( $_POST['submit'] ) ) { $this->connection = $this->connect_with_appsero( $_POST ); } $token = isset( $this->connection['token'] ) ? $this->connection['token'] : ''; $action = ( $this->connection && isset( $this->connection['status'] ) && 'connected' == $this->connection['status'] ) ? 'Disconnect' : 'Connect'; ?>
error; ?>
success; ?>
You have not connected with AppSero in order to work Apsero Helper, Please connect using API key.