Move globals to classes
This commit is contained in:
@@ -25,7 +25,6 @@ class SP_Countries {
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
$continents = array(
|
||||
__( 'Africa', 'sportspress' ) => array('AO','BF','BI','BJ','BW','CD','CF','CG','CI','CM','CV','DJ','DZ','EG','EH','ER','ET','GA','GH','GM','GN','GQ','GW','KE','KM','LR','LS','LY','MA','MG','ML','MR','MU','MZ','NA','NE','NG','RW','SC','SD','SL','SN','SO','ST','SZ','TD','TG','TN','TZ','UG','ZA','ZM','ZW'),
|
||||
__( 'Asia', 'sportspress' ) => array('AE','AF','AM','AZ','BD','BH','BN','BT','CN','CY','GE','HK','IL','IN','IQ','IR','JO','JP','KG','KH','KP','KR','KW','KZ','LA','LB','LK','MM','MN','MO','MV','MY','NP','OM','PH','PK','QA','SA','SG','TH','TJ','TM','TW','UZ','VN','YE'),
|
||||
|
||||
40
includes/class-sp-formats.php
Normal file
40
includes/class-sp-formats.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* SportsPress formats
|
||||
*
|
||||
* The SportsPress formats class stores preset sport data.
|
||||
*
|
||||
* @class SP_Formats
|
||||
* @version 0.7
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
*/
|
||||
class SP_Formats {
|
||||
|
||||
/** @var array Array of formats */
|
||||
public $formats;
|
||||
|
||||
/**
|
||||
* Constructor for the formats class - defines all preset formats.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->formats = apply_filters( 'sportspress_formats', array(
|
||||
'event' => array(
|
||||
'league' => __( 'League', 'sportspress' ),
|
||||
'friendly' => __( 'Friendly', 'sportspress' ),
|
||||
),
|
||||
'calendar' => array(
|
||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
||||
'list' => __( 'List', 'sportspress' ),
|
||||
),
|
||||
'list' => array(
|
||||
'list' => __( 'List', 'sportspress' ),
|
||||
'gallery' => __( 'Gallery', 'sportspress' ),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
28
includes/class-sp-sports.php
Normal file
28
includes/class-sp-sports.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* SportsPress sports
|
||||
*
|
||||
* The SportsPress sports class stores preset sport data.
|
||||
*
|
||||
* @class SP_Sports
|
||||
* @version 0.7
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
*/
|
||||
class SP_Sports {
|
||||
|
||||
/** @var array Array of sports */
|
||||
public $sports;
|
||||
|
||||
/**
|
||||
* Constructor for the sports class - defines all preset sports.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->sports = apply_filters( 'sportspress_sports', array(
|
||||
));
|
||||
}
|
||||
}
|
||||
61
includes/class-sp-text.php
Normal file
61
includes/class-sp-text.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* SportsPress text
|
||||
*
|
||||
* The SportsPress text class stores editable strings.
|
||||
*
|
||||
* @class SP_Text
|
||||
* @version 0.7
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
*/
|
||||
class SP_Text {
|
||||
|
||||
/** @var array Array of text */
|
||||
public $text;
|
||||
|
||||
/**
|
||||
* Constructor for the text class - defines all editable strings.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$strings = array(
|
||||
__( 'Article', 'sportspress' ),
|
||||
__( 'Current Team', 'sportspress' ),
|
||||
__( 'Date', 'sportspress' ),
|
||||
__( 'Details', 'sportspress' ),
|
||||
__( 'days', 'sportspress' ),
|
||||
__( 'Event', 'sportspress' ),
|
||||
__( 'Friendly', 'sportspress' ),
|
||||
__( 'hrs', 'sportspress' ),
|
||||
__( 'League', 'sportspress' ),
|
||||
__( 'mins', 'sportspress' ),
|
||||
__( 'Nationality', 'sportspress' ),
|
||||
__( 'Past Teams', 'sportspress' ),
|
||||
__( 'Player', 'sportspress' ),
|
||||
__( 'Position', 'sportspress' ),
|
||||
__( 'Pos', 'sportspress' ),
|
||||
__( 'Preview', 'sportspress' ),
|
||||
__( 'Rank', 'sportspress' ),
|
||||
__( 'Recap', 'sportspress' ),
|
||||
__( 'Results', 'sportspress' ),
|
||||
__( 'Season', 'sportspress' ),
|
||||
__( 'secs', 'sportspress' ),
|
||||
__( 'Staff', 'sportspress' ),
|
||||
__( 'Substitute', 'sportspress' ),
|
||||
__( 'Team', 'sportspress' ),
|
||||
__( 'Teams', 'sportspress' ),
|
||||
__( 'Time', 'sportspress' ),
|
||||
__( 'Total', 'sportspress' ),
|
||||
__( 'Venue', 'sportspress' ),
|
||||
__( 'View all players', 'sportspress' ),
|
||||
__( 'View all events', 'sportspress' ),
|
||||
__( 'View full table', 'sportspress' ),
|
||||
);
|
||||
sort( $strings );
|
||||
$this->strings = apply_filters( 'sportspress_text', $strings );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user