LLMS_Admin_Metabox::__construct()

Constructor.


Description Description

Configure the metabox and automatically add required actions.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.admin.metabox.php

	private $_saved;

	/**
	 * Constructor.
	 *
	 * Configure the metabox and automatically add required actions.
	 *
	 * @since 3.0.0
	 * @since 3.37.12 Use `$this->error_opt_key()` in favor of hardcoded option name.
	 *
	 * @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' ) );


Top ↑

Changelog Changelog

Changelog
Version Description
3.37.12 Use $this->error_opt_key() in favor of hardcoded option name.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.