LLMS_Admin_Metabox::__construct()
Constructor.
Description Description
Configure the metabox and automatically add required actions.
Return Return
(void)
Source Source
File: includes/abstracts/abstract.llms.admin.metabox.php
* * @return void */ public function __construct() { // Allow child classes to configure variables. $this->configure(); // Set the error option key. $this->error_opt_key = sprintf( 'lifterlms_metabox_errors%s', $this->id ); // Register the metabox. add_action( 'add_meta_boxes', array( $this, 'register' ) ); // Register save actions for applicable screens (post types). foreach ( $this->get_screens() as $screen ) { add_action( 'save_post_' . $screen, array( $this, 'save_actions' ), 10, 1 ); } // Display errors. add_action( 'admin_notices', array( $this, 'output_errors' ) ); // Save errors.
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.37.12 | Use $this->error_opt_key() in favor of hardcoded option name. |
3.0.0 | Introduced. |