We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In WP 5.3 there will be some changes that will impact on the wp posts date properties. They will impact the rest-api as well as you can see in the following two commits: (null dates) WordPress/WordPress@b15c0d4#diff-2bdd57a49dbaa7ba0108f91132d37216 (floating date) WordPress/WordPress@ef86b03#diff-2bdd57a49dbaa7ba0108f91132d37216
Interesting the possibility of specifying the property type as an array: WordPress/WordPress@b15c0d4#diff-337a27824fef93e1a776fe4a26fff320R1904
type
which anyways requires the wp core functions rest_sanitize_value_from_schema and rest_validate_value_from_schema WordPress/WordPress@b15c0d4#diff-04b011c39a32e2b17ffb640e03cd3d01R1211 WordPress/WordPress@b15c0d4#diff-04b011c39a32e2b17ffb640e03cd3d01R1390
rest_sanitize_value_from_schema
rest_validate_value_from_schema
I think we can - but didn't test it - create our own wrappers for these two functions (which actually means make also wrappers for rest_sanitize_request_arg and rest_validate_request_arg) to handle the backward compatibility with older wp versions and then make these: https://github.com/gocodebox/lifterlms-rest/blob/1.0.0-beta.8/includes/abstracts/class-llms-rest-posts-controller.php#L1008-L1017 something like:
rest_sanitize_request_arg
rest_validate_request_arg
'date_created' => array( 'description' => __( 'Creation date. Format: Y-m-d H:i:s', 'lifterlms' ), 'type' => array( 'string', 'null' ), 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'llms_rest_sanitize_request_arg', 'validate_callback' => 'llms_rest_validate_request_arg' ), ), 'date_created_gmt' => array( 'description' => __( 'Creation date (in GMT). Format: Y-m-d H:i:s', 'lifterlms' ), 'type' => array( 'string', 'null' ), 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'llms_rest_sanitize_request_arg', 'validate_callback' => 'llms_rest_validate_request_arg' ), ),
(and of course we can create our wrapper for has_param() too).
has_param()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In WP 5.3 there will be some changes that will impact on the wp posts date properties.
They will impact the rest-api as well as you can see in the following two commits:
(null dates) WordPress/WordPress@b15c0d4#diff-2bdd57a49dbaa7ba0108f91132d37216
(floating date)
WordPress/WordPress@ef86b03#diff-2bdd57a49dbaa7ba0108f91132d37216
Interesting the possibility of specifying the property
type
as an array:WordPress/WordPress@b15c0d4#diff-337a27824fef93e1a776fe4a26fff320R1904
which anyways requires the wp core functions
rest_sanitize_value_from_schema
andrest_validate_value_from_schema
WordPress/WordPress@b15c0d4#diff-04b011c39a32e2b17ffb640e03cd3d01R1211
WordPress/WordPress@b15c0d4#diff-04b011c39a32e2b17ffb640e03cd3d01R1390
I think we can - but didn't test it - create our own wrappers for these two functions (which actually means make also wrappers for
rest_sanitize_request_arg
andrest_validate_request_arg
) to handle the backward compatibility with older wp versions and then make these:https://github.com/gocodebox/lifterlms-rest/blob/1.0.0-beta.8/includes/abstracts/class-llms-rest-posts-controller.php#L1008-L1017
something like:
(and of course we can create our wrapper for
has_param()
too).The text was updated successfully, but these errors were encountered: