Skip to content

Commit

Permalink
Open external links to plugin homepages, plugin author homepages, and…
Browse files Browse the repository at this point in the history
… theme author homepages in a new window/tab. props SergeyBiryukov. fixes #20839.

git-svn-id: http://core.svn.wordpress.org/trunk@23394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
helen committed Feb 8, 2013
1 parent da5c7a7 commit 1c816c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion wp-admin/includes/class-wp-ms-themes-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ function single_row( $key, $theme ) {
$theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') );

if ( $theme->get('ThemeURI') )
$theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>';
$theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '" target="_blank">' . __( 'Visit Theme Site' ) . '</a>';

$theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status );
echo implode( ' | ', $theme_meta );
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/class-wp-plugins-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,11 @@ function single_row( $item ) {
if ( !empty( $plugin_data['Author'] ) ) {
$author = $plugin_data['Author'];
if ( !empty( $plugin_data['AuthorURI'] ) )
$author = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '">' . $plugin_data['Author'] . '</a>';
$author = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '" target="_blank">' . $plugin_data['Author'] . '</a>';
$plugin_meta[] = sprintf( __( 'By %s' ), $author );
}
if ( ! empty( $plugin_data['PluginURI'] ) )
$plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . esc_attr__( 'Visit plugin site' ) . '">' . __( 'Visit plugin site' ) . '</a>';
$plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . esc_attr__( 'Visit plugin site' ) . '" target="_blank">' . __( 'Visit plugin site' ) . '</a>';

$plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );
echo implode( ' | ', $plugin_meta );
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup
// Apply markup
if ( $markup ) {
if ( $plugin_data['PluginURI'] && $plugin_data['Name'] )
$plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . esc_attr__( 'Visit plugin homepage' ) . '">' . $plugin_data['Name'] . '</a>';
$plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . esc_attr__( 'Visit plugin homepage' ) . '" target="_blank">' . $plugin_data['Name'] . '</a>';

if ( $plugin_data['AuthorURI'] && $plugin_data['Author'] )
$plugin_data['Author'] = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '">' . $plugin_data['Author'] . '</a>';
$plugin_data['Author'] = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '" target="_blank">' . $plugin_data['Author'] . '</a>';

$plugin_data['Description'] = wptexturize( $plugin_data['Description'] );

Expand Down
2 changes: 1 addition & 1 deletion wp-includes/class-wp-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ private function markup_header( $header, $value, $translate ) {
static $attr = null;
if ( ! isset( $attr ) )
$attr = esc_attr__( 'Visit author homepage' );
$value = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $this->display( 'AuthorURI', true, $translate ), $attr, $value );
$value = sprintf( '<a href="%1$s" title="%2$s" target="_blank">%3$s</a>', $this->display( 'AuthorURI', true, $translate ), $attr, $value );
} elseif ( ! $value ) {
$value = __( 'Anonymous' );
}
Expand Down

0 comments on commit 1c816c7

Please sign in to comment.