Change 'event_id' parameter to 'event' for consistency

This commit is contained in:
Brian Miyaji
2017-12-11 12:10:42 +11:00
parent dacfa8eac0
commit d1e1619780
3 changed files with 9 additions and 9 deletions

View File

@@ -470,8 +470,8 @@ class SP_AJAX {
</p> </p>
<p> <p>
<label> <label>
<?php _e( 'Event ID:', 'sportspress' ); ?> <?php _e( 'Event:', 'sportspress' ); ?>
<input class="regular-text" type="number" name="event_id"> <input class="regular-text" type="number" name="event">
</label> </label>
</p> </p>
<p> <p>
@@ -1037,7 +1037,7 @@ class SP_AJAX {
args.show_all_events_link = $div.find('[name=show_all_events_link]:checked').length; args.show_all_events_link = $div.find('[name=show_all_events_link]:checked').length;
} else if ( 'event_blocks' == type ) { } else if ( 'event_blocks' == type ) {
args.title = $div.find('[name=title]').val(); args.title = $div.find('[name=title]').val();
args.event_id = $div.find('[name=event_id]').val(); args.event = $div.find('[name=event]').val();
args.team = $div.find('[name=team]').val(); args.team = $div.find('[name=team]').val();
args.league = $div.find('[name=league]').val(); args.league = $div.find('[name=league]').val();
args.season = $div.find('[name=season]').val(); args.season = $div.find('[name=season]').val();

View File

@@ -47,7 +47,7 @@ class SP_Calendar extends SP_Secondary_Post {
public $number; public $number;
/** @var int The event ID. */ /** @var int The event ID. */
public $event_id; public $event;
/** /**
* __construct function. * __construct function.
@@ -281,8 +281,8 @@ class SP_Calendar extends SP_Secondary_Post {
); );
} }
if ( $this->event_id) { if ( $this->event) {
$args['p'] = $this->event_id; $args['p'] = $this->event;
} }
if ( 'auto' === $this->date && 'any' === $this->status ) { if ( 'auto' === $this->date && 'any' === $this->status ) {

View File

@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
$defaults = array( $defaults = array(
'id' => null, 'id' => null,
'event_id' => null, 'event' => null,
'title' => false, 'title' => false,
'status' => 'default', 'status' => 'default',
'date' => 'default', 'date' => 'default',
@@ -59,8 +59,8 @@ if ( $date_future != 'default' )
$calendar->future = $date_future; $calendar->future = $date_future;
if ( $date_relative != 'default' ) if ( $date_relative != 'default' )
$calendar->relative = $date_relative; $calendar->relative = $date_relative;
if ( $event_id ) if ( $event )
$calendar->event_id = $event_id; $calendar->event = $event;
if ( $league ) if ( $league )
$calendar->league = $league; $calendar->league = $league;
if ( $season ) if ( $season )