Custom Post Type UI - Version 1.3.2

Version Description

  • 2016-4-5 =
  • Fixed: Logic issue with cptui js files loading where they weren't meant to.
  • Fixed: Required markers missing on required post type fields.
  • Fixed: Removed excess labels that are not used by WordPress core.
  • Added: New contributors to readme file. Welcome John and Ryan.
  • Updated: New screenshot from 1.3.0 release. Moved to assets folder so users will no longer download as part of CPTUI.
  • Updated: Better prevention of running our code during ajax/heartbeat api requests.
Download this release

Release Info

Developer tw2113
Plugin Icon 128x128 Custom Post Type UI
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

custom-post-type-ui.php CHANGED
@@ -13,7 +13,7 @@ Plugin Name: Custom Post Type UI
13
  Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
14
  Description: Admin panel for creating custom post types and custom taxonomies in WordPress
15
  Author: WebDevStudios
16
- Version: 1.3.1
17
  Author URI: https://webdevstudios.com/
18
  Text Domain: custom-post-type-ui
19
  Domain Path: /languages
@@ -25,8 +25,8 @@ if ( ! defined( 'ABSPATH' ) ) {
25
  exit;
26
  }
27
 
28
- define( 'CPT_VERSION', '1.3.0' ); // Left for legacy purposes.
29
- define( 'CPTUI_VERSION', '1.3.0' );
30
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
31
 
32
  /**
@@ -192,6 +192,11 @@ add_action( 'admin_enqueue_scripts', 'cptui_add_styles' );
192
  * @internal
193
  */
194
  function cptui_create_custom_post_types() {
 
 
 
 
 
195
  $cpts = get_option( 'cptui_post_types' );
196
 
197
  if ( empty( $cpts ) ) {
@@ -400,6 +405,11 @@ function cptui_register_single_post_type( $post_type = array() ) {
400
  * @internal
401
  */
402
  function cptui_create_custom_taxonomies() {
 
 
 
 
 
403
  $taxes = get_option( 'cptui_taxonomies' );
404
 
405
  if ( empty( $taxes ) ) {
13
  Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
14
  Description: Admin panel for creating custom post types and custom taxonomies in WordPress
15
  Author: WebDevStudios
16
+ Version: 1.3.2
17
  Author URI: https://webdevstudios.com/
18
  Text Domain: custom-post-type-ui
19
  Domain Path: /languages
25
  exit;
26
  }
27
 
28
+ define( 'CPT_VERSION', '1.3.2' ); // Left for legacy purposes.
29
+ define( 'CPTUI_VERSION', '1.3.2' );
30
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
31
 
32
  /**
192
  * @internal
193
  */
194
  function cptui_create_custom_post_types() {
195
+
196
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
197
+ return;
198
+ }
199
+
200
  $cpts = get_option( 'cptui_post_types' );
201
 
202
  if ( empty( $cpts ) ) {
405
  * @internal
406
  */
407
  function cptui_create_custom_taxonomies() {
408
+
409
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
410
+ return;
411
+ }
412
+
413
  $taxes = get_option( 'cptui_taxonomies' );
414
 
415
  if ( empty( $taxes ) ) {
inc/post-types.php CHANGED
@@ -24,7 +24,7 @@ function cptui_post_type_enqueue_scripts() {
24
 
25
  $current_screen = get_current_screen();
26
 
27
- if ( ! is_object( $current_screen ) || 'post' === $current_screen->base ) {
28
  return;
29
  }
30
 
@@ -203,6 +203,7 @@ function cptui_manage_post_types() {
203
  <?php
204
  echo $ui->get_tr_start() . $ui->get_th_start();
205
  echo $ui->get_label( 'name', __( 'Post Type Slug', 'custom-post-type-ui' ) );
 
206
  echo $ui->get_th_end() . $ui->get_td_start();
207
 
208
  echo $ui->get_text_input( array(
@@ -247,6 +248,7 @@ function cptui_manage_post_types() {
247
  'labeltext' => esc_html__( 'Plural Label', 'custom-post-type-ui' ),
248
  'aftertext' => esc_html__( '(e.g. Movies)', 'custom-post-type-ui' ),
249
  'helptext' => esc_html__( 'Used for the post type admin menu item.', 'custom-post-type-ui' ),
 
250
  ) );
251
 
252
  echo $ui->get_text_input( array(
@@ -256,6 +258,7 @@ function cptui_manage_post_types() {
256
  'labeltext' => esc_html__( 'Singular Label', 'custom-post-type-ui' ),
257
  'aftertext' => esc_html__( '(e.g. Movie)', 'custom-post-type-ui' ),
258
  'helptext' => esc_html__( 'Used when a singular label is needed.', 'custom-post-type-ui' ),
 
259
  ) );
260
  ?>
261
  </table>
@@ -370,15 +373,6 @@ function cptui_manage_post_types() {
370
  'aftertext' => __( '(e.g. Add New Movie)', 'custom-post-type-ui' )
371
  ) );
372
 
373
- echo $ui->get_text_input( array(
374
- 'labeltext' => __( 'Edit', 'custom-post-type-ui' ),
375
- 'helptext' => esc_attr__( 'Post type label. Used in the admin menu for displaying post types.', 'custom-post-type-ui' ),
376
- 'namearray' => 'cpt_labels',
377
- 'name' => 'edit',
378
- 'textvalue' => ( isset( $current['labels']['edit'] ) ) ? esc_attr( $current['labels']['edit'] ) : '',
379
- 'aftertext' => __( '(e.g. Edit)', 'custom-post-type-ui' )
380
- ) );
381
-
382
  echo $ui->get_text_input( array(
383
  'labeltext' => __( 'Edit Item', 'custom-post-type-ui' ),
384
  'helptext' => esc_attr__( 'Used at the top of the post editor screen for an existing post type post.', 'custom-post-type-ui' ),
@@ -397,15 +391,6 @@ function cptui_manage_post_types() {
397
  'aftertext' => __( '(e.g. New Movie)', 'custom-post-type-ui' )
398
  ) );
399
 
400
- echo $ui->get_text_input( array(
401
- 'labeltext' => __( 'View', 'custom-post-type-ui' ),
402
- 'helptext' => esc_attr__( 'Used in the admin bar when viewing a published post in the post type.', 'custom-post-type-ui' ),
403
- 'namearray' => 'cpt_labels',
404
- 'name' => 'view',
405
- 'textvalue' => ( isset( $current['labels']['view'] ) ) ? esc_attr( $current['labels']['view'] ) : '',
406
- 'aftertext' => __( '(e.g. View)', 'custom-post-type-ui' )
407
- ) );
408
-
409
  echo $ui->get_text_input( array(
410
  'labeltext' => __( 'View Item', 'custom-post-type-ui' ),
411
  'helptext' => esc_attr__( 'Used in the admin bar when viewing editor screen for a published post in the post type.', 'custom-post-type-ui' ),
24
 
25
  $current_screen = get_current_screen();
26
 
27
+ if ( ! is_object( $current_screen ) || 'cpt-ui_page_cptui_manage_post_types' !== $current_screen->base ) {
28
  return;
29
  }
30
 
203
  <?php
204
  echo $ui->get_tr_start() . $ui->get_th_start();
205
  echo $ui->get_label( 'name', __( 'Post Type Slug', 'custom-post-type-ui' ) );
206
+ echo $ui->get_required_span();
207
  echo $ui->get_th_end() . $ui->get_td_start();
208
 
209
  echo $ui->get_text_input( array(
248
  'labeltext' => esc_html__( 'Plural Label', 'custom-post-type-ui' ),
249
  'aftertext' => esc_html__( '(e.g. Movies)', 'custom-post-type-ui' ),
250
  'helptext' => esc_html__( 'Used for the post type admin menu item.', 'custom-post-type-ui' ),
251
+ 'required' => true
252
  ) );
253
 
254
  echo $ui->get_text_input( array(
258
  'labeltext' => esc_html__( 'Singular Label', 'custom-post-type-ui' ),
259
  'aftertext' => esc_html__( '(e.g. Movie)', 'custom-post-type-ui' ),
260
  'helptext' => esc_html__( 'Used when a singular label is needed.', 'custom-post-type-ui' ),
261
+ 'required' => true
262
  ) );
263
  ?>
264
  </table>
373
  'aftertext' => __( '(e.g. Add New Movie)', 'custom-post-type-ui' )
374
  ) );
375
 
 
 
 
 
 
 
 
 
 
376
  echo $ui->get_text_input( array(
377
  'labeltext' => __( 'Edit Item', 'custom-post-type-ui' ),
378
  'helptext' => esc_attr__( 'Used at the top of the post editor screen for an existing post type post.', 'custom-post-type-ui' ),
391
  'aftertext' => __( '(e.g. New Movie)', 'custom-post-type-ui' )
392
  ) );
393
 
 
 
 
 
 
 
 
 
 
394
  echo $ui->get_text_input( array(
395
  'labeltext' => __( 'View Item', 'custom-post-type-ui' ),
396
  'helptext' => esc_attr__( 'Used in the admin bar when viewing editor screen for a published post in the post type.', 'custom-post-type-ui' ),
inc/support.php CHANGED
@@ -24,7 +24,7 @@ function cptui_support_enqueue_scripts() {
24
 
25
  $current_screen = get_current_screen();
26
 
27
- if ( ! is_object( $current_screen ) || 'post' === $current_screen->base ) {
28
  return;
29
  }
30
 
24
 
25
  $current_screen = get_current_screen();
26
 
27
+ if ( ! is_object( $current_screen ) || 'cpt-ui_page_cptui_support' !== $current_screen->base ) {
28
  return;
29
  }
30
 
inc/taxonomies.php CHANGED
@@ -24,7 +24,7 @@ function cptui_taxonomies_enqueue_scripts() {
24
 
25
  $currentScreen = get_current_screen();
26
 
27
- if ( ! is_object( $currentScreen ) || $currentScreen->base == "post" ) {
28
  return;
29
  }
30
 
24
 
25
  $currentScreen = get_current_screen();
26
 
27
+ if ( ! is_object( $currentScreen ) || 'cpt-ui_page_cptui_manage_taxonomies' !== $currentScreen->base ) {
28
  return;
29
  }
30
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Custom Post Type UI ===
2
- Contributors: tw2113, williamsba1, webdevstudios
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
4
  Tags: custom post types, CPT, CMS, post, types, post type, cck, taxonomy, tax, custom
5
  Requires at least: 4.2
6
  Tested up to: 4.5
7
- Stable tag: 1.3.1
8
  License: GPLv2
9
 
10
  Admin UI for creating custom post types and custom taxonomies in WordPress
@@ -24,12 +24,23 @@ All official development on this plugin is on GitHub. Version bumps will still b
24
  3. Add new taxonomy screen and tab.
25
  4. Edit taxonomy screen and tab.
26
  5. Registered post types and taxonomies from CPTUI
27
- 6. Import/Export screen.
28
- 7. Help/support screen.
29
- 8. Update Information/Donate screen.
 
 
 
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
 
 
 
33
  = 1.3.1 - 2016-3-25 =
34
  * Fixed: Logic issue for default values of `public` parameter for taxonomies added in 1.3.0.
35
 
@@ -194,6 +205,14 @@ All official development on this plugin is on GitHub. Version bumps will still b
194
 
195
  == Upgrade Notice ==
196
 
 
 
 
 
 
 
 
 
197
  = 1.3.1 - 2016-3-25 =
198
  * Fixed: Logic issue for default values of `public` parameter for taxonomies added in 1.3.0.
199
 
1
  === Custom Post Type UI ===
2
+ Contributors: webdevstudios, tw2113, vegasgeek, modemlooper, williamsba1
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
4
  Tags: custom post types, CPT, CMS, post, types, post type, cck, taxonomy, tax, custom
5
  Requires at least: 4.2
6
  Tested up to: 4.5
7
+ Stable tag: 1.3.2
8
  License: GPLv2
9
 
10
  Admin UI for creating custom post types and custom taxonomies in WordPress
24
  3. Add new taxonomy screen and tab.
25
  4. Edit taxonomy screen and tab.
26
  5. Registered post types and taxonomies from CPTUI
27
+ 6. Import/Export Post Types screen.
28
+ 7. Import/Export Taxonomies screen.
29
+ 8. Get Code screen.
30
+ 9. Debug Info screen.
31
+ 10. Help/support screen.
32
+ 11. About/Update Information/Donate screen.
33
 
34
  == Changelog ==
35
 
36
+ = 1.3.2 - 2016-4-5 =
37
+ * Fixed: Logic issue with cptui js files loading where they weren't meant to.
38
+ * Fixed: Required markers missing on required post type fields.
39
+ * Fixed: Removed excess labels that are not used by WordPress core.
40
+ * Added: New contributors to readme file. Welcome John and Ryan.
41
+ * Updated: New screenshot from 1.3.0 release. Moved to assets folder so users will no longer download as part of CPTUI.
42
+ * Updated: Better prevention of running our code during ajax/heartbeat api requests.
43
+
44
  = 1.3.1 - 2016-3-25 =
45
  * Fixed: Logic issue for default values of `public` parameter for taxonomies added in 1.3.0.
46
 
205
 
206
  == Upgrade Notice ==
207
 
208
+ = 1.3.2 - 2016-4-5 =
209
+ * Fixed: Logic issue with cptui js files loading where they weren't meant to.
210
+ * Fixed: Required markers missing on required post type fields.
211
+ * Fixed: Removed excess labels that are not used by WordPress core.
212
+ * Added: New contributors to readme file. Welcome John and Ryan.
213
+ * Updated: New screenshot from 1.3.0 release. Moved to assets folder so users will no longer download as part of CPTUI.
214
+ * Updated: Better prevention of running our code during ajax/heartbeat api requests.
215
+
216
  = 1.3.1 - 2016-3-25 =
217
  * Fixed: Logic issue for default values of `public` parameter for taxonomies added in 1.3.0.
218
 
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file
screenshot-8.png DELETED
Binary file
screenshot-9.png DELETED
Binary file