コード例 #1
0
ファイル: Team.php プロジェクト: padalec/silverwp-addons
 protected function setUp()
 {
     $this->setEnterTitleHearLabel(Translate::translate('Name and last name'));
     $text = new Text('email');
     $text->setLabel(Translate::translate('E-mail'));
     $text->setValidation('email');
     $this->addControl($text);
     $text = new Text('affiliation');
     $text->setLabel(Translate::translate('Affiliation'));
     $this->addControl($text);
     $text_area = new Textarea('contact');
     $text_area->setLabel(Translate::translate('Contact'));
     $this->addControl($text_area);
     $checkbox = new Checkbox('show_in_team_page');
     $checkbox->setLabel(Translate::translate('Show in Team page'));
     $this->addFilterControl($checkbox);
     $interests = new Textarea('interests');
     $interests->setLabel(Translate::translate('Interests'));
     $this->addControl($interests);
     $attachment = new Upload('attachment');
     $attachment->setLabel(Translate::translate('Curriculum Vitae'));
     $this->addControl($attachment);
     $iamge = new Upload('image');
     $iamge->setLabel(Translate::translate('Picture with smile'));
     $this->addControl($iamge);
 }
コード例 #2
0
ファイル: Research.php プロジェクト: padalec/silverwp-addons
 protected function setUp()
 {
     $realization_time = new Text('realization_time');
     $realization_time->setLabel(Translate::translate('Realization time'));
     $this->addControl($realization_time);
     $partners = new Wpeditor('partners');
     $partners->setLabel(Translate::translate('Partners'));
     $this->addControl($partners);
     $contact = new Textarea('contact');
     $contact->setLabel(Translate::translate('Contact'));
     $this->addControl($contact);
     $external_url = new Text('external_url');
     $external_url->setLabel(Translate::translate('External URL'));
     $external_url->setValidation('url');
     $this->addControl($external_url);
     $group = new Group('persons');
     $group->setLabel(Translate::translate('Persons engage in project'));
     $group->setSortable(true);
     $group->setRepeating(true);
     $label = new Text('label');
     $label->setLabel(Translate::translate('Label'));
     $group->addControl($label);
     $name = new Text('person');
     $name->setLabel(Translate::translate('Person'));
     $group->addControl($name);
     $this->addControl($group);
     $attachments = new Attachments('attachments');
     $this->addControl($attachments);
 }
コード例 #3
0
 protected function setUp()
 {
     $this->setEnterTitleHearLabel(Translate::translate('Name'));
     $lead = new Textarea('lead');
     $lead->setLabel(Translate::translate('Lead'));
     $this->addControl($lead);
     $keywords = new Text('keywords');
     $keywords->setLabel(Translate::translate('Keywords'));
     $this->addControl($keywords);
     $abstract = new Textarea('abstract');
     $abstract->setLabel(Translate::translate('Abstract'));
     $this->addControl($abstract);
     $text_area = new Textarea('additional_information');
     $text_area->setLabel(Translate::translate('Additional information'));
     $this->addControl($text_area);
     $select = new Select('publication_year');
     $select->setLabel(Translate::translate('Publication year'));
     $select->setStart(2005);
     $select->setEnd(date('Y'));
     $this->addFilterControl($select);
     $checkbox = new Checkbox('language');
     $checkbox->setLabel(Translate::translate('Publication language'));
     $checkbox->setOptions(array(array('label' => Translate::translate('polish'), 'value' => 'pl'), array('label' => Translate::translate('english'), 'value' => 'en')));
     $this->addFilterControl($checkbox);
     $attachment = new Upload('attachment');
     $attachment->setLabel(Translate::translate('Main file'));
     $this->addControl($attachment);
     $attachments = new Attachments('attachments');
     $this->addControl($attachments);
     $cover = new Upload('cover');
     $cover->setLabel(Translate::translate('Cover'));
     $this->addControl($cover);
 }
コード例 #4
0
ファイル: Authors.php プロジェクト: padalec/silverwp-addons
 protected function setUp()
 {
     $this->setEnterTitleHearLabel(Translate::translate('Name and last name'));
     $text_area = new Textarea('affiliation');
     $text_area->setLabel(Translate::translate('Affiliation'));
     $this->addControl($text_area);
     $text = new Text('email');
     $text->setLabel(Translate::translate('E-mail'));
     $text->setValidation('email');
     $this->addControl($text);
 }
コード例 #5
0
ファイル: Page.php プロジェクト: padalec/silverwp-addons
 protected function setUp()
 {
     $about = new Textarea('about');
     $about->setLabel(Translate::translate('About'));
     $this->addControl($about);
     $title = new Text('title');
     $title->setLabel(Translate::translate('Title'));
     $this->addControl($title);
     $attachments = new Attachments('attachments');
     $attachments->setLabel(Translate::translate('Attachments'));
     $this->addControl($attachments);
 }
コード例 #6
0
ファイル: Video.php プロジェクト: silversite/silverwp
 /**
  * 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);
 }
コード例 #7
0
ファイル: PostFormat.php プロジェクト: silversite/silverwp
 /**
  * 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);
 }
コード例 #8
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);
 }
コード例 #9
0
ファイル: Events.php プロジェクト: padalec/silverwp-addons
 protected function setUp()
 {
     $attachments = new Attachments('attachments');
     $this->addControl($attachments);
     $checkbox = new Checkbox('main_page_promo');
     $checkbox->setLabel(Translate::translate('Promotion on main page'));
     $this->addControl($checkbox);
     $place = new Text('place');
     $place->setLabel(Translate::translate('Place'));
     $this->addControl($place);
     $address = new Text('address');
     $address->setLabel(Translate::translate('Event address'));
     $this->addControl($address);
     $program = new Group('program');
     $program->setLabel(Translate::translate('Program'));
     $program->setRepeating(true);
     $program->setSortable(true);
     $label = new Text('title');
     $label->setLabel(Translate::translate('Title'));
     $program->addControl($label);
     $description = new Wpeditor('description');
     $description->setLabel(Translate::translate('Description'));
     $program->addControl($description);
     $this->addControl($program);
     $start = new Group('start');
     $start->setLabel(Translate::translate('Start'));
     $date = new Date('date_start');
     $date->setLabel(Translate::translate('Date start'));
     $start->addControl($date);
     $time = new Text('time_start');
     $time->setLabel(Translate::translate('Time start'));
     $start->addControl($time);
     $this->addControl($start);
     $end = new Group('end');
     $end->setLabel(Translate::translate('End'));
     $date = new Date('date_end');
     $date->setLabel(Translate::translate('Date end'));
     $end->addControl($date);
     $time = new Text('time_end');
     $time->setLabel(Translate::translate('Time end'));
     $end->addControl($time);
     $this->addControl($end);
 }
コード例 #10
0
ファイル: ThemeUpdate.php プロジェクト: silversite/silverwp
 /**
  *
  * Create menu
  *
  * @access protected
  * @return void
  */
 protected function createMenu()
 {
     $this->setName('theme_update');
     $this->setLabel(Translate::translate('Theme update'));
     $this->setIcon('font-awesome:fa-home');
     $section = new Section('theme_api');
     $note_box = new Notebox('note_box');
     $note_box->setLabel(Translate::translate('Update your Theme from the WordPress Dashboard'));
     $note_box->setDescription(Translate::translate('If you want to get update notifications for your themes and if you want to be able to update your theme from your WordPress backend you need to enter your Themeforest account name as well as your Themeforest Secret API Key below:'));
     $section->addControl($note_box);
     $user_name = new Text('tf_user_name');
     $user_name->setLabel(Translate::translate('Your Themeforest User Name'));
     $user_name->setDescription(Translate::translate('Enter the Name of the User you used to purchase this theme'));
     $section->addControl($user_name);
     $api_key = new Text('tf_api_key');
     $api_key->setLabel(Translate::translate('Your Themeforest API Key'));
     $api_key->setDescription(Translate::translate('Enter the API Key of your Account here. <a href="">You can find your API Key here</a>'));
     $section->addControl($api_key);
     $this->addControl($section);
 }