Open external links to plugin homepages, plugin author homepages, and 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
This commit is contained in:
parent
da5c7a7c62
commit
1c816c795b
|
@ -331,7 +331,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||
$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 );
|
||||
|
|
|
@ -411,11 +411,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
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 );
|
||||
|
|
|
@ -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'] );
|
||||
|
||||
|
|
|
@ -651,7 +651,7 @@ final class WP_Theme implements ArrayAccess {
|
|||
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' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue