Display module descriptions in admin
This commit is contained in:
@@ -248,8 +248,16 @@ class SP_Settings_Modules extends SP_Settings_Page {
|
||||
<i class="<?php echo sp_array_value( $module, 'icon', 'dashicons dashicons-admin-generic' ); ?>"></i>
|
||||
<?php echo sp_array_value( $module, 'label', $id ); ?>
|
||||
</span>
|
||||
<?php if ( array_key_exists( 'link', $module ) ) { ?>
|
||||
<a class="button<?php if ( ! array_key_exists( 'action', $module ) ) { ?> button-primary<?php } ?>" href="<?php echo $module['link']; ?>" target="_blank"><?php echo sp_array_value( $module, 'action', __( 'Learn More', 'sportspress' ) ); ?></a>
|
||||
<?php if ( isset( $module['desc'] ) && ! array_key_exists( 'action', $module ) ) { ?>
|
||||
<span class="sp-desc">
|
||||
<?php echo $module['desc']; ?>
|
||||
<?php if ( array_key_exists( 'link', $module ) && ! array_key_exists( 'action', $module ) ) { ?>
|
||||
<a href="<?php echo $module['link']; ?>" target="_blank"><?php echo sp_array_value( $module, 'action', __( 'Learn more', 'sportspress' ) ); ?></a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<?php if ( array_key_exists( 'link', $module ) && array_key_exists( 'action', $module ) ) { ?>
|
||||
<a class="button" href="<?php echo $module['link']; ?>" target="_blank"><?php echo sp_array_value( $module, 'action', __( 'Learn more', 'sportspress' ) ); ?></a>
|
||||
<?php } ?>
|
||||
</td></tr>
|
||||
<?php } else { ?>
|
||||
@@ -259,6 +267,9 @@ class SP_Settings_Modules extends SP_Settings_Page {
|
||||
<i class="<?php echo sp_array_value( $module, 'icon', 'dashicons dashicons-admin-generic' ); ?>"></i>
|
||||
<?php echo sp_array_value( $module, 'label', $id ); ?>
|
||||
</label>
|
||||
<?php if ( isset( $module['desc'] ) ) { ?>
|
||||
<span class="sp-desc"><?php echo $module['desc']; ?></span>
|
||||
<?php } ?>
|
||||
</td></tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
@@ -27,30 +27,35 @@ class SP_Modules {
|
||||
'calendars' => array(
|
||||
'label' => __( 'Calendars', 'sportspress' ),
|
||||
'icon' => 'sp-icon-calendar',
|
||||
'desc' => __( 'Organize and publish calendars using different layouts.', 'sportspress' ),
|
||||
),
|
||||
'tournaments' => array(
|
||||
'label' => __( 'Tournaments', 'sportspress' ),
|
||||
'class' => 'SportsPress_Tournaments',
|
||||
'icon' => 'sp-icon-tournament',
|
||||
'link' => 'http://tboy.co/tournaments',
|
||||
'desc' => __( 'Schedule tournaments and create interactive playoff brackets.', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'team' => array(
|
||||
'league_tables' => array(
|
||||
'label' => __( 'League Tables', 'sportspress' ),
|
||||
'icon' => 'sp-icon-chart',
|
||||
'desc' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
||||
),
|
||||
'team_colors' => array(
|
||||
'label' => __( 'Team Colors', 'sportspress' ),
|
||||
'class' => 'SportsPress_Team_Colors',
|
||||
'icon' => 'sp-icon-color',
|
||||
'link' => 'http://tboy.co/colors',
|
||||
'desc' => __( 'Create a custom color palette for each team.', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'player' => array(
|
||||
'player_lists' => array(
|
||||
'label' => __( 'Player Lists', 'sportspress' ),
|
||||
'icon' => 'sp-icon-list',
|
||||
'desc' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
||||
),
|
||||
'birthdays' => array(
|
||||
'label' => __( 'Birthdays', 'sportspress' ),
|
||||
@@ -63,6 +68,7 @@ class SP_Modules {
|
||||
__( 'Add your [stars] on [link]wordpress.org[/link] and get the Birthdays module for free.','sportspress' )
|
||||
),
|
||||
'icon' => 'sp-icon-cake',
|
||||
'desc' => __( "Display each player's birthday and their current age.", 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'staff' => array(
|
||||
@@ -71,12 +77,14 @@ class SP_Modules {
|
||||
'class' => 'SportsPress_Staff_Directories',
|
||||
'icon' => 'sp-icon-archive',
|
||||
'link' => 'http://tboy.co/directories',
|
||||
'desc' => __( 'Organize and display staff in list and gallery layouts.', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
'other' => array(
|
||||
'tutorials' => array(
|
||||
'label' => __( 'Tutorials', 'sportspress' ),
|
||||
'icon' => 'dashicons dashicons-video-alt3',
|
||||
'desc' => __( 'Display a dashboard page with SportsPress video tutorials.', 'sportspress' ),
|
||||
),
|
||||
'twitter' => array(
|
||||
'label' => __( 'Twitter', 'sportspress' ),
|
||||
@@ -85,24 +93,28 @@ class SP_Modules {
|
||||
'link' => 'http://tboy.co/tweet',
|
||||
'tip' => __( 'Help spread the word by tweeting with #SportsPress and get the Twitter module for free.', 'sportspress' ),
|
||||
'icon' => 'dashicons dashicons-twitter',
|
||||
'desc' => __( 'Add a Twitter feed to team, player, and staff pages.', 'sportspress' ),
|
||||
),
|
||||
'branding' => array(
|
||||
'label' => __( 'Branding', 'sportspress' ),
|
||||
'class' => 'SportsPress_Branding',
|
||||
'icon' => 'sp-icon-sportspress',
|
||||
'icon' => 'sp-icon-branding',
|
||||
'link' => 'http://tboy.co/branding',
|
||||
'desc' => __( 'Instantly rebrand the dashboard with your own logo and colors.', 'sportspress' ),
|
||||
),
|
||||
'league_menu' => array(
|
||||
'label' => __( 'League Menu', 'sportspress' ),
|
||||
'class' => 'SportsPress_League_Menu',
|
||||
'icon' => 'sp-icon-menu',
|
||||
'link' => 'http://tboy.co/menu',
|
||||
'desc' => __( 'Add a global navigation bar to display logos that link to each team.', 'sportspress' ),
|
||||
),
|
||||
'sponsors' => array(
|
||||
'label' => __( 'Sponsors', 'sportspress' ),
|
||||
'class' => 'SportsPress_Sponsors',
|
||||
'icon' => 'sp-icon-megaphone',
|
||||
'link' => 'http://tboy.co/sponsors',
|
||||
'desc' => __( 'Attract sponsors by offering them advertising space on your website.', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user