#53731 closed defect (bug) (fixed)
About the docs of safecss_filter_attr function
Reported by: | tmatsuur | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Formatting | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
Currently, the docs for the safe_style_css filter contains the following information.
* @since 5.8.0 Added support for `calc()` and `var()` values.
Shouldn't the above information be in the docs for this function?
Attachments (1)
Change History (9)
#2
@
3 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 5.9
- Version changed from 5.8 to 4.4
Support for specific properties was added to the safecss_filter_attr
function, not the filter, so moving the list from one DocBlock to the other makes sense to me.
I could upload a patch, but I think this would be a good-first-bug.
#3
@
3 years ago
Thanks @SergeyBiryukov , @sabernhardt
As you pointed out, I also think it would be more appropriate to move the list to the function DocBlock.
#4
@
3 years ago
@SergeyBiryukov , @sabernhardt @tmatsuur
I have just added a patch shifted details to function doc block from filter doc block. Thanks for this opportunity to contribute.
This ticket was mentioned in PR #1652 on WordPress/wordpress-develop by MuhammadFaizanHaidar.
3 years ago
#5
- Keywords has-patch added; needs-patch removed
Updated safecss_filter_attr function's doc block.
Shifted the updates for this function from 'safe_style_css' filter doc block to the safecss_filter_attr function's doc block.
Trac ticket: https://core.trac.wordpress.org/ticket/53731
File details
wp-includes/wp-includes/kses.php line 2152.
wp-includes/wp-includes/kses.php line 2183.
https://github.com/MuhammadFaizanHaidar/wordpress-develop/blob/master/src/wp-includes/kses.php
@
3 years ago
I have just added a patch shifted details to function doc block from filter doc block. Thanks for this opportunity to contribute.
#6
@
3 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 51729:
SergeyBiryukov commented on PR #1652:
3 years ago
#7
Thanks for the PR! Merged in https://core.trac.wordpress.org/changeset/51729.
MuhammadFaizanHaidar commented on PR #1652:
3 years ago
#8
@SergeyBiryukov I am honored to contribute. Thanks for merging the PR!
Hi there, thanks for the ticket!
Looking at the safecss_filter_attr() function, all the updates to allowed CSS attributes since WordPress 4.4 are indeed documented in the
safe_style_css
filter rather than in the function.Would it make more sense to move this list to the function DocBlock instead?