Display SP in admin menu for league managers
This commit is contained in:
@@ -25,7 +25,9 @@ class SP_Admin_Menus {
|
||||
add_action( 'admin_menu', array( $this, 'admin_menu' ), 6 );
|
||||
add_action( 'admin_menu', array( $this, 'leagues_menu' ), 7 );
|
||||
add_action( 'admin_menu', array( $this, 'seasons_menu' ), 8 );
|
||||
add_action( 'admin_menu', array( $this, 'status_menu' ), 20 );
|
||||
|
||||
if ( current_user_can( 'manage_options' ) )
|
||||
add_action( 'admin_menu', array( $this, 'status_menu' ), 20 );
|
||||
|
||||
if ( apply_filters( 'sportspress_show_addons_page', false ) ) // Make true to display by default
|
||||
add_action( 'admin_menu', array( $this, 'addons_menu' ), 70 );
|
||||
|
||||
@@ -27,8 +27,8 @@ class SP_Settings_General extends SP_Settings_Page {
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
||||
add_action( 'sportspress_admin_field_country', array( $this, 'country_setting' ) );
|
||||
add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) );
|
||||
add_action( 'sportspress_admin_field_frontend_styles', array( $this, 'frontend_styles_setting' ) );
|
||||
add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,10 +237,9 @@ class SP_Settings_General extends SP_Settings_Page {
|
||||
* @param mixed $name
|
||||
* @param mixed $id
|
||||
* @param mixed $value
|
||||
* @param string $desc (default: '')
|
||||
* @return void
|
||||
*/
|
||||
function color_picker( $name, $id, $value, $desc = '' ) {
|
||||
function color_picker( $name, $id, $value ) {
|
||||
echo '<div class="sp-color-box"><strong>' . esc_html( $name ) . '</strong>
|
||||
<input name="' . esc_attr( $id ). '" id="' . esc_attr( $id ) . '" type="text" value="' . esc_attr( $value ) . '" class="colorpick" /> <div id="colorPickerDiv_' . esc_attr( $id ) . '" class="colorpickdiv"></div>
|
||||
</div>';
|
||||
|
||||
@@ -347,7 +347,6 @@ class SP_Install {
|
||||
foreach ( $cap_group as $cap ):
|
||||
$wp_roles->add_cap( 'sp_league_manager', $cap );
|
||||
$wp_roles->add_cap( 'administrator', $cap );
|
||||
$wp_roles->add_cap( 'administrator', 'manage_sportspress' );
|
||||
endforeach;
|
||||
endforeach;
|
||||
endif;
|
||||
@@ -364,6 +363,7 @@ class SP_Install {
|
||||
$capabilities = array();
|
||||
|
||||
$capabilities['core'] = array(
|
||||
'manage_sportspress',
|
||||
'view_sportspress_reports',
|
||||
'edit_sp_player_statistics',
|
||||
'edit_sp_team_columns',
|
||||
|
||||
@@ -9,8 +9,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
* Registers post types and taxonomies
|
||||
*
|
||||
* @class SP_Post_types
|
||||
* @version 0.7
|
||||
* @package SportsPress/Classes/Products
|
||||
* @version 1.0.5
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user