Opened 8 years ago
Closed 7 years ago
#34677 closed enhancement (fixed)
Inline comments for remove_accents()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Formatting | Keywords: | has-patch has-screenshots |
Focuses: | docs | Cc: |
Description (last modified by )
I was given a copy of a single function from this file to use, and I have added comments to it.
In: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php#L1128
in the remove_accents function, you can use this for the chars array:
(it's the same contents exactly just in an ever so slightly different order, and with super awesome comments mostly added. (Feel free to email me or call me at [removed] when you go to add this, I may have a more commented version by then.)
Attachments (3)
Change History (16)
#1
@
8 years ago
- Component changed from General to Formatting
- Focuses docs added
- Summary changed from enhancement to /src/wp-includes/formatting.php to Inline comments for remove_accents()
#3
@
7 years ago
- Keywords needs-patch added
@SergeyBiryukov Besides not documenting in all caps, I can see documenting the character codes as useful. What do you think about the rest of it, i.e. describing the obvious characteristics.
Also, what/whom would be the best way of confirming this information so we can move forward here?
cc @ocean90 @petya
#4
@
7 years ago
- Milestone changed from Awaiting Review to 4.6
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#5
@
7 years ago
@SergeyBiryukov Happy to generate a patch for this, but I'd need some guidance on my questions in comment:3.
This ticket was mentioned in Slack in #core by ocean90. View the logs.
7 years ago
#7
@
7 years ago
- Keywords good-first-bug added
- Milestone changed from 4.6 to Future Release
@DrewAPicture Which information do you need to be confirmed? Happy to take a look at something if you point me to it.
TinyMCE has a similar char list: https://github.com/tinymce/tinymce/blob/master/js/tinymce/plugins/charmap/plugin.js#L16
#9
@
7 years ago
- Keywords has-patch added; needs-patch good-first-bug removed
- Milestone changed from Future Release to 4.6
Whew.
6 hours of effort yields 34677.2.diff, which takes the suggested inline comments and formats them into markdown tables in the DocBlock rather than placing them inline in the code. A major downside of documenting them as inline comments is that the information is only really available to somebody reading the source code.
Formatting into markdown tables has the benefit of being parseable for the Code Reference and also easily searchable from within that page. See 34677_output.2.png for what that looks like post-parsing.
Here is the completed version with ALL the comments, and the characters in unicode order with full unicode names: