$option ) { // Skip if not present in POST. if ( ! isset( $_POST[ $option_key ] ) ) { continue; } // Update the option. update_option( $option_key, call_user_func( $option['sanitize_callback'], wp_unslash( $_POST[ $option_key ] ) ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- We are already sanitizing using the sanitize callback provided. } } } // Output settings update message. echo '

' . esc_html__( 'Options saved.', 'all-path-messaging' ) . '

'; } // Load template. load_template( SD_AIO_MESSAGING_PATH . '/inc/email/templates/options.php' ); } /** * Adapters settings template. * * @return void */ public function adapters_settings_template(): void { // Load the template. load_template( SD_AIO_MESSAGING_PATH . '/inc/email/templates/adapters.php' ); } }