define_constants(); add_action( 'init', array( $this, 'get_video_ids' ) ); add_action( 'admin_menu', array( $this, 'admin_menu' ), 8 ); add_action( 'sportspress_screen_ids', array( $this, 'screen_ids' ) ); add_filter( 'sportspress_next_steps', array( $this, 'next_steps' ) ); } /** * Define constants. */ private function define_constants() { if ( !defined( 'SP_TUTORIALS_VERSION' ) ) define( 'SP_TUTORIALS_VERSION', '1.7' ); if ( !defined( 'SP_TUTORIALS_URL' ) ) define( 'SP_TUTORIALS_URL', plugin_dir_url( __FILE__ ) ); if ( !defined( 'SP_TUTORIALS_DIR' ) ) define( 'SP_TUTORIALS_DIR', plugin_dir_path( __FILE__ ) ); } /** * Get video IDs. */ public function get_video_ids() { $this->ids = apply_filters( 'sportspress_tutorial_videos', array( __( 'Get Started', 'sportspress' ) => apply_filters( 'sportspress_get_started_tutorial_videos', array( __( 'Installation', 'sportspress' ) => '121430679', __( 'Competitions', 'sportspress' ) . ' & ' . __( 'Seasons', 'sportspress' ) => '121438196', __( 'Venues', 'sportspress' ) => '121438615', __( 'Positions', 'sportspress' ) . ' & ' . __( 'Jobs', 'sportspress' ) => '121438826', ) ), __( 'Teams', 'sportspress' ) => apply_filters( 'sportspress_team_tutorial_videos', array( __( 'Add New Team', 'sportspress' ) => '121439873', __( 'League Tables', 'sportspress' ) => '121592514', ) ), __( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ) => array_merge( apply_filters( 'sportspress_player_tutorial_videos', array( __( 'Add New Player', 'sportspress' ) => '121440032', ) ), apply_filters( 'sportspress_staff_tutorial_videos', array( __( 'Add New Staff', 'sportspress' ) => '121440185', ) ) ), __( 'Events', 'sportspress' ) => apply_filters( 'sportspress_event_tutorial_videos', array( __( 'Add New Event', 'sportspress' ) => '121524233', __( 'Edit Event', 'sportspress' ) => '121590015', __( 'Calendars', 'sportspress' ) => '121591259', ) ), ) ); } /** * Add menu item */ public function admin_menu() { add_submenu_page( 'sportspress', __( 'Tutorials', 'sportspress' ), __( 'Tutorials', 'sportspress' ), 'manage_sportspress', 'sportspress-tutorials', array( $this, 'tutorials_page' ) ); } /** * Init the tutorials page */ public function tutorials_page() { $i = 0; ?>

ids as $section => $ids ) { ?>

array( 'link' => admin_url( add_query_arg( array( 'page' => 'sportspress-tutorials' ), 'admin.php' ) ), 'icon' => 'dashicons dashicons-video-alt3', 'label' => __( 'Tutorials', 'sportspress' ), ) ) + $steps; return $steps; } } endif; if ( get_option( 'sportspress_load_tutorials_module', 'yes' ) == 'yes' ) { new SportsPress_Tutorials(); }