Example #1
0
 /**
  */
 protected function init()
 {
     // run parent
     parent::init();
     // init directives
     $this->title = __('Background Image', infinity_text_domain);
     $this->description = __('Upload an image to use as the background', infinity_text_domain);
     $this->documentation = 'options/uploader';
     $this->style_property = 'background-image';
 }
Example #2
0
 /**
  * Actions to run one time
  */
 protected function init_once()
 {
     // check once var
     if (false == self::$once) {
         // set once to true
         self::$once = true;
         // rare case of needing to exec actions outside of our admin page
         add_action('media_upload_tabs', array($this, 'media_upload_tabs'), 99);
         add_action('admin_enqueue_scripts', array($this, 'media_upload_script'));
     }
 }
Example #3
0
 /**
  */
 public function init_styles()
 {
     parent::init_styles();
     // add dynamic styles callback
     $this->style()->cache('remove-image', 'bg_image_override');
 }