Custom Post Type UI - Version 0.7.1.0

Version Description

= 0.7.1 = * XSS security bug patched

= 0.7 = * WordPress 3.1 support * Added has_archive and show_in_menu support * Added label for custom menu name * Updated plugin UI to be consistent with WordPress styles * Added "Get Code" feature to easily copy code used for post types and taxonomies (BETA)

= 0.6.2 = * Added support for assigning custom taxonomies to post types when creating/editing * Fixed bug when setting hierarchy on a post type (props @JohnPBloch) * Fixed an error when registering a post type with no supported meta boxes * Fixed "Undefined index" error when determining return URLs * Added Chinese translation

= 0.6.1 = * Added translation functionality and .pot file * Added Japanese translation * Reworked entire path structure fixing "page not found" errors * Fixed "First argument is expected to be a valid callback" error * Random bug fixes

= 0.6 = * Added support for custom labels with custom post types and taxonomies * Added ability to assign built-in taxonomies to custom post types * Added ability to assign custom taxonomies to multiple post types * Fixed jQuery conflict with other plugins (props shadyvb) * Managing post types now displays total published/draft per type * Code optimization and cleanup

= 0.5.2 = * Updated excerpts to excerpt in CPT Support field (props vlad27aug)

= 0.5.1 = * Added flush_rewrite_rules() to reset rules when using custom rewrite slugs

= 0.5 = * Fixed multiple bugs * If upgrading from pre 0.5 version you will need to recreate your custom post types

= 0.4.1 = * Fixed bug with REWRITE and QUERY_VAR values not executing correctly

= 0.4 = * Default view now hides advanced options * Get Code link to easily copy/paste code used to create custom post types and taxonomies * Added support for 'author' and 'page-attributes' in CPT Supports field

= 0.3.1 = * Fixed multiple warnings and errors

= 0.3 = * added new menu/submenus for individual sections * added support for 'title' and 'editor' in CPT Supports field * added Singular Label for custom taxonomies (props sleary)

= 0.2.1 = * Set default Query Var setting to False

= 0.2 = * Fixed the siteurl bug * Added support for creating custom taxonomies

= 0.1.2 = * Fixed a bug where default values were incorrect

= 0.1.1 = * Fixed a bunch of warnings

= 0.1 = * First beta release

Download this release

Release Info

Developer williamsba1
Plugin Icon 128x128 Custom Post Type UI
Version 0.7.1.0
Comparing to
See all releases

Code changes from version 0.7.0.0 to 0.7.1.0

Files changed (2) hide show
  1. custom-post-type-ui.php +27 -18
  2. readme.txt +9 -3
custom-post-type-ui.php CHANGED
@@ -4,12 +4,12 @@ Plugin Name: Custom Post Type UI
4
  Plugin URI: http://webdevstudios.com/support/wordpress-plugins/
5
  Description: Admin panel for creating custom post types and custom taxonomies in WordPress
6
  Author: WebDevStudios.com
7
- Version: 0.7
8
  Author URI: http://webdevstudios.com/
9
  */
10
 
11
  // Define current version constant
12
- define( 'CPT_VERSION', '0.7' );
13
 
14
  // Define plugin URL constant
15
  $CPT_URL = cpt_check_return( 'add' );
@@ -87,13 +87,22 @@ function cpt_create_custom_post_types() {
87
  $cpt_supports = ( !$cpt_post_type[0] ) ? array() : $cpt_post_type[0];
88
  //$cpt_show_in_menu = ( !$cpt_post_type["show_in_menu_string"] ) ? null : $cpt_post_type["show_in_menu_string"];
89
 
90
- $cpt_show_in_menu = ( $cpt_post_type["show_in_menu"] == 1 ) ? true : false;
91
- $cpt_show_in_menu = ( $cpt_post_type["show_in_menu_string"] ) ? $cpt_post_type["show_in_menu_string"] : $cpt_show_in_menu;
92
-
 
 
 
93
  //set custom label values
94
  $cpt_labels['name'] = $cpt_label;
95
  $cpt_labels['singular_name'] = $cpt_post_type["singular_label"];
96
- $cpt_labels['menu_name'] = ( $cpt_post_type[2]["menu_name"] ) ? $cpt_post_type[2]["menu_name"] : $cpt_label;
 
 
 
 
 
 
97
  $cpt_labels['add_new'] = ( $cpt_post_type[2]["add_new"] ) ? $cpt_post_type[2]["add_new"] : 'Add ' .$cpt_singular;
98
  $cpt_labels['add_new_item'] = ( $cpt_post_type[2]["add_new_item"] ) ? $cpt_post_type[2]["add_new_item"] : 'Add New ' .$cpt_singular;
99
  $cpt_labels['edit'] = ( $cpt_post_type[2]["edit"] ) ? $cpt_post_type[2]["edit"] : 'Edit';
@@ -110,7 +119,7 @@ function cpt_create_custom_post_types() {
110
  'public' => get_disp_boolean($cpt_post_type["public"]),
111
  'singular_label' => $cpt_post_type["singular_label"],
112
  'show_ui' => get_disp_boolean($cpt_post_type["show_ui"]),
113
- 'has_archive' => get_disp_boolean($cpt_post_type["has_archive"]),
114
  'show_in_menu' => $cpt_show_in_menu,
115
  'capability_type' => $cpt_post_type["capability_type"],
116
  'hierarchical' => get_disp_boolean($cpt_post_type["hierarchical"]),
@@ -468,7 +477,7 @@ function cpt_settings() {
468
  <a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress" target="_blank">Custom Post Types in WordPress</a>
469
  </p>
470
  <p>Q: <strong>How can I add custom meta boxes to my custom post types?</strong></p>
471
- <p>A: The Custom Field Template plugin does a great job at creating custom meta boxes and fully supports custom post types: <a href="http://wordpress.org/extend/plugins/custom-field-template/" target="_blank">http://wordpress.org/extend/plugins/custom-field-template/</a></p>
472
  <p>Q: <strong>I changed my custom post type name and now I can't get to my posts</strong></p>
473
  <p>A: You can either change the custom post type name back to the original name or try the Post Type Switcher plugin: <a href="http://wordpress.org/extend/plugins/post-type-switcher/" target="_blank">http://wordpress.org/extend/plugins/post-type-switcher/</a></p>
474
  <h3><?php _e('Slightly Outdated Demo Video', 'cpt-plugin'); ?></h3>
@@ -939,9 +948,9 @@ If (isset($_GET['edittype']) && !isset($_GET['cpt_edit'])) {
939
  $cpt_supports = $cpt_options[$editType][0];
940
  $cpt_taxes = $cpt_options[$editType][1];
941
  $cpt_labels = $cpt_options[$editType][2];
942
- $cpt_has_archive = $cpt_options[$editType]["has_archive"];
943
- $cpt_show_in_menu = $cpt_options[$editType]["show_in_menu"];
944
- $cpt_show_in_menu_string = $cpt_options[$editType]["show_in_menu_string"];
945
 
946
  $cpt_submit_name = 'Save Custom Post Type';
947
  }Else{
@@ -1455,14 +1464,14 @@ function cpt_footer() {
1455
  function cpt_check_return($return) {
1456
  global $CPT_URL;
1457
 
1458
- If($return=='cpt') {
1459
- return ( isset( $_GET['return'] ) ) ? admin_url('admin.php?page=cpt_sub_manage_cpt&return='.$_GET['return']) : admin_url('admin.php?page=cpt_sub_manage_cpt');
1460
- }Elseif($return=='tax'){
1461
- return ( isset( $_GET['return'] ) ) ? admin_url('admin.php?page=cpt_sub_manage_taxonomies&return='.$_GET['return']) : admin_url('admin.php?page=cpt_sub_manage_taxonomies');
1462
- }Elseif($return=='add') {
1463
- return admin_url('admin.php?page=cpt_sub_add_new');
1464
  }Else{
1465
- return admin_url('admin.php?page=cpt_sub_add_new');
1466
  }
1467
  }
1468
 
4
  Plugin URI: http://webdevstudios.com/support/wordpress-plugins/
5
  Description: Admin panel for creating custom post types and custom taxonomies in WordPress
6
  Author: WebDevStudios.com
7
+ Version: 0.7.1
8
  Author URI: http://webdevstudios.com/
9
  */
10
 
11
  // Define current version constant
12
+ define( 'CPT_VERSION', '0.7.1' );
13
 
14
  // Define plugin URL constant
15
  $CPT_URL = cpt_check_return( 'add' );
87
  $cpt_supports = ( !$cpt_post_type[0] ) ? array() : $cpt_post_type[0];
88
  //$cpt_show_in_menu = ( !$cpt_post_type["show_in_menu_string"] ) ? null : $cpt_post_type["show_in_menu_string"];
89
 
90
+ if ( isset ( $cpt_post_type["show_in_menu"] ) ) {
91
+ $cpt_show_in_menu = ( $cpt_post_type["show_in_menu"] == 1 ) ? true : false;
92
+ $cpt_show_in_menu = ( $cpt_post_type["show_in_menu_string"] ) ? $cpt_post_type["show_in_menu_string"] : $cpt_show_in_menu;
93
+ }else{
94
+ $cpt_show_in_menu = true;
95
+ }
96
  //set custom label values
97
  $cpt_labels['name'] = $cpt_label;
98
  $cpt_labels['singular_name'] = $cpt_post_type["singular_label"];
99
+
100
+ if ( isset ( $cpt_post_type[2]["menu_name"] ) ) {
101
+ $cpt_labels['menu_name'] = ( $cpt_post_type[2]["menu_name"] ) ? $cpt_post_type[2]["menu_name"] : $cpt_label;
102
+ }
103
+
104
+ $cpt_has_archive = ( isset ( $cpt_post_type["has_archive"] ) ) ? get_disp_boolean( $cpt_post_type["has_archive"] ) : null;
105
+
106
  $cpt_labels['add_new'] = ( $cpt_post_type[2]["add_new"] ) ? $cpt_post_type[2]["add_new"] : 'Add ' .$cpt_singular;
107
  $cpt_labels['add_new_item'] = ( $cpt_post_type[2]["add_new_item"] ) ? $cpt_post_type[2]["add_new_item"] : 'Add New ' .$cpt_singular;
108
  $cpt_labels['edit'] = ( $cpt_post_type[2]["edit"] ) ? $cpt_post_type[2]["edit"] : 'Edit';
119
  'public' => get_disp_boolean($cpt_post_type["public"]),
120
  'singular_label' => $cpt_post_type["singular_label"],
121
  'show_ui' => get_disp_boolean($cpt_post_type["show_ui"]),
122
+ 'has_archive' => $cpt_has_archive,
123
  'show_in_menu' => $cpt_show_in_menu,
124
  'capability_type' => $cpt_post_type["capability_type"],
125
  'hierarchical' => get_disp_boolean($cpt_post_type["hierarchical"]),
477
  <a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress" target="_blank">Custom Post Types in WordPress</a>
478
  </p>
479
  <p>Q: <strong>How can I add custom meta boxes to my custom post types?</strong></p>
480
+ <p>A: The More Fields plugin does a great job at creating custom meta boxes and fully supports custom post types: <a href="http://wordpress.org/extend/plugins/more-fields/" target="_blank">http://wordpress.org/extend/plugins/more-fields/</a></p>
481
  <p>Q: <strong>I changed my custom post type name and now I can't get to my posts</strong></p>
482
  <p>A: You can either change the custom post type name back to the original name or try the Post Type Switcher plugin: <a href="http://wordpress.org/extend/plugins/post-type-switcher/" target="_blank">http://wordpress.org/extend/plugins/post-type-switcher/</a></p>
483
  <h3><?php _e('Slightly Outdated Demo Video', 'cpt-plugin'); ?></h3>
948
  $cpt_supports = $cpt_options[$editType][0];
949
  $cpt_taxes = $cpt_options[$editType][1];
950
  $cpt_labels = $cpt_options[$editType][2];
951
+ $cpt_has_archive = ( isset( $cpt_options[$editType]["has_archive"] ) ) ? $cpt_options[$editType]["has_archive"] : null;
952
+ $cpt_show_in_menu = ( isset( $cpt_options[$editType]["show_in_menu"] ) ) ? $cpt_options[$editType]["show_in_menu"] : null;
953
+ $cpt_show_in_menu_string = ( isset( $cpt_options[$editType]["show_in_menu_string"] ) ) ? $cpt_options[$editType]["show_in_menu_string"] : null;
954
 
955
  $cpt_submit_name = 'Save Custom Post Type';
956
  }Else{
1464
  function cpt_check_return($return) {
1465
  global $CPT_URL;
1466
 
1467
+ If( $return=='cpt' ) {
1468
+ return ( isset( $_GET['return'] ) ) ? admin_url( 'admin.php?page=cpt_sub_manage_cpt&return=cpt' ) : admin_url( 'admin.php?page=cpt_sub_manage_cpt' );
1469
+ }Elseif( $return=='tax' ){
1470
+ return ( isset( $_GET['return'] ) ) ? admin_url( 'admin.php?page=cpt_sub_manage_taxonomies&return=tax' ) : admin_url( 'admin.php?page=cpt_sub_manage_taxonomies' );
1471
+ }Elseif( $return=='add' ) {
1472
+ return admin_url( 'admin.php?page=cpt_sub_add_new' );
1473
  }Else{
1474
+ return admin_url( 'admin.php?page=cpt_sub_add_new' );
1475
  }
1476
  }
1477
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: williamsba1
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
4
  Tags: custom post types, CMS, post, types, post type, cck, taxonomy, tax
5
  Requires at least: 3.0
6
- Tested up to: 3.1
7
- Stable tag: 0.7
8
 
9
  Admin UI for creating custom post types and custom taxonomies in WordPress
10
 
@@ -25,6 +25,9 @@ Below is a slightly outdated example video showing Custom Post Type UI in action
25
 
26
  == Changelog ==
27
 
 
 
 
28
  = 0.7 =
29
  * WordPress 3.1 support
30
  * Added has_archive and show_in_menu support
@@ -104,6 +107,9 @@ Below is a slightly outdated example video showing Custom Post Type UI in action
104
 
105
  == Upgrade Notice ==
106
 
 
 
 
107
  = 0.7 =
108
  * WordPress 3.1 support
109
  * Added has_archive and show_in_menu support
@@ -187,7 +193,7 @@ That's it! Now you can easily start creating custom post types and taxonomies in
187
 
188
  = How can I add custom meta boxes to my custom post types? =
189
 
190
- The Custom Field Template plugin does a great job at creating custom meta boxes and fully supports custom post types: http://wordpress.org/extend/plugins/custom-field-template/
191
 
192
  = I changed my custom post type name and now I can't get to my posts =
193
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
4
  Tags: custom post types, CMS, post, types, post type, cck, taxonomy, tax
5
  Requires at least: 3.0
6
+ Tested up to: 3.2.1
7
+ Stable tag: 0.7.1
8
 
9
  Admin UI for creating custom post types and custom taxonomies in WordPress
10
 
25
 
26
  == Changelog ==
27
 
28
+ = 0.7.1 =
29
+ * Fixed XSS security bug (props Duck)
30
+
31
  = 0.7 =
32
  * WordPress 3.1 support
33
  * Added has_archive and show_in_menu support
107
 
108
  == Upgrade Notice ==
109
 
110
+ = 0.7.1 =
111
+ * XSS security bug patched
112
+
113
  = 0.7 =
114
  * WordPress 3.1 support
115
  * Added has_archive and show_in_menu support
193
 
194
  = How can I add custom meta boxes to my custom post types? =
195
 
196
+ The More Fields plugin does a great job at creating custom meta boxes and fully supports custom post types: http://wordpress.org/extend/plugins/more-fields/
197
 
198
  = I changed my custom post type name and now I can't get to my posts =
199