Merged
Conversation
Co-authored-by: dd32 <[email protected]>
Copilot
AI
changed the title
[WIP] Remove FILTER_SANITIZE_STRING usage and update filters
PHP 8.4: Remove FILTER_SANITIZE_STRING
Mar 9, 2026
Member
|
@copilot This should also remove filter_input_array() for consistency, which removes the need for input_filters |
Co-authored-by: dd32 <[email protected]>
Contributor
Author
Done in b639727. Replaced |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FILTER_SANITIZE_STRINGwas deprecated in PHP 8.1, triggers warnings in PHP 8.4, and will be removed in PHP 9.0. Replaces all usages with appropriate WordPress-native alternatives.Changes
inc/form.php— Removefilter_input_array()and allinput_filterskeys from the workshop application field schema.get_workshop_application_form_submission()now reads directly from$_POST, sanitizing each field based on its schema type usingsanitize_text_field/sanitize_email+wp_unslash.inc/admin.php— Replace 7filter_input( INPUT_GET, ..., FILTER_SANITIZE_STRING )calls withsanitize_text_field( wp_unslash( $_GET[...] ?? '' ) ).inc/post-meta.php— Replacefilter_var( $value, FILTER_SANITIZE_STRING )in asanitize_callbackwithsanitize_text_field( $value ).Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.