Making WordPress.org

Opened 9 years ago

Closed 9 years ago

#1376 closed defect (bug) (fixed)

Number of the link to "Show %d more used by" is wrong,

Reported by: pedroghandi's profile pedroghandi Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch
Cc:

Description (last modified by SergeyBiryukov)

Hi, on the Code reference, the sections "Used by" and "Uses" have links to show and hide more functions.

For example, here:
https://developer.wordpress.org/reference/classes/wp_press_this/save_post/

it shows 5 by default and has a link to show 16 more uses, but in reality, it only shows more 11. The total references is 16.

It should be

$used_by->post_count - 5

( see lines 145 and 164 in https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/content-reference.php?marks=145,164#L136 )

or change the wording "Show all used by". If the latter, then "hide more used by" should also be changed to something like "show fewer used by"

Same for "Show %d more uses".

do you need a patch or this is trivial to change?

Attachments (1)

meta-1376.patch (2.6 KB) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
9 years ago

  • Keywords has-patch added

In meta-1376.patch:

  • Use correct count.
  • Add translator comments and number_format_i18n().
  • Replace incorrect 'Show 1 more' with 'Show %d more'.

#2 @SergeyBiryukov
9 years ago

  • Description modified (diff)

#3 @atimmer
9 years ago

Looks good to me 👍

#4 @coffee2code
9 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 2040:

developer.wordpress.org: Display proper count in links for seeing remaining "Used By" and "Uses" associations.

  • Use correct count.
  • Add translator comments and number_format_i18n().
  • Replace incorrect 'Show 1 more' with 'Show %d more'.

Props SergeyBiryukov.
Fixes #1376.

Note: See TracTickets for help on using tickets.