%s

', esc_html( $msg ) ); } } if ( isset( $_GET['aivastark_error'] ) ) { $code = sanitize_text_field( wp_unslash( $_GET['aivastark_error'] ) ); $map = array( 'denied' => __( 'Connection cancelled.', 'aivastark-widget' ), 'missing' => __( 'The connection response was incomplete. Please try again.', 'aivastark-widget' ), 'state' => __( 'The connection link expired or was invalid. Please click Connect again.', 'aivastark-widget' ), 'exchange' => __( 'Could not complete the connection with Aivastark. Please try again.', 'aivastark-widget' ), ); $msg = isset( $map[ $code ] ) ? $map[ $code ] : __( 'Something went wrong connecting to Aivastark.', 'aivastark-widget' ); printf( '

%s

', esc_html( $msg ) ); } } public static function render_home() { if ( ! current_user_can( 'manage_options' ) ) { return; } require AIVASTARK_WIDGET_PATH . 'admin/views/page-home.php'; } public static function render_customize() { if ( ! current_user_can( 'manage_options' ) ) { return; } require AIVASTARK_WIDGET_PATH . 'admin/views/page-customize.php'; } public static function render_settings() { if ( ! current_user_can( 'manage_options' ) ) { return; } require AIVASTARK_WIDGET_PATH . 'admin/views/page-settings.php'; } }