Version Description
- 2020-12-29 =
- Fixed: Addressed some missing available labels for taxonomies.
- Updated: Provide page slug and link to page if a post type slug is matching an existing page.
- Updated: Support link was pointed to legacy WordPress Codex but had been moved to Developer Portal. Props @robwent
Download this release
Release Info
Developer | tw2113 |
Plugin | Custom Post Type UI |
Version | 1.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.2
- custom-post-type-ui.php +3 -3
- inc/post-types.php +1 -1
- inc/taxonomies.php +28 -0
- inc/utility.php +13 -1
- readme.txt +12 -2
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.8.
|
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.8.
|
34 |
-
define( 'CPTUI_VERSION', '1.8.
|
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.8.2
|
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.8.2' ); // Left for legacy purposes.
|
34 |
+
define( 'CPTUI_VERSION', '1.8.2' );
|
35 |
define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
|
36 |
|
37 |
/**
|
inc/post-types.php
CHANGED
@@ -1069,7 +1069,7 @@ function cptui_manage_post_types() {
|
|
1069 |
'custom-post-type-ui'
|
1070 |
),
|
1071 |
sprintf(
|
1072 |
-
'<a href="
|
1073 |
esc_html__( 'Available options', 'custom-post-type-ui' )
|
1074 |
)
|
1075 |
)
|
1069 |
'custom-post-type-ui'
|
1070 |
),
|
1071 |
sprintf(
|
1072 |
+
'<a href="https://developer.wordpress.org/reference/functions/register_post_type/#menu_position" target="_blank">%s</a>',
|
1073 |
esc_html__( 'Available options', 'custom-post-type-ui' )
|
1074 |
)
|
1075 |
)
|
inc/taxonomies.php
CHANGED
@@ -693,6 +693,34 @@ function cptui_manage_taxonomies() {
|
|
693 |
'plurality' => 'plural',
|
694 |
],
|
695 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
?>
|
697 |
</table>
|
698 |
</div>
|
693 |
'plurality' => 'plural',
|
694 |
],
|
695 |
] );
|
696 |
+
|
697 |
+
echo $ui->get_text_input( [
|
698 |
+
'namearray' => 'cpt_tax_labels',
|
699 |
+
'name' => 'not_found',
|
700 |
+
'textvalue' => isset( $current['labels']['not_found'] ) ? esc_attr( $current['labels']['not_found'] ) : null,
|
701 |
+
'aftertext' => esc_html__( '(e.g. No actors found)', 'custom-post-type-ui' ),
|
702 |
+
'labeltext' => esc_html__( 'Not Found', 'custom-post-type-ui' ),
|
703 |
+
'helptext' => esc_attr__( 'The text displayed via clicking ‘Choose from the most used items’ in the taxonomy meta box when no items are available.', 'custom-post-type-ui' ),
|
704 |
+
'data' => [
|
705 |
+
/* translators: Used for autofill */
|
706 |
+
'label' => sprintf( esc_attr__( 'No %s found', 'custom-post-type-ui' ), 'item' ),
|
707 |
+
'plurality' => 'plural',
|
708 |
+
],
|
709 |
+
] );
|
710 |
+
|
711 |
+
echo $ui->get_text_input( [
|
712 |
+
'namearray' => 'cpt_tax_labels',
|
713 |
+
'name' => 'back_to_items',
|
714 |
+
'textvalue' => isset( $current['labels']['back_to_items'] ) ? esc_attr( $current['labels']['back_to_items'] ) : null,
|
715 |
+
'aftertext' => esc_html__( '(e.g. ← Back to actors', 'custom-post-type-ui' ),
|
716 |
+
'labeltext' => esc_html__( 'Back to Items', 'custom-post-type-ui' ),
|
717 |
+
'helptext' => esc_attr__( 'The text displayed after a term has been updated for a link back to main index.', 'custom-post-type-ui' ),
|
718 |
+
'data' => [
|
719 |
+
/* translators: Used for autofill */
|
720 |
+
'label' => sprintf( esc_attr__( 'Back to %s', 'custom-post-type-ui' ), 'item' ),
|
721 |
+
'plurality' => 'plural',
|
722 |
+
],
|
723 |
+
] );
|
724 |
?>
|
725 |
</table>
|
726 |
</div>
|
inc/utility.php
CHANGED
@@ -745,9 +745,21 @@ function cptui_empty_cpt_on_taxonomy() {
|
|
745 |
* @return string
|
746 |
*/
|
747 |
function cptui_slug_matches_page() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
return sprintf(
|
749 |
esc_html__( 'Please choose a different post type name. %s matches an existing page slug, which can cause conflicts.', 'custom-post-type-ui' ),
|
750 |
-
|
751 |
);
|
752 |
}
|
753 |
|
745 |
* @return string
|
746 |
*/
|
747 |
function cptui_slug_matches_page() {
|
748 |
+
$slug = cptui_get_object_from_post_global();
|
749 |
+
$matched_slug = get_page_by_path(
|
750 |
+
cptui_get_object_from_post_global()
|
751 |
+
);
|
752 |
+
if ( $matched_slug instanceof WP_Post ) {
|
753 |
+
$slug = sprintf(
|
754 |
+
'<a href="%s">%s</a>',
|
755 |
+
get_edit_post_link( $matched_slug->ID ),
|
756 |
+
cptui_get_object_from_post_global()
|
757 |
+
);
|
758 |
+
}
|
759 |
+
|
760 |
return sprintf(
|
761 |
esc_html__( 'Please choose a different post type name. %s matches an existing page slug, which can cause conflicts.', 'custom-post-type-ui' ),
|
762 |
+
$slug
|
763 |
);
|
764 |
}
|
765 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: webdevstudios, pluginize, tw2113, vegasgeek, modemlooper, williams
|
|
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, taxonomy, tax, custom, content types, post types
|
5 |
Requires at least: 5.5
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPL-2.0+
|
9 |
Requires PHP: 5.6
|
10 |
|
@@ -31,6 +31,11 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
|
|
31 |
|
32 |
== Changelog ==
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
= 1.8.1 - 2020-09-21 =
|
35 |
* Fixed: Issues with WP-CLI importing.
|
36 |
* Added: Menu icon preview that should have been in 1.8.0, but was missed. Props @glebkema
|
@@ -74,6 +79,11 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
|
|
74 |
|
75 |
== Upgrade Notice ==
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
= 1.8.1 - 2020-09-21 =
|
78 |
* Fixed: Issues with WP-CLI importing.
|
79 |
* Added: Menu icon preview that should have been in 1.8.0, but was missed. Props @glebkema
|
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, taxonomy, tax, custom, content types, post types
|
5 |
Requires at least: 5.5
|
6 |
+
Tested up to: 5.6.0
|
7 |
+
Stable tag: 1.8.2
|
8 |
License: GPL-2.0+
|
9 |
Requires PHP: 5.6
|
10 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 1.8.2 - 2020-12-29 =
|
35 |
+
* Fixed: Addressed some missing available labels for taxonomies.
|
36 |
+
* Updated: Provide page slug and link to page if a post type slug is matching an existing page.
|
37 |
+
* Updated: Support link was pointed to legacy WordPress Codex but had been moved to Developer Portal. Props @robwent
|
38 |
+
|
39 |
= 1.8.1 - 2020-09-21 =
|
40 |
* Fixed: Issues with WP-CLI importing.
|
41 |
* Added: Menu icon preview that should have been in 1.8.0, but was missed. Props @glebkema
|
79 |
|
80 |
== Upgrade Notice ==
|
81 |
|
82 |
+
= 1.8.2 - 2020-12-29 =
|
83 |
+
* Fixed: Addressed some missing available labels for taxonomies.
|
84 |
+
* Updated: Provide page slug and link to page if a post type slug is matching an existing page.
|
85 |
+
* Updated: Support link was pointed to legacy WordPress Codex but had been moved to Developer Portal. Props @robwent
|
86 |
+
|
87 |
= 1.8.1 - 2020-09-21 =
|
88 |
* Fixed: Issues with WP-CLI importing.
|
89 |
* Added: Menu icon preview that should have been in 1.8.0, but was missed. Props @glebkema
|