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

@@ -30,7 +30,7 @@ class SportsPressGeneralSettingsPage {
}
function sport_callback() {
global $sportspress_options, $sportspress_sports;
global $sportspress_options;
$selected = sportspress_array_value( $sportspress_options, 'sport', null );
$custom_sport_name = sportspress_array_value( $sportspress_options, 'custom_sport_name', null );
@@ -38,7 +38,7 @@ class SportsPressGeneralSettingsPage {
<fieldset>
<select id="sportspress_sport" name="sportspress[sport]">
<option value><?php _e( '&mdash; Select &mdash;', 'sportspress' ); ?></option>
<?php foreach( $sportspress_sports as $slug => $sport ): ?>
<?php foreach( SP()->sports->options as $slug => $sport ): ?>
<option value="<?php echo $slug; ?>" <?php selected( $selected, $slug ); ?>><?php echo $sport['name']; ?></option>
<?php endforeach; ?>
<option value="custom" <?php selected( $selected, 'custom' ); ?>><?php _e( 'Custom', 'sportspress' ); ?></option>