Make WordPress Core

Ticket #32525: 32525_tab.patch

File 32525_tab.patch, 4.4 KB (added by Fab1en, 10 years ago)

Dashboard link after the tabs

  • src/wp-admin/css/common.css

    diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
    index 73b97ad..fa46859 100644
    a b h2 .nav-tab { 
    19571957        line-height: 24px;
    19581958}
    19591959
     1960.nav-link {
     1961        font-size: 12px;
     1962        padding: 4px 14px 6px;
     1963}
     1964
    19601965
    19611966/*------------------------------------------------------------------------------
    19621967  26.0 - Misc
  • src/wp-admin/network/site-info.php

    diff --git a/src/wp-admin/network/site-info.php b/src/wp-admin/network/site-info.php
    index 61fea29..42a96e3 100644
    a b $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $ 
    129129$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
    130130$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
    131131
     132$dashboard = '<a class="nav-link" href="' . get_admin_url( $id ) . '">' . __( 'Dashboard' ) . '</a>';
     133
    132134$parent_file = 'sites.php';
    133135$submenu_file = 'sites.php';
    134136
    foreach ( $tabs as $tab_id => $tab ) { 
    150152        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    151153        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
    152154}
     155// link to the site dashboard is displayed after the tabs
     156echo $dashboard;
    153157?>
    154158</h3>
    155159<?php
  • src/wp-admin/network/site-settings.php

    diff --git a/src/wp-admin/network/site-settings.php b/src/wp-admin/network/site-settings.php
    index 31980ee..d815a5f 100644
    a b $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $ 
    7979$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
    8080$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
    8181
     82$dashboard = '<a class="nav-link" href="' . get_admin_url( $id ) . '">' . __( 'Dashboard' ) . '</a>';
     83
    8284$parent_file = 'sites.php';
    8385$submenu_file = 'sites.php';
    8486
    foreach ( $tabs as $tab_id => $tab ) { 
    100102        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    101103        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
    102104}
     105// link to the site dashboard is displayed after the tabs
     106echo $dashboard;
    103107?>
    104108</h3>
    105109<?php
  • src/wp-admin/network/site-themes.php

    diff --git a/src/wp-admin/network/site-themes.php b/src/wp-admin/network/site-themes.php
    index 0042601..9cc2b65 100644
    a b $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $ 
    133133$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
    134134$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
    135135
     136$dashboard = '<a class="nav-link" href="' . get_admin_url( $id ) . '">' . __( 'Dashboard' ) . '</a>';
     137
    136138$parent_file = 'sites.php';
    137139$submenu_file = 'sites.php';
    138140
    foreach ( $tabs as $tab_id => $tab ) { 
    152154        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    153155        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
    154156}
     157// link to the site dashboard is displayed after the tabs
     158echo $dashboard;
    155159?>
    156160</h3><?php
    157161
  • src/wp-admin/network/site-users.php

    diff --git a/src/wp-admin/network/site-users.php b/src/wp-admin/network/site-users.php
    index f290565..6620357 100644
    a b $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $ 
    161161$title_site_url_linked = sprintf( __( 'Edit Site: %s' ), '<a href="' . get_blogaddress_by_id( $id ) . '">' . $site_url_no_http . '</a>' );
    162162$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http );
    163163
     164$dashboard = '<a class="nav-link" href="' . get_admin_url( $id ) . '">' . __( 'Dashboard' ) . '</a>';
     165
    164166$parent_file = 'sites.php';
    165167$submenu_file = 'sites.php';
    166168
    foreach ( $tabs as $tab_id => $tab ) { 
    195197        $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
    196198        echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
    197199}
     200// link to the site dashboard is displayed after the tabs
     201echo $dashboard;
    198202?>
    199203</h3><?php
    200204