LLMS_Meta_Box_Students
LLMS_Meta_Box_Students class
Description Description
Add & remove students.
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.students.php
class LLMS_Meta_Box_Students extends LLMS_Admin_Metabox { /** * Capability to check in order to display the metabox to the user * * @var string * @since 3.13.0 */ public $capability = 'view_lifterlms_reports'; /** * Configure the metabox settings * * @return void * @since 3.0.0 */ public function configure() { $this->id = 'lifterlms-students'; $this->title = __( 'Student Management', 'lifterlms' ); $this->screens = array( 'course', 'llms_membership', ); $this->priority = 'default'; } /** * Unused with our custom metabox output * * @since 3.0.0 * * @return array */ public function get_fields() { return array(); } /** * Custom metabox output function * * @return void * @since 3.0.0 * @version 3.4.0 */ public function output() { $screen = get_current_screen(); if ( 'add' === $screen->action ) { _e( 'You must publish this post before you can manage students.', 'lifterlms' ); } else { global $post; llms_get_template( 'admin/post-types/students.php', array( 'post_id' => $post->ID, ) ); } } }
Expand full source code Collapse full source code View on GitHub
Methods Methods
- configure — Configure the metabox settings
- get_fields — Unused with our custom metabox output
- output — Custom metabox output function
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |