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
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: SportsPress
|
||||
* Plugin URI: http://themeboy.com/sportspress/
|
||||
* Description: Manage your club and its players, staff, events, league tables, and player lists.
|
||||
* Version: 1.0.4
|
||||
* Version: 1.0.5
|
||||
* Author: ThemeBoy
|
||||
* Author URI: http://themeboy.com/
|
||||
* Requires at least: 3.8
|
||||
@@ -123,7 +123,7 @@ final class SportsPress {
|
||||
}
|
||||
|
||||
/**
|
||||
* Show action links on the plugin screen
|
||||
* Show action links on the plugin screen.
|
||||
*
|
||||
* @param mixed $links
|
||||
* @return array
|
||||
@@ -172,7 +172,7 @@ final class SportsPress {
|
||||
}
|
||||
|
||||
/**
|
||||
* Define SP Constants
|
||||
* Define SP Constants.
|
||||
*/
|
||||
private function define_constants() {
|
||||
define( 'SP_PLUGIN_FILE', __FILE__ );
|
||||
@@ -282,7 +282,7 @@ final class SportsPress {
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure theme and server variable compatibility and setup image sizes..
|
||||
* Ensure theme and server variable compatibility and setup image sizes.
|
||||
*/
|
||||
public function setup_environment() {
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
|
||||
Reference in New Issue
Block a user