Add modules tab to settings page

This commit is contained in:
Brian Miyaji
2015-01-21 23:49:03 +11:00
parent 790789c6b6
commit 82fee9dcee
18 changed files with 429 additions and 163 deletions

View File

@@ -20,17 +20,32 @@ class SP_Shortcodes {
'event_details' => __CLASS__ . '::event_details',
'event_performance' => __CLASS__ . '::event_performance',
'countdown' => __CLASS__ . '::countdown',
'event_calendar' => __CLASS__ . '::event_calendar',
'event_list' => __CLASS__ . '::event_list',
'event_blocks' => __CLASS__ . '::event_blocks',
'league_table' => __CLASS__ . '::league_table',
'player_details' => __CLASS__ . '::player_details',
'player_statistics' => __CLASS__ . '::player_statistics',
'player_list' => __CLASS__ . '::player_list',
'player_gallery' => __CLASS__ . '::player_gallery',
'staff' => __CLASS__ . '::staff',
);
if ( 'yes' == get_option( 'sportspress_load_calendars_module', 'yes' ) ) {
$shortcodes = array_merge( $shortcodes, array(
'event_calendar' => __CLASS__ . '::event_calendar',
'event_list' => __CLASS__ . '::event_list',
'event_blocks' => __CLASS__ . '::event_blocks',
));
}
if ( 'yes' == get_option( 'sportspress_load_league_tables_module', 'yes' ) ) {
$shortcodes = array_merge( $shortcodes, array(
'league_table' => __CLASS__ . '::league_table',
));
}
if ( 'yes' == get_option( 'sportspress_load_player_lists_module', 'yes' ) ) {
$shortcodes = array_merge( $shortcodes, array(
'player_list' => __CLASS__ . '::player_list',
'player_gallery' => __CLASS__ . '::player_gallery',
));
}
foreach ( $shortcodes as $shortcode => $function ) {
add_shortcode( $shortcode, $function );
}