Replace dynamic strings with static ones

This commit is contained in:
Brian Miyaji
2014-02-21 08:35:46 +11:00
parent 1318cfdced
commit 38e53ac37c
32 changed files with 294 additions and 227 deletions

View File

@@ -34,7 +34,7 @@ class SP_Widget_Countdown extends WP_Widget {
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:', 'sportspress' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
<p><label for="<?php echo $this->get_field_id('event'); ?>"><?php printf( __( 'Select %s:', 'sportspress' ), __( 'Event', 'sportspress' ) ); ?></label>
<p><label for="<?php echo $this->get_field_id('event'); ?>"><?php _e( 'Select Event:', 'sportspress' ); ?></label>
<?php
$args = array(
'post_type' => 'sp_event',
@@ -48,13 +48,13 @@ class SP_Widget_Countdown extends WP_Widget {
'post_status' => 'future',
);
if ( ! sportspress_dropdown_pages( $args ) ):
sportspress_post_adder( 'sp_event' );
sportspress_post_adder( 'sp_event', __( 'Add New Event', 'sportspress' ) );
endif;
?>
</p>
<p><input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_league'); ?>" name="<?php echo $this->get_field_name('show_league'); ?>" value="1" <?php checked( $show_league, 1 ); ?>>
<label for="<?php echo $this->get_field_id('show_league'); ?>"><?php printf( __( 'Display %s', 'sportspress' ), __( 'League', 'sportspress' ) ); ?></label></p>
<label for="<?php echo $this->get_field_id('show_league'); ?>"><?php _e( 'Display League', 'sportspress' ); ?></label></p>
<?php
}
}

View File

@@ -62,7 +62,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('league'),
'id' => $this->get_field_id('league'),
'selected' => $league,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
'show_option_all' => __( 'All Leagues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -78,7 +78,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('season'),
'id' => $this->get_field_id('season'),
'selected' => $season,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
'show_option_all' => __( 'All Seasons', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -94,7 +94,7 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('venue'),
'id' => $this->get_field_id('venue'),
'selected' => $venue,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Venues', 'sportspress' ) ),
'show_option_all' => __( 'All Venues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -110,17 +110,17 @@ class SportsPress_Widget_Future_Events extends WP_Widget {
'name' => $this->get_field_name('team'),
'id' => $this->get_field_id('team'),
'selected' => $team,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
'show_option_all' => __( 'All Teams', 'sportspress' ),
'values' => 'ID',
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
sportspress_post_adder( 'sp_table' );
sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) );
endif;
?>
</p>
<p><label for="<?php echo $this->get_field_id('number'); ?>"><?php printf( __( 'Number of %s to show:', 'sportspress' ), __( 'events', 'sportspress' ) ); ?></label>
<p><label for="<?php echo $this->get_field_id('number'); ?>"><?php _e( 'Number of events to show:', 'sportspress' ); ?></label>
<input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3"></p>
<?php
}

View File

@@ -38,7 +38,7 @@ class SportsPress_Widget_League_Table extends WP_Widget {
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:', 'sportspress' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
<p><label for="<?php echo $this->get_field_id('id'); ?>"><?php printf( __( 'Select %s:', 'sportspress' ), __( 'League Table', 'sportspress' ) ); ?></label>
<p><label for="<?php echo $this->get_field_id('id'); ?>"><?php _e( 'Select League Table:', 'sportspress' ); ?></label>
<?php
$args = array(
'post_type' => 'sp_table',
@@ -49,7 +49,7 @@ class SportsPress_Widget_League_Table extends WP_Widget {
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
sportspress_post_adder( 'sp_table' );
sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) );
endif;
?>
</p>

View File

@@ -44,7 +44,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:', 'sportspress' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
<p><label for="<?php echo $this->get_field_id('id'); ?>"><?php printf( __( 'Select %s:', 'sportspress' ), __( 'Player List', 'sportspress' ) ); ?></label>
<p><label for="<?php echo $this->get_field_id('id'); ?>"><?php _e( 'Select Player List:', 'sportspress' ); ?></label>
<?php
$args = array(
'post_type' => 'sp_list',
@@ -55,7 +55,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
sportspress_post_adder( 'sp_list' );
sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) );
endif;
?>
</p>
@@ -98,7 +98,7 @@ class SportsPress_Widget_Player_list extends WP_Widget {
'class' => 'sp-select-orderby widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
sportspress_post_adder( 'sp_list' );
sportspress_post_adder( 'sp_list', __( 'Add New Player List', 'sportspress' ) );
endif;
?>
</p>

View File

@@ -62,7 +62,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('league'),
'id' => $this->get_field_id('league'),
'selected' => $league,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ),
'show_option_all' => __( 'All Leagues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -78,7 +78,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('season'),
'id' => $this->get_field_id('season'),
'selected' => $season,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
'show_option_all' => __( 'All Seasons', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -94,7 +94,7 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('venue'),
'id' => $this->get_field_id('venue'),
'selected' => $venue,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Venues', 'sportspress' ) ),
'show_option_all' => __( 'All Venues', 'sportspress' ),
'hide_empty' => 0,
'values' => 'term_id',
'class' => 'widefat',
@@ -110,17 +110,17 @@ class SportsPress_Widget_Recent_Events extends WP_Widget {
'name' => $this->get_field_name('team'),
'id' => $this->get_field_id('team'),
'selected' => $team,
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
'show_option_all' => __( 'All Teams', 'sportspress' ),
'values' => 'ID',
'class' => 'widefat',
);
if ( ! sportspress_dropdown_pages( $args ) ):
sportspress_post_adder( 'sp_table' );
sportspress_post_adder( 'sp_table', __( 'Add New League Table', 'sportspress' ) );
endif;
?>
</p>
<p><label for="<?php echo $this->get_field_id('number'); ?>"><?php printf( __( 'Number of %s to show:', 'sportspress' ), __( 'events', 'sportspress' ) ); ?></label>
<p><label for="<?php echo $this->get_field_id('number'); ?>"><?php _e( 'Number of events to show:', 'sportspress' ); ?></label>
<input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3"></p>
<?php
}