WordPress.org

Make WordPress Core

Ticket #15593: 15593.diff

File 15593.diff, 3.3 KB (added by PeteMall, 7 years ago)

Add filters to site-edit tabs.

  • wp-admin/network/site-info.php

     
    8282<?php
    8383$tabs = array( 'site-info' => array( 'label' => __('Info'), 'url' => 'site-info.php'),  'site-options' => array( 'label' => __('Options'), 'url' => 'site-options.php'),
    8484                          'site-users' => array( 'label' => __('Users'), 'url' => 'site-users.php'),  'site-themes' => array( 'label' => __('Themes'), 'url' => 'site-themes.php'));
     85$tabs = apply_filters( 'edit_site_tabs', $tabs );
    8586foreach ( $tabs as $tab_id => $tab ) {
    8687        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    8788        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' .  esc_html( $tab['label'] ) . '</a>';
  • wp-admin/network/site-options.php

     
    7070<?php
    7171$tabs = array( 'site-info' => array( 'label' => __('Info'), 'url' => 'site-info.php'),  'site-options' => array( 'label' => __('Options'), 'url' => 'site-options.php'),
    7272                          'site-users' => array( 'label' => __('Users'), 'url' => 'site-users.php'),  'site-themes' => array( 'label' => __('Themes'), 'url' => 'site-themes.php'));
     73$tabs = apply_filters( 'edit_site_tabs', $tabs );
    7374foreach ( $tabs as $tab_id => $tab ) {
    7475        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    7576        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' .  esc_html( $tab['label'] ) . '</a>';
  • wp-admin/network/site-users.php

     
    155155<?php
    156156$tabs = array( 'site-info' => array( 'label' => __('Info'), 'url' => 'site-info.php'),  'site-options' => array( 'label' => __('Options'), 'url' => 'site-options.php'),
    157157                          'site-users' => array( 'label' => __('Users'), 'url' => 'site-users.php'),  'site-themes' => array( 'label' => __('Themes'), 'url' => 'site-themes.php'));
     158$tabs = apply_filters( 'edit_site_tabs', $tabs );
    158159foreach ( $tabs as $tab_id => $tab ) {
    159160        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    160161        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' .  esc_html( $tab['label'] ) . '</a>';
  • wp-admin/network/site-themes.php

     
    105105<?php
    106106$tabs = array( 'site-info' => array( 'label' => __('Info'), 'url' => 'site-info.php'),  'site-options' => array( 'label' => __('Options'), 'url' => 'site-options.php'),
    107107                          'site-users' => array( 'label' => __('Users'), 'url' => 'site-users.php'),  'site-themes' => array( 'label' => __('Themes'), 'url' => 'site-themes.php'));
     108$tabs = apply_filters( 'edit_site_tabs', $tabs );
    108109foreach ( $tabs as $tab_id => $tab ) {
    109110        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    110111        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' .  esc_html( $tab['label'] ) . '</a>';