Version Description
- 2021-04-19 =
- Fixed: missed WPGraphQL settings in our Get Tools/Export functionality.
- Updated: note about needing a published item to set parent/child relationships in post types.
Download this release
Release Info
| Developer | tw2113 |
| Plugin | |
| Version | 1.9.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.9.0 to 1.9.1
- custom-post-type-ui.php +3 -3
- inc/post-types.php +1 -1
- inc/tools.php +27 -6
- readme.txt +9 -1
custom-post-type-ui.php
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
* Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
|
| 17 |
* Description: Admin panel for creating custom post types and custom taxonomies in WordPress
|
| 18 |
* Author: WebDevStudios
|
| 19 |
-
* Version: 1.9.
|
| 20 |
* Author URI: https://webdevstudios.com/
|
| 21 |
* Text Domain: custom-post-type-ui
|
| 22 |
* Domain Path: /languages
|
|
@@ -30,8 +30,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 30 |
exit;
|
| 31 |
}
|
| 32 |
|
| 33 |
-
define( 'CPT_VERSION', '1.9.
|
| 34 |
-
define( 'CPTUI_VERSION', '1.9.
|
| 35 |
define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
|
| 36 |
|
| 37 |
/**
|
| 16 |
* Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
|
| 17 |
* Description: Admin panel for creating custom post types and custom taxonomies in WordPress
|
| 18 |
* Author: WebDevStudios
|
| 19 |
+
* Version: 1.9.1
|
| 20 |
* Author URI: https://webdevstudios.com/
|
| 21 |
* Text Domain: custom-post-type-ui
|
| 22 |
* Domain Path: /languages
|
| 30 |
exit;
|
| 31 |
}
|
| 32 |
|
| 33 |
+
define( 'CPT_VERSION', '1.9.1' ); // Left for legacy purposes.
|
| 34 |
+
define( 'CPTUI_VERSION', '1.9.1' );
|
| 35 |
define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
|
| 36 |
|
| 37 |
/**
|
inc/post-types.php
CHANGED
|
@@ -990,7 +990,7 @@ function cptui_manage_post_types() {
|
|
| 990 |
'namearray' => 'cpt_custom_post_type',
|
| 991 |
'name' => 'hierarchical',
|
| 992 |
'labeltext' => esc_html__( 'Hierarchical', 'custom-post-type-ui' ),
|
| 993 |
-
'aftertext' => esc_html__( '(default: false) Whether or not the post type can have parent-child relationships.', 'custom-post-type-ui' ),
|
| 994 |
'selections' => $select,
|
| 995 |
] );
|
| 996 |
|
| 990 |
'namearray' => 'cpt_custom_post_type',
|
| 991 |
'name' => 'hierarchical',
|
| 992 |
'labeltext' => esc_html__( 'Hierarchical', 'custom-post-type-ui' ),
|
| 993 |
+
'aftertext' => esc_html__( '(default: false) Whether or not the post type can have parent-child relationships. At least one published content item is needed in order to select a parent.', 'custom-post-type-ui' ),
|
| 994 |
'selections' => $select,
|
| 995 |
] );
|
| 996 |
|
inc/tools.php
CHANGED
|
@@ -326,6 +326,10 @@ foreach ( $taxonomy['labels'] as $key => $label ) {
|
|
| 326 |
?>
|
| 327 |
];
|
| 328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
$args = [
|
| 330 |
"label" => __( "<?php echo $taxonomy['label']; ?>", "<?php echo $textdomain; ?>" ),
|
| 331 |
"labels" => $labels,
|
|
@@ -342,12 +346,19 @@ foreach ( $taxonomy['labels'] as $key => $label ) {
|
|
| 342 |
"rest_base" => "<?php echo $rest_base; ?>",
|
| 343 |
"rest_controller_class" => "<?php echo $rest_controller_class; ?>",
|
| 344 |
"show_in_quick_edit" => <?php echo $show_in_quick_edit; ?>,
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
];
|
| 352 |
register_taxonomy( "<?php echo esc_html( $taxonomy['name'] ); ?>", <?php echo $post_types; ?>, $args );
|
| 353 |
<?php
|
|
@@ -420,6 +431,9 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
|
|
| 420 |
}
|
| 421 |
}
|
| 422 |
|
|
|
|
|
|
|
|
|
|
| 423 |
$rewrite_withfront = '';
|
| 424 |
$rewrite = get_disp_boolean( $post_type['rewrite'] );
|
| 425 |
if ( false !== $rewrite ) {
|
|
@@ -579,6 +593,13 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
|
|
| 579 |
<?php if ( true === $yarpp ) { ?>
|
| 580 |
"yarpp_support" => <?php echo disp_boolean( $yarpp ); ?>,
|
| 581 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
];
|
| 583 |
|
| 584 |
register_post_type( "<?php echo esc_html( $post_type['name'] ); ?>", $args );
|
| 326 |
?>
|
| 327 |
];
|
| 328 |
|
| 329 |
+
<?php
|
| 330 |
+
$show_graphql = isset( $taxonomy['show_in_graphql'] ) ? (bool) $taxonomy['show_in_graphql'] : false;
|
| 331 |
+
?>
|
| 332 |
+
|
| 333 |
$args = [
|
| 334 |
"label" => __( "<?php echo $taxonomy['label']; ?>", "<?php echo $textdomain; ?>" ),
|
| 335 |
"labels" => $labels,
|
| 346 |
"rest_base" => "<?php echo $rest_base; ?>",
|
| 347 |
"rest_controller_class" => "<?php echo $rest_controller_class; ?>",
|
| 348 |
"show_in_quick_edit" => <?php echo $show_in_quick_edit; ?>,
|
| 349 |
+
<?php if ( $show_graphql ) : ?>
|
| 350 |
+
"show_in_graphql" => <?php echo disp_boolean( $taxonomy['show_in_graphql'] ); ?>,
|
| 351 |
+
"graphql_single_name" => "<?php echo esc_html( $taxonomy['graphql_single_name'] ); ?>",
|
| 352 |
+
"show_in_graphql" => "<?php echo esc_html( $taxonomy['graphql_plural_name'] ); ?>",
|
| 353 |
+
<?php else: ?>
|
| 354 |
+
"show_in_graphql" => <?php echo disp_boolean( false ); ?>,
|
| 355 |
+
<?php endif; ?>
|
| 356 |
+
<?php if ( ! empty( $meta_box_cb ) ) { ?>
|
| 357 |
+
"meta_box_cb" => <?php echo $meta_box_cb; ?>,
|
| 358 |
+
<?php } ?>
|
| 359 |
+
<?php if ( ! empty( $default_term ) ) { ?>
|
| 360 |
+
"default_term" => <?php echo $default_term; ?>,
|
| 361 |
+
<?php } ?>
|
| 362 |
];
|
| 363 |
register_taxonomy( "<?php echo esc_html( $taxonomy['name'] ); ?>", <?php echo $post_types; ?>, $args );
|
| 364 |
<?php
|
| 431 |
}
|
| 432 |
}
|
| 433 |
|
| 434 |
+
|
| 435 |
+
$show_graphql = isset( $post_type['show_in_graphql'] ) ? (bool) $post_type['show_in_graphql'] : false;
|
| 436 |
+
|
| 437 |
$rewrite_withfront = '';
|
| 438 |
$rewrite = get_disp_boolean( $post_type['rewrite'] );
|
| 439 |
if ( false !== $rewrite ) {
|
| 593 |
<?php if ( true === $yarpp ) { ?>
|
| 594 |
"yarpp_support" => <?php echo disp_boolean( $yarpp ); ?>,
|
| 595 |
<?php } ?>
|
| 596 |
+
<?php if ( $show_graphql ) : ?>
|
| 597 |
+
"show_in_graphql" => <?php echo disp_boolean( $post_type['show_in_graphql'] ); ?>,
|
| 598 |
+
"graphql_single_name" => "<?php echo esc_html( $post_type['graphql_single_name'] ); ?>",
|
| 599 |
+
"show_in_graphql" => "<?php echo esc_html( $post_type['graphql_plural_name'] ); ?>",
|
| 600 |
+
<?php else: ?>
|
| 601 |
+
"show_in_graphql" => <?php echo disp_boolean( false ); ?>,
|
| 602 |
+
<?php endif; ?>
|
| 603 |
];
|
| 604 |
|
| 605 |
register_post_type( "<?php echo esc_html( $post_type['name'] ); ?>", $args );
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
| 4 |
Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types
|
| 5 |
Requires at least: 5.5
|
| 6 |
Tested up to: 5.7.0
|
| 7 |
-
Stable tag: 1.9.
|
| 8 |
License: GPL-2.0+
|
| 9 |
Requires PHP: 5.6
|
| 10 |
|
|
@@ -31,6 +31,10 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
|
|
| 31 |
|
| 32 |
== Changelog ==
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
= 1.9.0 - 2021-03-30 =
|
| 35 |
* Added: WPGraphQL Support when WPGraphQL is installed and active.
|
| 36 |
* Fixed: Better handling of code in post_format based helper functions.
|
|
@@ -54,6 +58,10 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
|
|
| 54 |
|
| 55 |
== Upgrade Notice ==
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
= 1.9.0 - 2021-03-30 =
|
| 58 |
* Added: WPGraphQL Support when WPGraphQL is installed and active.
|
| 59 |
* Fixed: Better handling of code in post_format based helper functions.
|
| 4 |
Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types
|
| 5 |
Requires at least: 5.5
|
| 6 |
Tested up to: 5.7.0
|
| 7 |
+
Stable tag: 1.9.1
|
| 8 |
License: GPL-2.0+
|
| 9 |
Requires PHP: 5.6
|
| 10 |
|
| 31 |
|
| 32 |
== Changelog ==
|
| 33 |
|
| 34 |
+
= 1.9.1 - 2021-04-19 =
|
| 35 |
+
* Fixed: missed WPGraphQL settings in our Get Tools/Export functionality.
|
| 36 |
+
* Updated: note about needing a published item to set parent/child relationships in post types.
|
| 37 |
+
|
| 38 |
= 1.9.0 - 2021-03-30 =
|
| 39 |
* Added: WPGraphQL Support when WPGraphQL is installed and active.
|
| 40 |
* Fixed: Better handling of code in post_format based helper functions.
|
| 58 |
|
| 59 |
== Upgrade Notice ==
|
| 60 |
|
| 61 |
+
= 1.9.1 - 2021-04-19 =
|
| 62 |
+
* Fixed: missed WPGraphQL settings in our Get Tools/Export functionality.
|
| 63 |
+
* Updated: note about needing a published item to set parent/child relationships in post types.
|
| 64 |
+
|
| 65 |
= 1.9.0 - 2021-03-30 =
|
| 66 |
* Added: WPGraphQL Support when WPGraphQL is installed and active.
|
| 67 |
* Fixed: Better handling of code in post_format based helper functions.
|
