/** * Primary class constructor. * * @since 1.0.0 */ public function __construct() { // Load the base class object. $this->base = Soliloquy_Lite::get_instance(); $this->common = Soliloquy_Common_Admin_Lite::get_instance(); // Load metabox assets. add_action('admin_enqueue_scripts', array($this, 'meta_box_styles')); add_action('admin_enqueue_scripts', array($this, 'meta_box_scripts')); // Load the metabox hooks and filters. add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 100); // Modals //add_filter( 'media_view_strings', array( $this, 'media_view_strings' ) ); // Load all tabs. add_action('soliloquy_tab_slider', array($this, 'images_tab')); add_action('soliloquy_tab_config', array($this, 'config_tab')); add_action('soliloquy_tab_misc', array($this, 'misc_tab')); add_action('soliloquy_tab_mobile_lite', array($this, 'mobile_lite_tab')); add_action('soliloquy_tab_lightbox_lite', array($this, 'lightbox_lite_tab')); add_action('soliloquy_tab_pinterest_lite', array($this, 'pinterest_lite_tab')); add_action('soliloquy_tab_schedule_lite', array($this, 'schedule_lite_tab')); add_action('soliloquy_tab_carousel_lite', array($this, 'carousel_lite_tab')); add_action('soliloquy_tab_thumbnails_lite', array($this, 'thumbnails_lite_tab')); // Add action to save metabox config options. add_action('save_post', array($this, 'save_meta_boxes'), 10, 2); }
public function __construct() { // Load the base class object. $this->base = Soliloquy_Lite::get_instance(); $this->common = Soliloquy_Common_Admin_Lite::get_instance(); // Add custom settings submenu. add_action('admin_menu', array($this, 'admin_menu')); }
/** * Returns the singleton instance of the class. * * @since 1.0.0 * * @return object The Soliloquy_Common_Admin_Lite object. */ public static function get_instance() { if (!isset(self::$instance) && !self::$instance instanceof Soliloquy_Common_Admin_Lite) { self::$instance = new Soliloquy_Common_Admin_Lite(); } return self::$instance; }
<?php $common = Soliloquy_Common_Admin_Lite::get_instance(); $upgrade_link = $common->get_upgrade_link(); ?> <div id="soliloquy-uploader"> <div id="soliloquy-slider-type-tabs"> <a data-soliloquy-tab class="soliloquy-type-tab soliloquy-icon-soliloquy <?php echo $data['instance']->get_config('type', $data['instance']->get_config_default('type')) === 'default' ? ' soliloquy-tab-nav-active' : ''; ?> " href="#" data-tab-id="soliloquy-native"> <input id="soliloquy-type-default" type="radio" name="_soliloquy[type]" value="default" <?php checked($data['instance']->get_config('type', $data['instance']->get_config_default('type')), 'default'); ?> /> <?php _e('Native Slider', 'soliloquy'); ?> </a> <a data-soliloquy-tab class="soliloquy-type-tab <?php echo $data['instance']->get_config('type', $data['instance']->get_config_default('type')) != 'default' ? ' soliloquy-tab-nav-active' : ''; ?> " href="#" data-tab-id="soliloquy-external"><?php _e('External Slider', 'soliloquy'); ?> </a> </div>