Initialize settings classes

This commit is contained in:
Brian Miyaji
2014-03-27 03:10:04 +11:00
parent 690ba1463f
commit d3b27c8c73
33 changed files with 6294 additions and 89 deletions

View File

@@ -2264,8 +2264,13 @@ class SP_Sports {
}
public function __get( $key ) {
if ( 'options' == $key )
return $this->data;
if ( 'options' == $key ):
$option = array();
foreach ( $this->data as $slug => $data ):
$options[ $slug ] = $data['name'];
endforeach;
return $options;
endif;
return ( array_key_exists( $key, $this->data ) ? $this->data[ $key ] : null );
}