Changeset 853658
- Timestamp:
- 02/08/2014 11:00:30 AM (12 years ago)
- Location:
- add-sub-posts/trunk
- Files:
-
- 2 edited
-
inital.php (modified) (2 diffs)
-
redme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
add-sub-posts/trunk/inital.php
r853645 r853658 83 83 add_action('init', 'post_type_tabs_children'); 84 84 85 86 function add_project_taxonomies() { 87 88 // POST TYPE POST, SPEAKERS 89 register_taxonomy('project_category', 'project', array( 90 'hierarchical' => true, 91 'labels' => array( 'name' => _x( 'Project Categories', 'taxonomy general name') ), 92 'singular_name' => _x( 'Project Categories', 'taxonomy singular name'), 93 'search_items' => __( 'Search Project Categories' ), 94 'all_items' => __( 'All Project Categories'), 95 'parent_item' => __( 'Parent Project Category' ), 96 'parent_item_colon' => __( 'Parent Project Category'), 97 'edit_item' => __( 'Edit Project Category'), 98 'update_item' => __( 'Update Project Category' ), 99 'add_new_item' => __( 'Add New Project Categories'), 100 'new_item_name' => __( 'New Project Category'), 101 'menu_name' => __( 'Project Categories'), 102 'rewrite' => array( 'slug' => 'project-category','with_front' => false, 'hierarchical' => true ), 103 )); 104 105 } 106 add_action( 'init', 'add_project_taxonomies', 0 ); 85 function people_init() { 86 // create a new taxonomy 87 88 89 // Add new taxonomy, NOT hierarchical (like tags) 90 $labels = array( 91 'name' => _x( 'Project Categories', 'taxonomy general name' ), 92 'singular_name' => _x( 'Project Category', 'taxonomy singular name' ), 93 'search_items' => __( 'Search Project Categories' ), 94 'popular_items' => __( 'Popular Project Categories' ), 95 'all_items' => __( 'All Project Categories' ), 96 'parent_item' => null, 97 'parent_item_colon' => null, 98 'edit_item' => __( 'Edit Project Category' ), 99 'update_item' => __( 'Update Project Category' ), 100 'add_new_item' => __( 'Add New Project Category' ), 101 'new_item_name' => __( 'New Project Category' ), 102 'separate_items_with_commas' => __( 'Separate Project Categories with commas' ), 103 'add_or_remove_items' => __( 'Add or remove Project Categories' ), 104 'choose_from_most_used' => __( 'Choose from the most used Project Categories' ), 105 'not_found' => __( 'No Project Category found.' ), 106 'menu_name' => __( 'Project Categories' ), 107 ); 108 109 $args = array( 110 'hierarchical' => true, 111 'labels' => $labels, 112 'show_ui' => true, 113 'show_admin_column' => true, 114 'update_count_callback' => '_update_post_term_count', 115 'query_var' => true, 116 'rewrite' => array( 'slug' => 'project-category' ), 117 ); 118 119 register_taxonomy( 'project_category', 'project', $args ); 120 } 121 add_action( 'init', 'people_init' ); 107 122 // Remove the children menu item as it will be managed under the parent item. 108 123 function remove_tabs_children_menu() { … … 149 164 150 165 151 // Include custom single template file for parent post type152 // Thanks to http://www.unfocus.com/2010/08/10/including-page-templates-from-a-wordpress-plugin/153 166 154 167 function locate_plugin_template_tabs($template_names, $load = false, $require_once = true ) -
add-sub-posts/trunk/redme.txt
r853651 r853658 1 1 === add-sub-posts === 2 2 Contributors: saju79shyni 3 Tags: wordpress, sql 3 Tags: wordpress, sql, 4 4 Requires at least: 3.5.1 5 5 Tested up to: 3.8.1 6 Stable tag: 2.0 6 Stable tag: 2.0.1 7 7 8 8 Add sub post is a plugin that allows you to easily add childern posts to created Custom_post_type 'project'.
Note: See TracChangeset
for help on using the changeset viewer.