Add chosen selectors to player edit screen, style installation notice

This commit is contained in:
Brian Miyaji
2014-02-18 13:22:51 +11:00
parent 3bfeaef612
commit 94ac918e0c
7 changed files with 286 additions and 131 deletions

View File

@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
<div id="message" class="updated sportspress-message"> <div id="message" class="updated sportspress-message">
<p><?php _e( '<strong>Welcome to SportsPress</strong> &#8211; Get Started', 'sportspress' ); ?></p> <p><?php _e( '<strong>Welcome to SportsPress</strong> &#8211; Get Started', 'sportspress' ); ?></p>
<p class="submit"> <p class="submit">
<a class="button button-primary" href="<?php echo admin_url('options-general.php?page=sportspress'); ?>"><?php _e( 'Go to SportsPress Settings', 'sportspress' ); ?></a> <a class="button-primary" href="<?php echo admin_url('options-general.php?page=sportspress'); ?>"><?php _e( 'Go to SportsPress Settings', 'sportspress' ); ?></a>
<a class="button button-secondary" href="<?php echo add_query_arg('sportspress_installed', '1' ); ?>"><?php _e( 'Skip setup', 'sportspress' ); ?></a> <a class="button-secondary" href="<?php echo add_query_arg('sportspress_installed', '1' ); ?>"><?php _e( 'Skip setup', 'sportspress' ); ?></a>
</p> </p>
</div> </div>

View File

@@ -4,6 +4,7 @@ function sportspress_event_post_init() {
$singular_name = __( 'Event', 'sportspress' ); $singular_name = __( 'Event', 'sportspress' );
$lowercase_name = __( 'events', 'sportspress' ); $lowercase_name = __( 'events', 'sportspress' );
$labels = sportspress_get_post_labels( $name, $singular_name, $lowercase_name ); $labels = sportspress_get_post_labels( $name, $singular_name, $lowercase_name );
//$labels['menu_name'] = __( 'SportsPress', 'sportspress' );
$args = array( $args = array(
'label' => $name, 'label' => $name,
'labels' => $labels, 'labels' => $labels,

View File

@@ -40,12 +40,15 @@ function sportspress_player_meta_init( $post ) {
$seasons = (array)get_the_terms( $post->ID, 'sp_season' ); $seasons = (array)get_the_terms( $post->ID, 'sp_season' );
remove_meta_box( 'submitdiv', 'sp_player', 'side' ); remove_meta_box( 'submitdiv', 'sp_player', 'side' );
add_meta_box( 'submitdiv', __( 'Publish', 'sportspress' ), 'post_submit_meta_box', 'sp_player', 'side', 'high' ); remove_meta_box( 'sp_seasondiv', 'sp_player', 'side' );
remove_meta_box( 'sp_leaguediv', 'sp_player', 'side' );
remove_meta_box( 'sp_positiondiv', 'sp_player', 'side' );
remove_meta_box( 'postimagediv', 'sp_player', 'side' ); remove_meta_box( 'postimagediv', 'sp_player', 'side' );
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' );
add_meta_box( 'submitdiv', __( 'Publish', 'sportspress' ), 'post_submit_meta_box', 'sp_player', 'side', 'high' );
add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_player_details_meta', 'sp_player', 'side', 'high' ); add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_player_details_meta', 'sp_player', 'side', 'high' );
add_meta_box( 'sp_teamdiv', __( 'Teams', 'sportspress' ), 'sportspress_player_team_meta', 'sp_player', 'side', 'high' ); add_meta_box( 'sp_metricsdiv', __( 'Metrics', 'sportspress' ), 'sportspress_player_metrics_meta', 'sp_player', 'side', 'high' );
add_meta_box( 'sp_metricsdiv', __( 'Metrics', 'sportspress' ), 'sportspress_player_metrics_meta', 'sp_player', 'normal', 'high' ); add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' );
if ( $leagues && ! empty( $leagues ) && $seasons && ! empty( $seasons ) ): if ( $leagues && ! empty( $leagues ) && $seasons && ! empty( $seasons ) ):
add_meta_box( 'sp_statsdiv', __( 'Statistics', 'sportspress' ), 'sportspress_player_stats_meta', 'sp_player', 'normal', 'high' ); add_meta_box( 'sp_statsdiv', __( 'Statistics', 'sportspress' ), 'sportspress_player_stats_meta', 'sp_player', 'normal', 'high' );
@@ -67,21 +70,41 @@ function sportspress_player_details_meta( $post ) {
$number = get_post_meta( $post->ID, 'sp_number', true ); $number = get_post_meta( $post->ID, 'sp_number', true );
$nationality = get_post_meta( $post->ID, 'sp_nationality', true ); $nationality = get_post_meta( $post->ID, 'sp_nationality', true );
$teams = array_filter( get_post_meta( $post->ID, 'sp_team', false ) );
$leagues = get_the_terms( $post->ID, 'sp_league' );
$league_ids = array();
if ( $leagues ):
foreach ( $leagues as $league ):
$league_ids[] = $league->term_id;
endforeach;
endif;
$seasons = get_the_terms( $post->ID, 'sp_season' );
$season_ids = array();
if ( $seasons ):
foreach ( $seasons as $season ):
$season_ids[] = $season->term_id;
endforeach;
endif;
$positions = get_the_terms( $post->ID, 'sp_position' );
$position_ids = array();
if ( $positions ):
foreach ( $positions as $position ):
$position_ids[] = $position->term_id;
endforeach;
endif;
$teams = get_posts( array( 'post_type' => 'sp_team', 'posts_per_page' => -1 ) );
$the_teams = array_filter( get_post_meta( $post->ID, 'sp_team', false ) );
$current_team = get_post_meta( $post->ID, 'sp_current_team', true ); $current_team = get_post_meta( $post->ID, 'sp_current_team', true );
?> ?>
<p> <p><strong><?php _e( 'Number', 'sportspress' ); ?></strong></p>
<strong><?php _e( 'Number', 'sportspress' ); ?></strong> <p><input type="text" size="4" id="sp_number" name="sp_number" value="<?php echo $number; ?>"></p>
</p>
<p> <p><strong><?php _e( 'Nationality', 'sportspress' ); ?></strong></p>
<input type="text" size="4" id="sp_number" name="sp_number" value="<?php echo $number; ?>"> <p><select id="sp_nationality" name="sp_nationality" data-placeholder="<?php _e( 'Select Nationality', 'sportspress' ); ?>" class="widefat chosen-select<?php if ( is_rtl() ): ?> chosen-rtl<?php endif; ?>">
</p> <option value=""></option>
<p>
<strong><?php _e( 'Nationality', 'sportspress' ); ?></strong>
</p>
<p>
<select id="sp_nationality" name="sp_nationality" class="chosen-select<?php if ( is_rtl() ): ?> chosen-rtl<?php endif; ?>">
<option value=""><?php _e( '-- Not set --', 'sportspress' ); ?></option>
<?php foreach ( $continents as $continent => $countries ): ?> <?php foreach ( $continents as $continent => $countries ): ?>
<optgroup label="<?php echo $continent; ?>"> <optgroup label="<?php echo $continent; ?>">
<?php foreach ( $countries as $code => $country ): ?> <?php foreach ( $countries as $code => $country ): ?>
@@ -89,28 +112,83 @@ function sportspress_player_details_meta( $post ) {
<?php endforeach; ?> <?php endforeach; ?>
</optgroup> </optgroup>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select></p>
</p>
<?php if ( $teams ): ?>
<p>
<strong><?php _e( 'Current Team', 'sportspress' ); ?></strong>
</p>
<p>
<select id="sp_current_team" name="sp_current_team">
<?php foreach ( $teams as $team ): ?>
<option value="<?php echo $team; ?>" <?php selected ( $current_team, $team ); ?>>
<?php echo get_the_title( $team ); ?>
</option>
<?php endforeach; ?>
</select>
</p>
<?php endif; ?>
<?php
}
function sportspress_player_team_meta( $post ) { <p><strong><?php _e( 'Leagues', 'sportspress' ); ?></strong></p>
sportspress_post_checklist( $post->ID, 'sp_team' ); <p><?php
sportspress_post_adder( 'sp_team' ); $args = array(
'taxonomy' => 'sp_league',
'name' => 'tax_input[sp_league][]',
'selected' => $league_ids,
'values' => 'term_id',
'placeholder' => __( 'Select Leagues', 'sportspress' ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,
);
sportspress_dropdown_taxonomies( $args );
?></p>
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'taxonomy' => 'sp_season',
'name' => 'tax_input[sp_season][]',
'selected' => $season_ids,
'values' => 'term_id',
'placeholder' => __( 'Select Seasons', 'sportspress' ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,
);
sportspress_dropdown_taxonomies( $args );
?></p>
<p><strong><?php _e( 'Teams', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'post_type' => 'sp_team',
'name' => 'sp_team[]',
'selected' => $the_teams,
'values' => 'ID',
'placeholder' => __( 'Select Teams', 'sportspress' ),
'class' => 'sp-team widefat',
'property' => 'multiple',
'chosen' => true,
);
sportspress_dropdown_pages( $args );
?></p>
<p><strong><?php _e( 'Current Team', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'post_type' => 'sp_team',
'name' => 'sp_current_team',
'show_option_blank' => true,
'selected' => $current_team,
'values' => 'ID',
'placeholder' => __( 'Select Team', 'sportspress' ),
'class' => 'sp-current-team widefat',
'chosen' => true,
);
sportspress_dropdown_pages( $args );
?></p>
<p><strong><?php _e( 'Positions', 'sportspress' ); ?></strong></p>
<p><?php
$args = array(
'taxonomy' => 'sp_position',
'name' => 'tax_input[sp_position][]',
'selected' => $position_ids,
'values' => 'term_id',
'placeholder' => __( 'Select Positions', 'sportspress' ),
'class' => 'widefat',
'property' => 'multiple',
'chosen' => true,
);
sportspress_dropdown_taxonomies( $args );
?></p>
<?php
} }
function sportspress_player_metrics_meta( $post ) { function sportspress_player_metrics_meta( $post ) {
@@ -142,37 +220,12 @@ function sportspress_player_metrics_meta( $post ) {
$vars = get_posts( $args ); $vars = get_posts( $args );
if ( $vars ): if ( $vars ):
?>
<div class="sp-data-table-container">
<table class="widefat sp-data-table">
<thead>
<tr>
<th><?php _e( 'Metric', 'sportspress' ); ?></th>
<th><?php _e( 'Value', 'sportspress' ); ?></th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
foreach ( $vars as $var ): foreach ( $vars as $var ):
?> ?>
<tr class="sp-row sp-post<?php if ( $i % 2 == 0 ) echo ' alternate'; ?>"> <p><strong><?php echo $var->post_title; ?></strong></p>
<td> <p><input type="text" name="sp_metrics[<?php echo $var->post_name; ?>]" value="<?php echo sportspress_array_value( $metrics, $var->post_name, '' ); ?>" /></p>
<?php echo $var->post_title; ?>
</td>
<?php <?php
$value = sportspress_array_value( $metrics, $var->post_name, '' );
?>
<td><input type="text" name="sp_metrics[<?php echo $var->post_name; ?>]" value="<?php echo $value; ?>" /></td>
</tr>
<?php
$i++;
endforeach; endforeach;
?>
</tbody>
</table>
</div>
<?php
else: else:
sportspress_post_adder( 'sp_metric' ); sportspress_post_adder( 'sp_metric' );
endif; endif;

View File

@@ -1,13 +1,13 @@
/* SportsPress admin styles */ /* SportsPress admin styles */
.sportspress-message { .sportspress-message {
border-left-color: #ff9900 !important; border-left-color: #6bc2a5 !important;
} }
.sportspress-message a.button-primary, .sportspress-message a.button-primary,
.sportspress-message a.button-secondary { .sportspress-message a.button-secondary {
background: #ff9900; background: #6bc2a5;
border-color: #f48600; border-color: #3bad87;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15); -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
color: #fff; color: #fff;
@@ -16,8 +16,8 @@
.sportspress-message a.button-primary:hover, .sportspress-message a.button-primary:hover,
.sportspress-message a.button-secondary:hover { .sportspress-message a.button-secondary:hover {
background: #ff8800; background: #3bad87;
border-color: #f27000; border-color: #338a6d;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15); -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
color: #fff; color: #fff;
@@ -27,7 +27,7 @@
.sportspress-message a.button-secondary { .sportspress-message a.button-secondary {
-moz-opacity: 0.7; -moz-opacity: 0.7;
opacity: 0.7; opacity: 0.7;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha"(Opacity=70); -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
} }
.widget[id*="sp_recent_events-"] .widget-title h4:before, .widget[id*="sp_recent_events-"] .widget-title h4:before,
@@ -164,6 +164,43 @@ table.widefat td.column-sp_number .sp-flag {
color: #a00; color: #a00;
} }
.chosen-container {
margin: 1px;
}
.chosen-container-multi .chosen-choices {
background: #fff;
color: #333;
padding: 3px 0;
border-color: #ddd;
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
line-height: 2;
}
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
color: #a9a9a9;
}
.chosen-container-multi .chosen-choices li.search-choice {
color: #555;
border-color: #ccc;
background: #f7f7f7;
-webkit-box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);
box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);
vertical-align: top;
}
.chosen-container-multi .chosen-choices li.search-choice:hover {
background: #fafafa;
border-color: #999;
color: #222;
}
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
transition: none;
-webkit-transition: none;
}
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
.form-field .sp-location-picker { .form-field .sp-location-picker {

View File

@@ -10,7 +10,16 @@ jQuery(document).ready(function($){
}); });
// Chosen select // Chosen select
$(".chosen-select").chosen(); $(".chosen-select").chosen({
allow_single_deselect: true,
single_backstroke_delete: false
});
$('#poststuff #sp_detailsdiv .sp-current-team').on('change', function(evt, params) {
$el = $(this).closest('#sp_detailsdiv').find('.sp-team');
$el.find('option[value='+$(this).val()+']').attr('selected', true);
$el.trigger('chosen:updated');
});
// Auto key placeholder // Auto key placeholder
$("#poststuff #title").on("keyup", function() { $("#poststuff #title").on("keyup", function() {

View File

@@ -227,30 +227,66 @@ if ( !function_exists( 'sportspress_dropdown_taxonomies' ) ) {
'show_option_none' => false, 'show_option_none' => false,
'taxonomy' => null, 'taxonomy' => null,
'name' => null, 'name' => null,
'id' => null,
'selected' => null, 'selected' => null,
'hide_empty' => false, 'hide_empty' => false,
'values' => 'slug', 'values' => 'slug',
'class' => null, 'class' => null,
'property' => null,
'placeholder' => null,
'chosen' => false,
); );
$args = array_merge( $defaults, $args ); $args = array_merge( $defaults, $args );
$terms = get_terms( $args['taxonomy'], $args ); $terms = get_terms( $args['taxonomy'], $args );
$name = ( $args['name'] ) ? $args['name'] : $args['taxonomy']; $name = ( $args['name'] ) ? $args['name'] : $args['taxonomy'];
$id = ( $args['id'] ) ? $args['id'] : $name;
unset( $args['name'] );
unset( $args['id'] );
$class = $args['class']; $class = $args['class'];
unset( $args['class'] ); unset( $args['class'] );
$property = $args['property'];
unset( $args['property'] );
$placeholder = $args['placeholder'];
unset( $args['placeholder'] );
$selected = $args['selected'];
unset( $args['selected'] );
$chosen = $args['chosen'];
unset( $args['chosen'] );
if ( $terms ): if ( $terms ):
printf( '<select name="%1$s" class="postform %2$s">', $name, $class ); printf( '<select name="%s" class="postform %s" %s>', $name, $class . ( $chosen ? ' chosen-select' . ( is_rtl() ? ' chosen-rtl' : '' ) : '' ), ( $placeholder != null ? 'data-placeholder="' . $placeholder . '" ' : '' ) . $property );
if ( $args['show_option_all'] ) {
if ( strpos( $property, 'multiple' ) === false ):
if ( $args['show_option_all'] ):
printf( '<option value="0">%s</option>', $args['show_option_all'] ); printf( '<option value="0">%s</option>', $args['show_option_all'] );
} endif;
if ( $args['show_option_none'] ) { if ( $args['show_option_none'] ):
printf( '<option value="-1">%s</option>', $args['show_option_none'] ); printf( '<option value="-1">%s</option>', $args['show_option_none'] );
} endif;
foreach ( $terms as $term ) { endif;
if ( $args['values'] == 'term_id' )
printf( '<option value="%s" %s>%s</option>', $term->term_id, selected( true, $args['selected'] == $term->term_id, false ), $term->name ); foreach ( $terms as $term ):
else
printf( '<option value="%s" %s>%s</option>', $term->slug, selected( true, $args['selected'] == $term->slug, false ), $term->name ); if ( $args['values'] == 'term_id' ):
} $this_value = $term->term_id;
else:
$this_value = $term->slug;
endif;
if ( strpos( $property, 'multiple' ) !== false ):
$selected_prop = in_array( $this_value, $selected ) ? 'selected' : '';
else:
$selected_prop = selected( $this_value, $selected, false );
endif;
printf( '<option value="%s" %s>%s</option>', $this_value, $selected_prop, $term->name );
endforeach;
print( '</select>' ); print( '</select>' );
return true; return true;
else: else:
@@ -264,13 +300,14 @@ if ( !function_exists( 'sportspress_dropdown_pages' ) ) {
$defaults = array( $defaults = array(
'prepend_options' => null, 'prepend_options' => null,
'append_options' => null, 'append_options' => null,
'show_option_blank' => false,
'show_option_all' => false, 'show_option_all' => false,
'show_option_none' => false, 'show_option_none' => false,
'show_dates' => false, 'show_dates' => false,
'option_all_value' => 0, 'option_all_value' => 0,
'option_none_value' => -1, 'option_none_value' => -1,
'name' => 'page_id', 'name' => 'page_id',
'id' => 'page_id', 'id' => null,
'selected' => null, 'selected' => null,
'numberposts' => -1, 'numberposts' => -1,
'posts_per_page' => -1, 'posts_per_page' => -1,
@@ -288,13 +325,16 @@ if ( !function_exists( 'sportspress_dropdown_pages' ) ) {
'post_status' => 'publish', 'post_status' => 'publish',
'values' => 'post_name', 'values' => 'post_name',
'class' => null, 'class' => null,
'property' => null,
'placeholder' => null,
'chosen' => false,
); );
$args = array_merge( $defaults, $args ); $args = array_merge( $defaults, $args );
$name = $args['name']; $name = $args['name'];
unset( $args['name'] ); unset( $args['name'] );
$id = $args['id']; $id = ( $args['id'] ) ? $args['id'] : $name;
unset( $args['id'] ); unset( $args['id'] );
$values = $args['values']; $values = $args['values'];
@@ -303,12 +343,26 @@ if ( !function_exists( 'sportspress_dropdown_pages' ) ) {
$class = $args['class']; $class = $args['class'];
unset( $args['class'] ); unset( $args['class'] );
$property = $args['property'];
unset( $args['property'] );
$placeholder = $args['placeholder'];
unset( $args['placeholder'] );
$selected = $args['selected']; $selected = $args['selected'];
unset( $args['selected'] ); unset( $args['selected'] );
$chosen = $args['chosen'];
unset( $args['chosen'] );
$posts = get_posts( $args ); $posts = get_posts( $args );
if ( $posts || $prepend || $append ): if ( $posts || $args['prepend_options'] || $args['append_options'] ):
printf( '<select name="%s" id="%s" class="postform %s">', $name, $id, $class ); printf( '<select name="%s" id="%s" class="postform %s" %s>', $name, $id, $class . ( $chosen ? ' chosen-select' . ( is_rtl() ? ' chosen-rtl' : '' ) : '' ), ( $placeholder != null ? 'data-placeholder="' . $placeholder . '" ' : '' ) . $property );
if ( strpos( $property, 'multiple' ) === false ):
if ( $args['show_option_blank'] ):
printf( '<option value=""></option>' );
endif;
if ( $args['show_option_all'] ): if ( $args['show_option_all'] ):
printf( '<option value="%s" %s>%s</option>', $args['option_all_value'], selected( $selected, $args['option_all_value'], false ), $args['show_option_all'] ); printf( '<option value="%s" %s>%s</option>', $args['option_all_value'], selected( $selected, $args['option_all_value'], false ), $args['show_option_all'] );
endif; endif;
@@ -320,20 +374,34 @@ if ( !function_exists( 'sportspress_dropdown_pages' ) ) {
printf( '<option value="%s" %s>%s</option>', $slug, selected( $selected, $slug, false ), $label ); printf( '<option value="%s" %s>%s</option>', $slug, selected( $selected, $slug, false ), $label );
endforeach; endforeach;
endif; endif;
endif;
foreach ( $posts as $post ): foreach ( $posts as $post ):
setup_postdata( $post ); setup_postdata( $post );
if ( $values == 'ID' ): if ( $values == 'ID' ):
printf( '<option value="%s" %s>%s</option>', $post->ID, selected( $selected, $post->ID, false ), $post->post_title . ( $args['show_dates'] ? ' (' . $post->post_date . ')' : '' ) ); $this_value = $post->ID;
else: else:
printf( '<option value="%s" %s>%s</option>', $post->post_name, selected( $selected, $post->post_name, false ), $post->post_title ); $this_value = $post->post_name;
endif; endif;
if ( strpos( $property, 'multiple' ) !== false ):
$selected_prop = in_array( $this_value, $selected ) ? 'selected' : '';
else:
$selected_prop = selected( $this_value, $selected, false );
endif;
printf( '<option value="%s" %s>%s</option>', $this_value, $selected_prop, $post->post_title . ( $args['show_dates'] ? ' (' . $post->post_date . ')' : '' ) );
endforeach; endforeach;
wp_reset_postdata(); wp_reset_postdata();
if ( strpos( $property, 'multiple' ) === false ):
if ( $args['append_options'] && is_array( $args['append_options'] ) ): if ( $args['append_options'] && is_array( $args['append_options'] ) ):
foreach( $args['append_options'] as $slug => $label ): foreach( $args['append_options'] as $slug => $label ):
printf( '<option value="%s" %s>%s</option>', $slug, selected( $selected, $slug, false ), $label ); printf( '<option value="%s" %s>%s</option>', $slug, selected( $selected, $slug, false ), $label );
endforeach; endforeach;
endif; endif;
endif;
print( '</select>' ); print( '</select>' );
return true; return true;
else: else:

View File

@@ -85,10 +85,6 @@ Yes; SportsPress will work with any theme, but may require some styling to make
Bugs can be reported either in our support forum or preferably on the [SportsPress GitHub repository](https://github.com/ThemeBoy/SportsPress/issues). Bugs can be reported either in our support forum or preferably on the [SportsPress GitHub repository](https://github.com/ThemeBoy/SportsPress/issues).
= SportsPress is awesome! Can I contribute? =
Yes you can! Join in on our [GitHub repository](http://github.com/ThemeBoy/SportsPress/) :)
= Is this plugin ready for production? = = Is this plugin ready for production? =
SportsPress is currently in beta and is undergoing testing. We are still actively making adjustments to the code, so we do not recommend installing it on a live server until we officially leave the beta phase. SportsPress is currently in beta and is undergoing testing. We are still actively making adjustments to the code, so we do not recommend installing it on a live server until we officially leave the beta phase.
@@ -188,15 +184,6 @@ SportsPress is currently in beta and is undergoing testing. We are still activel
* Tweak - Enable SportsPress content functions to be called without explicit ID. * Tweak - Enable SportsPress content functions to be called without explicit ID.
* Tweak - Remove redundant admin menu links via filter. * Tweak - Remove redundant admin menu links via filter.
= 0.1.10 =
* Documentation - Add Installation, FAQ and Screenshots to assets.
= 0.1.9 =
* Fix - Calculation dependencies.
= 0.1.8 =
* Tweak - Update subversion.
= 0.1.7 = = 0.1.7 =
* Feature - Enable selecting venues to use uploaded images. * Feature - Enable selecting venues to use uploaded images.