[wp-trac] [WordPress Trac] #37392: Multisite "Sites" screen: Add links to filter websites by status
WordPress Trac
noreply at wordpress.org
Wed Jan 24 04:05:54 UTC 2018
#37392: Multisite "Sites" screen: Add links to filter websites by status
-------------------------------------------------+-------------------------
Reporter: thomaswm | Owner: mnelson4
Type: enhancement | Status: assigned
Priority: normal | Milestone:
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests 2nd- | Focuses: multisite
opinion |
-------------------------------------------------+-------------------------
Changes (by mnelson4):
* keywords: => has-patch needs-unit-tests 2nd-opinion
Comment:
Ok I added a patch that adds this feature. I based it off the users list
table.
Some issues I wasn't sure about:
* what would be the best name for the new function, which for now is just
called `wp_count_sites()`. Also just took a guess that `ms-functions.php`
would be a good place for it
* the translatable strings which I basically copied from `class-wp-users-
list-table.php` has HTML in it (I thought its best to have placeholders,
because we don't want to burden translators with understanding HTML, and
we certainly don't want translators to translate the HTML or the classes
etc!). Eg `__( '%1$s <span class="count">(%2$s)</span>' )` is one. I just
left the HTML in there for now, but it seems it would be best to put
placeholders in there instead.... although that would leave the string as
just "%1$s %2$s(%3$s)%4$s" which is so vague that maybe we should just NOT
translate it at all. Thoughts?
* I don't totally understand what the "public" flag on a blog row means.
When I set that to false for a blog, I could still visit it on the front-
end (even when not logged in), and its mostly absent from the UI (except
if you click to "edit" a page). Perhaps we should exclude that view?
* `wp_count_sites()` returns an `stdClass` with the properties
`all_blogs`, `public`, `archived`, `mature`, `spam` and `deleted`. Do we
like those names? Would it be better as an array?
Lastly, I should probably add a unit test or two for `wp_count_sites()`,
but I'd rather do that once I have confirmation from someone that that
functionality looks good.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37392#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list