You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@CrochetFeve0251 mentioned having something a bit related in WP Launchpad -> To check and possibly go from there?
This is useful for WP Rocket, but also WP Media in general and maybe WP Core. So we need to identify the proper way to implement a first version that could easily be re-used for all those projects. Start only in WP Rocket? Or a library/file easily movable to Launchpad and/or other plugins? That could easily be transmitted to WP Core? The proper way to implement this must be identify.
Add a apply_filters_safetyped function, as per https://core.trac.wordpress.org/ticket/51525, that does apply_filte, throws a _doing_it_wrong in case of type mismatch and skips the $next_value to keep a valid one.
Add custom types to the is_type method, based on what we usually need
positive_integer: type integer and >= 0
strictly_positive_integer: type integer and > 0
Targeted implementation
The goal is to have a method we can start using in at least WP Rocket (and if possible in other places) that we can also share as a PoC to WP Core.
The text was updated successfully, but these errors were encountered:
Context
Expected behavior
$next_value
to keep a valid one.Targeted implementation
The goal is to have a method we can start using in at least WP Rocket (and if possible in other places) that we can also share as a PoC to WP Core.
The text was updated successfully, but these errors were encountered: