Develop Additional Taxonomies into ItemPress
-
ItemPress supports Labels and Associations out-of-the-box, but supports the ability to add additional taxonomies. This can easily be done as a plugin.
The following example shows how to add a “Status” taxonomy to ItemPress using the
itempress_add_tax_status
hook.<?php /** * Plugin Name: ItemPress Status Labels * Plugin URI: https://bitbucket.org/aubreypwd/itempress-status * Description: Adds status labels to items * Version: 0.1 * Author: Aubrey Portwood * Author URI: https://aubreypwd.com * License: GPL2 * Tags: projects, project, management, notes, remembering, tasks, bugs, issue, tracker */ /* Copyright 2013 Aubrey Portwood (email : [email protected]) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ add_action('itempress_add_tax','itempress_add_tax_status'); function itempress_add_tax_status(){ global $itempress_tax; $itempress_tax->add_tax(array( 'taxonomy'=>'item_status', 'args'=>array( 'label' =>'Statuses', 'rewrite' =>array( 'slug' => 'item-status' ), 'capabilities' =>array( 'assign_terms' => 'edit_posts', 'edit_terms' => 'edit_posts' ), 'show_in_nav_menus'=>true, 'hierarchical'=>true, 'show_admin_column'=>true, 'labels'=> array( 'name' => 'Statuses', 'singular_name' => 'Status', 'search_items' => 'Search Statuses', 'all_items' => 'All Statuses', 'parent_item' => 'Parent Statuses', 'parent_item_colon' => 'Parent Status:', 'edit_item' => 'Edit Status', 'update_item' => 'Update Status', 'add_new_item' => 'Add New Status', 'new_item_name' => 'New Status', 'menu_name' => 'Statuses', 'meta_name' => 'Status' ) ) )); } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Develop Additional Taxonomies into ItemPress’ is closed to new replies.