Enable linking teams in new window/tab

This commit is contained in:
Brian Miyaji
2014-10-19 17:33:50 +11:00
parent f88adc3c3c
commit 548f1183e0
2 changed files with 10 additions and 2 deletions

View File

@@ -48,6 +48,14 @@ class SP_Settings_Teams extends SP_Settings_Page {
'type' => 'checkbox',
),
array(
'title' => __( 'Visit Site', 'sportspress' ),
'desc' => __( 'Open link in a new window/tab', 'sportspress' ),
'id' => 'sportspress_team_site_target_blank',
'default' => 'no',
'type' => 'checkbox',
),
array( 'type' => 'sectionend', 'id' => 'team_options' ),
array( 'title' => __( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options' ),

View File

@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 1.1
* @version 1.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -17,7 +17,7 @@ $url = get_post_meta( $id, 'sp_url', true );
if ( empty( $url ) )
return false;
?>
<form action="<?php echo $url; ?>">
<form action="<?php echo $url; ?>"<?php if ( get_option( 'sportspress_team_site_target_blank', 'no' ) == 'yes' ) { ?> target="_blank"<?php } ?>>
<input type="submit" class="button sp-button sp-team-button" value="<?php _e( 'Visit Site', 'sportspress' ); ?>">
</form>
<br>