$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' ) . '