Beispiel #1
0
 /**
  * Constructor
  * Register Taxonomy. See documentation in Taxonomy_Core, and in wp-includes/taxonomy.php
  *
  * @since 0.1.0
  * @param  object $sermons GCS_Sermons object.
  * @return void
  */
 public function __construct($sermons)
 {
     parent::__construct($sermons, array('labels' => array(__('Tag', 'gc-sermons'), __('Tags', 'gc-sermons'), 'gcs-tag'), 'args' => array('hierarchical' => false, 'rewrite' => array('slug' => 'sermon-tag'))));
 }
Beispiel #2
0
 /**
  * Constructor
  * Register Taxonomy. See documentation in Taxonomy_Core, and in wp-includes/taxonomy.php
  *
  * @since 0.1.0
  * @param  object $sermons GCS_Sermons object.
  * @return void
  */
 public function __construct($sermons)
 {
     parent::__construct($sermons, array('labels' => array(__('Topic', 'gc-sermons'), __('Topics', 'gc-sermons'), 'gcs-topic'), 'args' => array('rewrite' => array('slug' => 'sermon-topic'))));
 }
 /**
  * Constructor
  * Register Taxonomy. See documentation in Taxonomy_Core, and in wp-includes/taxonomy.php
  *
  * @since 0.1.3
  * @param  object $sermons GCS_Sermons object.
  * @return void
  */
 public function __construct($sermons)
 {
     parent::__construct($sermons, array('labels' => array(__('Scripture Reference', 'gc-sermons'), __('Scripture References', 'gc-sermons'), 'gcs-scripture'), 'args' => array('rewrite' => array('slug' => 'scripture-reference'))));
 }
 /**
  * Constructor
  * Register Taxonomy. See documentation in Taxonomy_Core, and in wp-includes/taxonomy.php
  *
  * @since 0.1.0
  * @param  object $sermons GCS_Sermons object.
  * @return void
  */
 public function __construct($sermons)
 {
     parent::__construct($sermons, array('labels' => array(__('Sermon Series', 'gc-sermons'), __('Sermon Series', 'gc-sermons'), 'gc-sermon-series'), 'args' => array('hierarchical' => false, 'show_admin_column' => false, 'rewrite' => array('slug' => 'sermon-series'))));
 }
 /**
  * Sets extra term data on the the term object, including the image and connected user object.
  *
  * @since  0.1.1
  *
  * @param  WP_Term $term Term object
  * @param  array   $args Array of arguments.
  *
  * @return WP_Term|false
  */
 protected function extra_term_data($term, $args)
 {
     $term->connected_user = $term->connected_staff = null;
     $term->nickname = '';
     if (function_exists('gc_staff')) {
         if ($connected_staff_id = get_term_meta($term->term_id, 'gc_sermon_speaker_connected_staff', 1)) {
             $term = $this->add_image($term, $args['image_size']);
             $term = $this->augment_speaker_info_with_staff_info($term, $connected_staff_id, $args);
         }
     } else {
         if (($connected_user = get_term_meta($term->term_id, 'gc_sermon_speaker_connected_user', 1)) && isset($connected_user['id'])) {
             $term = $this->augment_speaker_info($term, $connected_user['id'], $args);
             $term = $this->maybe_use_avatar($term, $args);
         }
     }
     // If not connected user, do the default setting
     if (!$term->connected_user || !$term->connected_staff || !isset($term->image_url)) {
         $term = parent::extra_term_data($term, $args);
     }
     return $term;
 }