Plug meta boxes into admin cpm classes

This commit is contained in:
Brian Miyaji
2014-03-26 16:28:28 +11:00
parent 95a7fbb9c7
commit 690ba1463f
53 changed files with 3990 additions and 2386 deletions

View File

@@ -13,7 +13,7 @@
class SP_Formats {
/** @var array Array of formats */
public $formats;
private $data;
/**
* Constructor for the formats class - defines all preset formats.
@@ -22,7 +22,7 @@ class SP_Formats {
* @return void
*/
public function __construct() {
$this->formats = apply_filters( 'sportspress_formats', array(
$this->data = apply_filters( 'sportspress_formats', array(
'event' => array(
'league' => __( 'League', 'sportspress' ),
'friendly' => __( 'Friendly', 'sportspress' ),
@@ -37,4 +37,12 @@ class SP_Formats {
),
));
}
public function __get( $key ) {
return ( array_key_exists( $key, $this->data ) ? $this->data[ $key ] : null );
}
public function __set( $key, $value ){
$this->data[ $key ] = $value;
}
}