| @@ 31-42 (lines=12) @@ | ||
| 28 | $this->page_slug = 'sensei_learners'; |
|
| 29 | ||
| 30 | // Admin functions |
|
| 31 | if ( is_admin() ) { |
|
| 32 | add_action( 'admin_menu', array( $this, 'learners_admin_menu' ), 30); |
|
| 33 | add_action( 'learners_wrapper_container', array( $this, 'wrapper_container' ) ); |
|
| 34 | if ( isset( $_GET['page'] ) && ( $_GET['page'] == $this->page_slug ) ) { |
|
| 35 | add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ) ); |
|
| 36 | add_action( 'admin_print_styles', array( $this, 'enqueue_styles' ) ); |
|
| 37 | } |
|
| 38 | ||
| 39 | add_action( 'admin_init', array( $this, 'add_new_learners' ) ); |
|
| 40 | ||
| 41 | add_action( 'admin_notices', array( $this, 'add_learner_notices' ) ); |
|
| 42 | } // End If Statement |
|
| 43 | ||
| 44 | // Ajax functions |
|
| 45 | if ( is_admin() ) { |
|
| @@ 32-44 (lines=13) @@ | ||
| 29 | $this->page_slug = 'sensei_grading'; |
|
| 30 | ||
| 31 | // Admin functions |
|
| 32 | if ( is_admin() ) { |
|
| 33 | add_action( 'admin_menu', array( $this, 'grading_admin_menu' ), 20); |
|
| 34 | add_action( 'grading_wrapper_container', array( $this, 'wrapper_container' ) ); |
|
| 35 | if ( isset( $_GET['page'] ) && ( $_GET['page'] == $this->page_slug ) ) { |
|
| 36 | add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ) ); |
|
| 37 | add_action( 'admin_print_styles', array( $this, 'enqueue_styles' ) ); |
|
| 38 | } |
|
| 39 | ||
| 40 | add_action( 'admin_init', array( $this, 'admin_process_grading_submission' ) ); |
|
| 41 | ||
| 42 | add_action( 'admin_notices', array( $this, 'add_grading_notices' ) ); |
|
| 43 | // add_action( 'sensei_grading_notices', array( $this, 'sensei_grading_notices' ) ); |
|
| 44 | } // End If Statement |
|
| 45 | ||
| 46 | // Ajax functions |
|
| 47 | if ( is_admin() ) { |
|