[wp-trac] [WordPress Trac] #25464: Function no_items() returns only one result

WordPress Trac noreply at wordpress.org
Tue Oct 6 17:18:50 UTC 2015


#25464: Function no_items() returns only one result
----------------------------+-----------------------
 Reporter:  pavelevap       |       Owner:  ocean90
     Type:  defect (bug)    |      Status:  accepted
 Priority:  normal          |   Milestone:  4.4
Component:  Administration  |     Version:  3.8
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:
----------------------------+-----------------------
Changes (by ocean90):

 * keywords:  needs-patch dev-feedback => needs-patch
 * owner:   => ocean90
 * status:  new => accepted
 * milestone:  Awaiting Review => 4.4


Comment:

 MS Themes List Table: It uses `$this->has_items` which is `! empty(
 $themes['all'] )`, which is not the same as `->has_items()`. Actually, I
 think the logic is inverted here, it should display "No themes found."  if
 the search result is empty, not "You do not appear to have any themes
 available at this time.".

 Plugins List Table: It uses `!empty( $plugins['all'] )` to display  "No
 plugins found." for empty search results. If there are no plugins at all
 it displays "You do not appear to have any plugins available at this
 time.". That seems to be right.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25464#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list