예제 #1
0
 /**
  * Add the post type
  * 
  * @since 1.0.0
  */
 public function add_post_type()
 {
     $args = array('settings' => array(array('name' => __('Receiver(s)', 'yit'), 'id' => 'to', 'type' => 'text', 'std' => '*****@*****.**', 'desc' => 'Define the emails used (separeted by comma) to receive emails.'), array('name' => __('Sender Email', 'yit'), 'id' => 'from', 'type' => 'text', 'std' => '*****@*****.**', 'desc' => 'Define from what email send the message.'), array('name' => __('Sender Name', 'yit'), 'id' => 'from_name', 'type' => 'text', 'std' => 'Admin', 'desc' => 'Define the name of email that send the message.'), array('name' => __('Subject', 'yit'), 'id' => 'subject', 'type' => 'text', 'std' => '', 'desc' => 'Define the subject of the email sent to you.'), array('name' => __('Body', 'yit'), 'id' => 'body', 'type' => 'textarea', 'std' => '%message%  <small><i>This email is been sent by %name% (email. %email%).</i></small>', 'desc' => 'Define the body of the email sent to you.'), array('name' => __('Submit Button Label', 'yit'), 'id' => 'submit_label', 'type' => 'text', 'std' => 'Send Message', 'desc' => 'Define the label of submit button.'), array('name' => __('Submit Button Alignment', 'yit'), 'id' => 'submit_alignment', 'type' => 'select', 'options' => array('alignleft' => 'left', 'aligncenter' => 'center', 'alignright' => 'right'), 'desc' => 'Set the alignment of submit button.'), array('name' => __('Success Message', 'yit'), 'id' => 'success_sending', 'type' => 'text', 'std' => 'Email sent correctly!', 'desc' => 'Define the message when there is an error on send of email.'), array('name' => __('Error Message', 'yit'), 'id' => 'error_sending', 'type' => 'text', 'std' => 'An error has been encountered. Please try again.', 'desc' => 'Define the message when there is an error on send of email.'), array('type' => 'sep'), array('desc' => __('Publish the contact form to configure it.', 'yit'), 'type' => 'simple-text', 'only__not_saved' => true)), 'settings_items_file' => 'settings-contactform.php', 'labels' => array('singular_name' => __('Contact Form', 'yit'), 'plural_name' => __('Contact Forms', 'yit'), 'item_name_sing' => __('Form', 'yit'), 'item_name_plur' => __('Forms', 'yit')), 'publicly_queryable' => false, 'icon_menu' => YIT_CORE_ASSETS_URL . '/images/menu/contact.png');
     // add the post type for the slider
     $this->_theContactFormObj = yit_add_unlimited_post_type('contactform', $args);
     // change the columns of the tables
     add_action('manage_contactform_posts_custom_column', array(&$this, 'custom_columns'));
     add_filter('manage_edit-contactform_columns', array(&$this, 'edit_columns'));
 }
예제 #2
0
 /**
  * Add the post type
  * 
  * @since 1.0.0
  */
 public function add_post_type()
 {
     $args = array('settings' => array(array('name' => __('Slider Type', 'yit'), 'id' => 'slider_type', 'type' => 'select', 'options' => $this->_sliderTypes, 'std' => '', 'desc' => 'Select the slider type.'), array('type' => 'sep'), array('desc' => __('Publish the slider to configure it.', 'yit'), 'type' => 'simple-text', 'only__not_saved' => true)), 'settings_item' => 'title, subtitle, link, content', 'use_typography' => true, 'labels' => array('singular_name' => __('Slider', 'yit'), 'plural_name' => __('Sliders', 'yit'), 'item_name_sing' => __('Slide', 'yit'), 'item_name_plur' => __('Slides', 'yit')), 'publicly_queryable' => false, 'icon_menu' => YIT_CORE_ASSETS_URL . '/images/menu/sliders.png');
     // add the slider configuration, as defined by another method
     $args['settings'] = array_merge($args['settings'], $this->_sliderConfigs);
     // add the slide supports
     $args['settings_item'] = empty($this->_slideSupports) ? $args['settings_item'] : $this->_slideSupports;
     // add other options for the slide configuration
     if (!empty($this->_slideCustomSupports)) {
         $args['settings_item_custom'] = $this->_slideCustomSupports;
     }
     // add the options for the typography tab
     $args['typography_options'] = $this->_slideTypography;
     // add the post type for the slider
     $this->_theSliderObj = yit_add_unlimited_post_type('sliders', $args);
     // change the columns of the tables
     add_action('manage_sliders_posts_custom_column', array(&$this, 'custom_columns'));
     add_filter('manage_edit-sliders_columns', array(&$this, 'edit_columns'));
 }
예제 #3
0
 /**
  * Add the post type
  * 
  * @since 1.0.0
  */
 public function add_post_type()
 {
     $args = array('settings' => array(array('type' => 'sep'), array('desc' => __('Publish the features tab to configure it.', 'yit'), 'type' => 'simple-text', 'only__not_saved' => true)), 'settings_items_file' => 'settings-featurestab.php', 'labels' => array('singular_name' => __('Features Tab', 'yit'), 'plural_name' => __('Features Tabs', 'yit'), 'item_name_sing' => __('Feature', 'yit'), 'item_name_plur' => __('Features', 'yit')), 'publicly_queryable' => false, 'icon_menu' => YIT_CORE_ASSETS_URL . '/images/menu/featurestab.png');
     // add the post type for the slider
     $this->_theFeaturesTabObj = yit_add_unlimited_post_type('featurestab', $args);
     // change the columns of the tables
     add_action('manage_featurestab_posts_custom_column', array(&$this, 'custom_columns'));
     add_filter('manage_edit-featurestab_columns', array(&$this, 'edit_columns'));
 }
예제 #4
0
 /**
  * Add the post type
  * 
  * @since 1.0.0
  */
 public function add_post_type()
 {
     $args = apply_filters('yit_portfolio_type_args_' . $this->_portfolioTypeName, array());
     // add the slider configuration, as defined by another method
     $args['settings'] = array_merge($args['settings'], $this->_portfolioConfigs);
     // add the slide supports
     $args['settings_item'] = empty($this->_portfolioSupports) ? $args['settings_item'] : $this->_portfolioSupports;
     // add the post type for the slider
     $this->_thePortfolioObj = yit_add_unlimited_post_type($this->_portfolioTypeName, $args);
     // change the columns of the tables
     add_action('manage_' . $this->_portfolioTypeName . '_posts_custom_column', array(&$this, 'custom_columns'));
     add_filter('manage_edit-' . $this->_portfolioTypeName . '_columns', array(&$this, 'edit_columns'));
 }