/**
 * Gets the "category" taxonomy init arguments
 *
 * @package WP Idea Stream
 * @subpackage core/functions
 *
 * @since 2.0.0
 *
 * @uses   wp_idea_stream_category_slug() can be customized through plugin's settings
 * @uses   wp_idea_stream_get_category_caps()
 * @uses   wp_idea_stream_get_category() to get the category identifier and set the query var
 * @uses   apply_filters() call 'wp_idea_stream_category_register_args' to customize category arguments
 * @return array taxonomy init arguments
 */
function wp_idea_stream_category_register_args()
{
    return apply_filters('wp_idea_stream_category_register_args', array('rewrite' => array('slug' => wp_idea_stream_category_slug(), 'with_front' => false, 'hierarchical' => false), 'capabilities' => wp_idea_stream_get_category_caps(), 'update_count_callback' => '_update_post_term_count', 'query_var' => wp_idea_stream_get_category(), 'hierarchical' => true, 'show_in_nav_menus' => false, 'public' => true, 'show_tagcloud' => false));
}
Example #2
0
 /**
  * Loop temporary filter: set pagination base
  *
  * @package WP Idea Stream
  * @subpackage buddypress/groups
  *
  * @since  2.0.0
  *
  * @param  array  $pagination_args the default paginate arguments
  * @uses   bp_is_group()  to check a group is displayed
  * @uses   wp_idea_stream_tag_get_slug() to get the ideas tag taxonomy slug
  * @uses   wp_idea_stream_category_get_slug() to get the ideas category taxonomy slug
  * @uses   WP_Idea_Stream_Group->group_ideas_archive_url() to get the group's IdeaStream archive page
  * @return array                   the paginate arguments adapted to group's context
  */
 public function set_pagination_base($pagination_args = '')
 {
     if (!bp_is_group()) {
         return $pagination_args;
     }
     // Initialize base
     $base = '';
     switch ($this->group_ideastream->is_action) {
         case wp_idea_stream_category_slug():
         case wp_idea_stream_tag_get_slug():
             $base = trailingslashit($this->group_ideas_archive_url() . '/' . $this->group_ideastream->is_action . '/' . $this->group_ideastream->current_term->slug);
             break;
         default:
             $base = trailingslashit($this->group_ideas_archive_url());
             break;
     }
     $pagination_args['base'] = $base . '%_%';
     return $pagination_args;
 }