[wp-trac] [WordPress Trac] #24017: Network admin sites list page displaying bad links for Dashboard and Visits
WordPress Trac
noreply at wordpress.org
Tue Apr 9 22:44:05 UTC 2013
#24017: Network admin sites list page displaying bad links for Dashboard and Visits
-----------------------------+--------------------------
Reporter: morriswanchuk | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: | Severity: normal
Keywords: |
-----------------------------+--------------------------
After upgrading to 3.5.1 (from 3.5), we noticed that the links to
Dashboard and Visits in the/wp-admin/network/sites.php weren't working
properly.
For subsites, the Dashboard link pointed back to the root site, and the
same for the Visits link.
I traced the code to the following file: /wp-admin/includes/class-wp-ms-
sites-list-table.php.
Line 251 currently is:
{{{
$actions['backend'] = "<span class='backend'><a href='" . esc_url(
get_admin_url( $blog['blog_id']
) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a></span>';
}}}
Adding the $blogname variable to the get_admin_url function as the second
parameter fixed the issue:
{{{
$actions['backend'] = "<span class='backend'><a href='" . esc_url(
get_admin_url( $blog['blog_id']
, $blogname ) ) . "' class='edit'>" . __( 'Dashboard' ) .
'</a></span>';
}}}
Similarly for the Visits link.
Line 272 currently is:
{{{
$actions['visit'] = "<span class='view'><a href='" . esc_url(
get_home_url( $blog['blog_id'], '/
' ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>';
}}}
Changing it to the following fixes it:
{{{
$actions['visit'] = "<span class='view'><a href='" . esc_url(
get_home_url( $blog['blog_id'], $blogn
ame ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>';
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24017>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list