Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#22537 closed enhancement (fixed)

Fix balanceTags() docs and make the logic better readable

Reported by: TobiasBg Owned by: SergeyBiryukov
Priority: normal Milestone: 3.6
Component: Inline Docs Version:
Severity: normal Keywords: has-patch 3.6-early commit
Cc: Focuses:

Description

The inline documentation of balanceTags() mixes up "and" and "or" in the first line. The function will does not require both $force and get_option(...) to be true, but just one. Apparently, some of the inline docs was already worked on in #19576, but the first line was left as-is.
Also, the logic of the function is kind of hard to read with unnecessary boolean inversions.

The attached patch fixed the docs and makes the function better readable.

Attachments (1)

22537-balanceTags.patch (886 bytes ) - added by TobiasBg 14 years ago.
Fix balanceTags() docs and make the function better readable

Download all attachments as: .zip

Change History (6)

@TobiasBg
14 years ago

Fix balanceTags() docs and make the function better readable

#1 @TobiasBg
14 years ago

  • Component GeneralInline Docs
  • Keywords 3.6-early added

#2 @SergeyBiryukov
14 years ago

  • Milestone Awaiting Review3.6

#3 @SergeyBiryukov
14 years ago

  • Keywords commit added

Boolean inversions are the result of the changes [3751] and [5805].

The initial description (that appears to be inaccurate) was added in [8783].

22537-balanceTags.patch looks good.

#4 @SergeyBiryukov
14 years ago

Also passes the unit tests in formatting/balanceTags.php and post/filtering.php.

#5 @SergeyBiryukov
14 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 23368:

Correct the documentation for balanceTags(). Remove unnecessary boolean inversion. props TobiasBg. fixes #22537.

Note: See TracTickets for help on using tickets.