示例#1
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Gallery'));
     $upload = new Upload('image');
     $upload->setLabel(Translate::translate('Image'));
     $this->addControl($upload);
 }
示例#2
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Attachments'));
     $upload = new Upload('attachment');
     $upload->setLabel(Translate::translate('File'));
     $this->addControl($upload);
 }
示例#3
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setRepeating(true);
     $this->setSortable(true);
     $this->setLabel(Translate::translate('Video'));
     $url = new Text('url');
     $url->setLabel(Translate::translate('URL'))->setValidation('url');
     $this->addControl($url);
     $name = new Text('name');
     $name->setLabel(Translate::translate('Name'));
     $this->addControl($name);
 }
示例#4
0
 /**
  * Class constructor setup control group
  *
  * @param string $name
  * @access public
  */
 public function __construct($name = 'post_format')
 {
     parent::__construct($name);
     $this->setLabel(Translate::translate('Post format'));
     /*TODO implement dependency
     		$format = new Select( 'format' );
     		$format->setLabel( Translate::translate( 'Post format' ) );
     		$format->setOptions(
     			array(
     				array(
     					'label' => Translate::translate( 'Standard' ),
     					'value' => false,
     				),
     				array(
     					'label' => Translate::translate( 'Video' ),
     					'value' => 'video',
     				),
     				array(
     					'label' => Translate::translate( 'Gallery' ),
     					'value' => 'gallery',
     				),
     				array(
     					'label' => Translate::translate( 'Audio' ),
     					'value' => 'audio',
     				),
     			)
     		);
     		$this->addControl( $format );
     		*/
     $group = new Group('video');
     $group->setLabel(Translate::translate('Video'));
     $url = new Text('url');
     $url->setLabel(Translate::translate('YouTube or Vimeo file URL'));
     $url->setValidation('url');
     //			$url->setDependency($format, 'silverwp_post_format_dep_boolean', 'video');
     $group->addControl($url);
     $this->addControl($group);
     $group = new Gallery('gallery');
     $group->setLabel(Translate::translate('Gallery'));
     $this->addControl($group);
     $group = new Group('audio');
     $group->setLabel(Translate::translate('Audio'));
     $audio = new Text('url');
     $audio->setLabel(Translate::translate('SoundCloud audio URL'));
     $audio->setValidation('url');
     //$audio->setDependency($format, 'silverwp_post_format_dep_boolean', 'audio');
     $group->addControl($audio);
     $this->addControl($group);
 }
示例#5
0
 /**
  * Class constructor
  *
  * @param string $name
  *
  * @access public
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setSortable(true);
     $this->setRepeating(true);
     //set up default configuration
     $this->setLabel(Translate::translate('Social Accounts'));
     $name = new Text('name');
     $name->setLabel('Name');
     $this->addControl($name);
     $url = new Text('url');
     $url->setLabel('URL')->setValidation('url');
     $this->addControl($url);
     $icon = new Fontello('icon');
     $icon->setLabel(Translate::translate('Icon'));
     $this->addControl($icon);
 }