* @copyright (c) 2013, OnePress Ltd * * @package core * @since 1.0.0 */ /** * The class to show info on how the plugin support is provided. * * @since 1.0.0 */ class OPanda_ManualLockingMetaBox extends FactoryMetaboxes321_Metabox { /** * A visible title of the metabox. * * Inherited from the class FactoryMetabox. * @link http://codex.wordpress.org/Function_Reference/add_meta_box * * @since 1.0.0 * @var string */ public $title; /** * The priority within the context where the boxes should show ('high', 'core', 'default' or 'low'). * * @link http://codex.wordpress.org/Function_Reference/add_meta_box * Inherited from the class FactoryMetabox. * * @since 1.0.0 * @var string */ public $priority = 'core'; /** * The part of the page where the edit screen section should be shown ('normal', 'advanced', or 'side'). * * @link http://codex.wordpress.org/Function_Reference/add_meta_box * Inherited from the class FactoryMetabox. * * @since 1.0.0 * @var string */ public $context = 'side'; public function __construct( $plugin ) { parent::__construct( $plugin ); $this->title = __('Manual Locking (recommended)', 'bizpanda'); } public function configure( $scripts, $styles ){ $scripts->add( OPANDA_BIZPANDA_URL . '/assets/admin/js/metaboxes/manual-lock.010000.js'); } /** * Renders content of the metabox. * * @see FactoryMetaboxes321_Metabox * @since 1.0.0 * * @return void */ public function html() { global $post; $isSystem = get_post_meta( $post->ID, 'opanda_is_system', true); $item = OPanda_Items::getCurrentItem(); $shortcodeName = $item['shortcode']; $shortcode = '[' . $shortcodeName . '] [/' . $shortcodeName . ']'; if (!$isSystem) $shortcode = '[' . $shortcodeName . ' id="' . $post->ID . '"] [/' . $shortcodeName . ']'; ?>