Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#37321 closed defect (bug) (fixed)

Improve documentation of user_can_richedit()

Reported by: swissspidy Owned by: swissspidy
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Editor Keywords: good-first-bug has-patch commit
Focuses: docs Cc:


The whole docblock for user_can_richedit() needs a bit of an overhaul. Same goes for the user_can_richedit filter.

There are some typos, like WYSIWIG should be WYSIWYG and users browser should be user's browser.

The return value needs to be documented properly, as well as the global variables referenced.

Also, the wording can be improved a bit. For example, Whether the user can access the visual editor. sounds better than Whether the user should have a WYSIWIG editor.

See https://core.trac.wordpress.org/browser/trunk/src/wp-includes/general-template.php?rev=38029#L2875

Attachments (4)

37321.patch (612 bytes) - added by gma992 4 years ago.
37321.1.diff (1.7 KB) - added by gma992 4 years ago.
37321.2.diff (1.9 KB) - added by gma992 4 years ago.
Clarified descriptions, added $is_edge
37321.diff (1.9 KB) - added by swissspidy 4 years ago.

Download all attachments as: .zip

Change History (12)

4 years ago

4 years ago

4 years ago

Clarified descriptions, added $is_edge

#1 @gma992
4 years ago

  • Keywords has-patch added; needs-patch removed

#2 @DrewAPicture
4 years ago

  • Component changed from General to Editor
  • Focuses docs added
  • Owner set to gma992
  • Status changed from new to assigned

Assigning to mark the good-first-bug as "claimed".

#3 @swissspidy
4 years ago

  • Milestone changed from Awaiting Review to 4.7

Patch only needs some minor tweaks.

#4 @jorbin
4 years ago

@DrewAPicture - Can you give this a read?

This ticket was mentioned in Slack in #core by desrosj. View the logs.

4 years ago

#6 @swissspidy
4 years ago

  • Owner changed from gma992 to swissspidy
  • Status changed from assigned to reviewing

4 years ago

#7 @swissspidy
4 years ago

  • Keywords commit added

Made some minor wording changes.

#8 @swissspidy
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 38707:

Editor: Improve documentation for user_can_richedit().

Clarifies the various global variables used in the function.

Props gma992.
Fixes #37321.

Note: See TracTickets for help on using tickets.