Merge branch 'master' into feature-responsive
This commit is contained in:
@@ -405,6 +405,7 @@ class SP_Meta_Box_Event_Performance {
|
||||
<?php } ?>
|
||||
<td>
|
||||
<?php echo get_the_title( $player_id ); ?>
|
||||
<?php do_action ( 'sportspress_event_performance_player_selection' ); ?>
|
||||
<?php if ( 1 == $section ) { ?>
|
||||
<input type="hidden" name="sp_order[<?php echo $team_id; ?>][]" value="<?php echo $player_id; ?>">
|
||||
<?php } ?>
|
||||
@@ -569,4 +570,4 @@ class SP_Meta_Box_Event_Performance {
|
||||
return $output;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Meta_Boxes
|
||||
* @version 2.5
|
||||
* @version 2.5.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
@@ -468,6 +468,12 @@ class SP_AJAX {
|
||||
<input class="regular-text" type="text" name="title">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<?php _e( 'Event:', 'sportspress' ); ?>
|
||||
<input class="regular-text" type="number" name="event">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<?php printf( __( 'Select %s:', 'sportspress' ), __( 'Calendar', 'sportspress' ) ); ?>
|
||||
@@ -1031,6 +1037,7 @@ class SP_AJAX {
|
||||
args.show_all_events_link = $div.find('[name=show_all_events_link]:checked').length;
|
||||
} else if ( 'event_blocks' == type ) {
|
||||
args.title = $div.find('[name=title]').val();
|
||||
args.event = $div.find('[name=event]').val();
|
||||
args.team = $div.find('[name=team]').val();
|
||||
args.league = $div.find('[name=league]').val();
|
||||
args.season = $div.find('[name=season]').val();
|
||||
|
||||
@@ -45,6 +45,9 @@ class SP_Calendar extends SP_Secondary_Post {
|
||||
|
||||
/** @var int Number of events. */
|
||||
public $number;
|
||||
|
||||
/** @var int The event ID. */
|
||||
public $event;
|
||||
|
||||
/**
|
||||
* __construct function.
|
||||
@@ -277,6 +280,10 @@ class SP_Calendar extends SP_Secondary_Post {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if ( $this->event) {
|
||||
$args['p'] = $this->event;
|
||||
}
|
||||
|
||||
if ( 'auto' === $this->date && 'any' === $this->status ) {
|
||||
$args['post_status'] = 'publish';
|
||||
|
||||
@@ -345,11 +345,12 @@ function sp_get_player_number( $post = 0 ) {
|
||||
}
|
||||
|
||||
function sp_get_player_name_with_number( $post = 0, $prepend = '', $append = '. ' ) {
|
||||
$name = apply_filters( 'sportspress_player_name', get_the_title( $post ));
|
||||
$number = sp_get_player_number( $post );
|
||||
if ( isset( $number ) && '' !== $number ) {
|
||||
return $prepend . $number . $append . get_the_title( $post );
|
||||
return apply_filters( 'sportspress_player_name_with_number', $prepend . $number . $append . $name);
|
||||
} else {
|
||||
return get_the_title( $post );
|
||||
return $name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,4 +414,4 @@ function sp_get_position_caption( $term = 0 ) {
|
||||
return $term->name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
$defaults = array(
|
||||
'id' => null,
|
||||
'event' => null,
|
||||
'title' => false,
|
||||
'status' => 'default',
|
||||
'date' => 'default',
|
||||
@@ -58,6 +59,8 @@ if ( $date_future != 'default' )
|
||||
$calendar->future = $date_future;
|
||||
if ( $date_relative != 'default' )
|
||||
$calendar->relative = $date_relative;
|
||||
if ( $event )
|
||||
$calendar->event = $event;
|
||||
if ( $league )
|
||||
$calendar->league = $league;
|
||||
if ( $season )
|
||||
@@ -175,4 +178,4 @@ if ( $title )
|
||||
if ( $id && $show_all_events_link )
|
||||
echo '<div class="sp-calendar-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a></div>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user