Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#61026 new enhancement

There is no easy way to add custom states to site-info.php

Reported by: ignatiusjeroe's profile ignatiusjeroe Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 6.5
Component: Networks and Sites Keywords:
Focuses: multisite Cc:

Description (last modified by sabernhardt)

On /wp-admin/network/sites.php with the usage of hook listed below we can add new states to the page (see attachment).

  1. $views = apply_filters( "views_{$this->screen->id}", $views );
    @ wp-admin/includes/class-wp-list-table.php line 515 and
  2. $site_states = apply_filters( 'display_site_states', $site_states, $_site );
    @ wp-admin/includes/class-wp-ms-sites-list-table.php line 671

The issue is that on wp-admin/network/site-info.php there is no way to add our own states to the core states. There is no filter that grants access to the variable that contains the data which WP uses to render the state fields with. This should be looked at. For it makes zero sense to be able to add new states elsewhere but not on page wp-admin/network/site-info.php.

Attachments (2)

Screen Shot 2024-04-17 at 22.06.58.png (122.0 KB) - added by ignatiusjeroe 5 weeks ago.
Screen Shot 2024-04-17 at 22.08.47.png (53.5 KB) - added by ignatiusjeroe 5 weeks ago.

Download all attachments as: .zip

Change History (6)

#1 @ignatiusjeroe
5 weeks ago

Please ignore the last two sentences in my original post. These are topics for new tickets that I forget to delete prior to submitting

#2 @sabernhardt
5 weeks ago

  • Description modified (diff)

I edited the description's formatting and removed the last two parts. Please verify that that is correct :)

#3 @costdev
5 weeks ago

  • Focuses coding-standards removed

#4 @ignatiusjeroe
5 weeks ago

Thank you for the correction. It looks good.

Note: See TracTickets for help on using tickets.