array( 'success', __( 'Settings have been saved successfully.', 'accessibility-audio-tts-text-to-speech-for-articles' ) ), /* translators: %d: number of posts to process in bulk */ 'bulk_started' => array( 'info', sprintf( /* translators: %d: number of posts to process in bulk */ __( 'Bulk processing started for %1$d posts.', 'accessibility-audio-tts-text-to-speech-for-articles' ), intval( filter_input( INPUT_GET, 'posts_count', FILTER_SANITIZE_NUMBER_INT ) ) ), ), 'no_posts_to_process' => array( 'warning', __( 'All posts already have generated audio.', 'accessibility-audio-tts-text-to-speech-for-articles' ) ), 'permission_denied' => array( 'error', __( 'Permission denied to save settings.', 'accessibility-audio-tts-text-to-speech-for-articles' ) ), 'nonce_failed' => array( 'error', __( 'Invalid security token.', 'accessibility-audio-tts-text-to-speech-for-articles' ) ), 'save_error' => array( 'error', __( 'An error occurred while saving settings.', 'accessibility-audio-tts-text-to-speech-for-articles' ) ), ); if ( isset( $messages[ $message ] ) ) { $type = $messages[ $message ][0]; $text = $messages[ $message ][1]; echo '

' . esc_html( $text ) . '

'; } } /** * Check for GET message parameter and display if present. * * @return void */ public function check_and_display_get_message() { // Display message only, no data processing or state changes. $message = filter_input( INPUT_GET, 'message', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); if ( $message ) { $this->display_admin_message( $message ); } } }