Custom Post Type UI - Version 1.9.0

Version Description

  • 2021-03-30 =
  • Added: WPGraphQL Support when WPGraphQL is installed and active.
  • Fixed: Better handling of code in post_format based helper functions.
  • Updated: Cleaned up unused CSS.
  • Updated: Added types to disallowed taxonomy slugs.
  • Updated: Amended some helper text on the listings page regarding templates. Props @tarecord
Download this release

Release Info

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

Code changes from version 1.8.2 to 1.9.0

css/cptui.css CHANGED
@@ -32,21 +32,12 @@
32
  color: red;
33
  }
34
 
35
- .cptui-table #excerpt {
36
- display: inline-block;
37
- height: 16px;
38
- margin: 12px 4px 12px 0;
39
- width: auto;
40
- }
41
-
42
  .cptui-table td.outer {
43
  vertical-align: top;
44
  width: 50%;
45
  }
46
 
47
- .cptui-table input[type="text"],
48
- .cptui-new .cptui-table textarea,
49
- .cptui-edit .cptui-table textarea {
50
  width: 75%;
51
  }
52
 
@@ -72,10 +63,6 @@
72
  display: none;
73
  }
74
 
75
- .cpt-ui_page_cptui_tools .cptui-table .outer p {
76
- padding: 0 4px;
77
- }
78
-
79
  .cptui-support #support .question {
80
  font-size: 18px;
81
  font-weight: bold;
@@ -185,19 +172,6 @@
185
  -moz-osx-font-smoothing: grayscale;
186
  }
187
 
188
- .rtl .about-wrap .feature-rest div {
189
- padding-left: 100px;
190
- }
191
-
192
- .rtl .about-wrap .feature-rest div.last-feature {
193
- padding-right: 100px;
194
- padding-left: 0;
195
- }
196
-
197
- .rtl .about-wrap .feature-rest div.icon:before {
198
- margin: 0 -100px 0 0;
199
- }
200
-
201
  .about-wrap .about-integrations {
202
  background: #fff;
203
  margin: 20px 0;
@@ -222,6 +196,10 @@
222
  color: #cccccc;
223
  }
224
 
 
 
 
 
225
  .cptui-intro-devblock {
226
  display: -ms-flexbox;
227
  display: flex;
@@ -229,14 +207,6 @@
229
  flex-direction: row;
230
  }
231
 
232
- #togglelabels {
233
- display: none;
234
- }
235
-
236
- .js #togglelabels {
237
- display: inline-block;
238
- }
239
-
240
  .cptui-help {
241
  color: #424242;
242
  margin-left: 4px;
@@ -270,12 +240,6 @@ fieldset .cptui-help {
270
  width: 20px;
271
  }
272
 
273
- #toplevel_page_cptui_main_menu img {
274
- height: 20px;
275
- margin-top: -2px;
276
- width: 20px;
277
- }
278
-
279
  .visuallyhidden {
280
  position: absolute;
281
  left: -10000px;
32
  color: red;
33
  }
34
 
 
 
 
 
 
 
 
35
  .cptui-table td.outer {
36
  vertical-align: top;
37
  width: 50%;
38
  }
39
 
40
+ .cptui-table input[type="text"] {
 
 
41
  width: 75%;
42
  }
43
 
63
  display: none;
64
  }
65
 
 
 
 
 
66
  .cptui-support #support .question {
67
  font-size: 18px;
68
  font-weight: bold;
172
  -moz-osx-font-smoothing: grayscale;
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  .about-wrap .about-integrations {
176
  background: #fff;
177
  margin: 20px 0;
196
  color: #cccccc;
197
  }
198
 
199
+ .email-octopus-form-row-hp {
200
+ visibility: hidden;
201
+ }
202
+
203
  .cptui-intro-devblock {
204
  display: -ms-flexbox;
205
  display: flex;
207
  flex-direction: row;
208
  }
209
 
 
 
 
 
 
 
 
 
210
  .cptui-help {
211
  color: #424242;
212
  margin-left: 4px;
240
  width: 20px;
241
  }
242
 
 
 
 
 
 
 
243
  .visuallyhidden {
244
  position: absolute;
245
  left: -10000px;
css/cptui.min.css CHANGED
@@ -1 +1 @@
1
- .posttypesui,.taxonomiesui{width:calc(100% - 300px)}.posttypesui .cptui-section:first-child,.taxonomiesui .cptui-section:first-child{margin-top:30px}.posttypesui .postbox-container,.taxonomiesui .postbox-container{width:100%}.posttypesui .postbox .toggle-indicator:before,.taxonomiesui .postbox .toggle-indicator:before{content:"\f142";display:inline-block;font:normal 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.posttypesui .postbox.closed .handlediv .toggle-indicator:before,.taxonomiesui .postbox.closed .handlediv .toggle-indicator:before{content:"\f140"}.posttypesui .postbox .hndle,.taxonomiesui .postbox .hndle{cursor:pointer}.posttypesui .required,.taxonomiesui .required{color:red}.cptui-table #excerpt{display:inline-block;height:16px;margin:12px 4px 12px 0;width:auto}.cptui-table td.outer{vertical-align:top;width:50%}.cptui-edit .cptui-table textarea,.cptui-new .cptui-table textarea,.cptui-table input[type=text]{width:75%}.cptui-table .question:hover{cursor:pointer}.cptui-table th p{font-weight:400;font-size:12px}.cptui-table .cptui-slug-details{margin-top:15px}.cptui-table #slugchanged,.cptui-table #slugexists{color:red;font-weight:700}.cptui-table #slugchanged.hidemessage,.cptui-table #slugexists.hidemessage{display:none}.cpt-ui_page_cptui_tools .cptui-table .outer p{padding:0 4px}.cptui-support #support .question{font-size:18px;font-weight:700}.cptui-support #support .question:before{content:"\f139";display:inline-block;font:normal 25px/1 dashicons;margin-left:-25px;position:absolute;-webkit-font-smoothing:antialiased}.cptui-support #support .question.active:before{content:"\f140"}.cptui-support #support .answer{margin:10px 0 0 20px}.cptui-support #support ol li{list-style:none}.cptui-support #support li{position:relative}.cptui-field-description{font-style:italic}#cptui_select_post_type,#cptui_select_taxonomy{margin-top:15px}.cptui_post_import,.cptui_tax_import{height:200px;margin-bottom:10px;resize:vertical;width:100%}.cptui_post_type_get_code,.cptui_tax_get_code{height:300px;resize:vertical}.about-wrap .cptui-feature{overflow:visible!important;*zoom:1}.about-wrap .cptui-feature:after,.about-wrap .cptui-feature:before{content:" ";display:table}.about-wrap .cptui-feature:after{clear:both}.about-wrap h3+.cptui-feature{margin-top:0}.about-wrap .changelog h2{text-align:center}.about-wrap .feature-rest div{width:50%!important;padding-right:100px;box-sizing:border-box;margin:0!important}.about-wrap .feature-rest div.last-feature{padding-left:100px;padding-right:0}.about-wrap .feature-rest div.icon{width:0!important;padding:0;margin:0}.about-wrap .feature-rest div.icon:before{font-weight:400;width:100%;font-size:170px;line-height:125px;color:#9c5d90;display:inline-block;position:relative;text-align:center;speak:none;margin:0 0 0 -100px;content:"\e01d";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rtl .about-wrap .feature-rest div{padding-left:100px}.rtl .about-wrap .feature-rest div.last-feature{padding-right:100px;padding-left:0}.rtl .about-wrap .feature-rest div.icon:before{margin:0 -100px 0 0}.about-wrap .about-integrations{background:#fff;margin:20px 0;padding:1px 20px 10px}.about-wrap .changelog h4{line-height:1.4}.about-wrap .cptui-about-text{margin-bottom:1em!important;margin-right:0;max-width:calc(100% - 173px)}.email-octopus-form-row input:-ms-input-placeholder{color:#ccc}.email-octopus-form-row input::placeholder{color:#ccc}.cptui-intro-devblock{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}#togglelabels{display:none}.js #togglelabels{display:inline-block}.cptui-help{color:#424242;margin-left:4px;opacity:.5;text-decoration:none;width:16px}fieldset .cptui-help{position:relative;top:4px}.cptui-help:hover{color:#0074a2;opacity:1}.cptui-help:focus{box-shadow:none}#menu_icon_preview{float:right;padding-left:8px}#menu_icon_preview img{display:block;height:20px;width:20px}#toplevel_page_cptui_main_menu img{height:20px;margin-top:-2px;width:20px}.visuallyhidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.cptui-spacer{display:block;margin-top:25px}.email-octopus-form-wrapper{background:#fff;margin-bottom:10px;padding:20px}.email-octopus-form-wrapper label{margin-bottom:10px}.wdsoctosignup h2{text-align:left}.wdspromos{float:right;margin-left:20px;margin-top:10px;width:275px}.wdspromos-about{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-line-pack:stretch;align-content:stretch;-ms-flex-align:start;align-items:flex-start;margin:20px 0}.wdspromos-about a:first-child,.wdspromos-about a:nth-child(2),.wdspromos-about a:nth-child(3){-ms-flex-order:0;order:0;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-item-align:auto;-ms-grid-row-align:auto;align-self:auto}.wdspromos-about p{padding:0 5px}.wdspromos-about p:first-child{padding-left:0}.wdspromos-about p:nth-child(4){padding-right:0}.no-js #cptui_choose_icon{display:none}.cptui-listings th{font-weight:700}.cptui-listings .post-type-listing th{width:16.66667%}.cptui-listings .taxonomy-listing th{width:20%}#poststuff{min-width:463px}@media screen and (min-width:769px){.cptui-badge{margin-top:-42px;height:173px;width:173px;color:#fafafa;font-weight:700;font-size:14px;text-align:center;margin-bottom:10px;background:url(../images/cptui-icon-173x173.png) no-repeat}}@media screen and (max-width:768px){.cptui-table #description{width:100%}.wdspromos-about{-ms-flex-wrap:wrap;flex-wrap:wrap}.wdspromos-about p{margin:5px auto}.wdspromos-about p:first-child{padding-left:5px}.wdspromos-about p:nth-child(4){padding-right:5px}#cptui_debug_info_email,.cptui-table td.outer{width:100%}}
1
+ .posttypesui,.taxonomiesui{width:calc(100% - 300px)}.posttypesui .cptui-section:first-child,.taxonomiesui .cptui-section:first-child{margin-top:30px}.posttypesui .postbox-container,.taxonomiesui .postbox-container{width:100%}.posttypesui .postbox .toggle-indicator:before,.taxonomiesui .postbox .toggle-indicator:before{content:"\f142";display:inline-block;font:normal 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.posttypesui .postbox.closed .handlediv .toggle-indicator:before,.taxonomiesui .postbox.closed .handlediv .toggle-indicator:before{content:"\f140"}.posttypesui .postbox .hndle,.taxonomiesui .postbox .hndle{cursor:pointer}.posttypesui .required,.taxonomiesui .required{color:red}.cptui-table td.outer{vertical-align:top;width:50%}.cptui-table input[type=text]{width:75%}.cptui-table .question:hover{cursor:pointer}.cptui-table th p{font-weight:400;font-size:12px}.cptui-table .cptui-slug-details{margin-top:15px}.cptui-table #slugchanged,.cptui-table #slugexists{color:red;font-weight:700}.cptui-table #slugchanged.hidemessage,.cptui-table #slugexists.hidemessage{display:none}.cptui-support #support .question{font-size:18px;font-weight:700}.cptui-support #support .question:before{content:"\f139";display:inline-block;font:normal 25px/1 dashicons;margin-left:-25px;position:absolute;-webkit-font-smoothing:antialiased}.cptui-support #support .question.active:before{content:"\f140"}.cptui-support #support .answer{margin:10px 0 0 20px}.cptui-support #support ol li{list-style:none}.cptui-support #support li{position:relative}.cptui-field-description{font-style:italic}#cptui_select_post_type,#cptui_select_taxonomy{margin-top:15px}.cptui_post_import,.cptui_tax_import{height:200px;margin-bottom:10px;resize:vertical;width:100%}.cptui_post_type_get_code,.cptui_tax_get_code{height:300px;resize:vertical}.about-wrap .cptui-feature{overflow:visible!important;*zoom:1}.about-wrap .cptui-feature:after,.about-wrap .cptui-feature:before{content:" ";display:table}.about-wrap .cptui-feature:after{clear:both}.about-wrap h3+.cptui-feature{margin-top:0}.about-wrap .changelog h2{text-align:center}.about-wrap .feature-rest div{width:50%!important;padding-right:100px;box-sizing:border-box;margin:0!important}.about-wrap .feature-rest div.last-feature{padding-left:100px;padding-right:0}.about-wrap .feature-rest div.icon{width:0!important;padding:0;margin:0}.about-wrap .feature-rest div.icon:before{font-weight:400;width:100%;font-size:170px;line-height:125px;color:#9c5d90;display:inline-block;position:relative;text-align:center;speak:none;margin:0 0 0 -100px;content:"\e01d";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.about-wrap .about-integrations{background:#fff;margin:20px 0;padding:1px 20px 10px}.about-wrap .changelog h4{line-height:1.4}.about-wrap .cptui-about-text{margin-bottom:1em!important;margin-right:0;max-width:calc(100% - 173px)}.email-octopus-form-row input:-ms-input-placeholder{color:#ccc}.email-octopus-form-row input::placeholder{color:#ccc}.email-octopus-form-row-hp{visibility:hidden}.cptui-intro-devblock{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.cptui-help{color:#424242;margin-left:4px;opacity:.5;text-decoration:none;width:16px}fieldset .cptui-help{position:relative;top:4px}.cptui-help:hover{color:#0074a2;opacity:1}.cptui-help:focus{box-shadow:none}#menu_icon_preview{float:right;padding-left:8px}#menu_icon_preview img{display:block;height:20px;width:20px}.visuallyhidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.cptui-spacer{display:block;margin-top:25px}.email-octopus-form-wrapper{background:#fff;margin-bottom:10px;padding:20px}.email-octopus-form-wrapper label{margin-bottom:10px}.wdsoctosignup h2{text-align:left}.wdspromos{float:right;margin-left:20px;margin-top:10px;width:275px}.wdspromos-about{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-line-pack:stretch;align-content:stretch;-ms-flex-align:start;align-items:flex-start;margin:20px 0}.wdspromos-about a:first-child,.wdspromos-about a:nth-child(2),.wdspromos-about a:nth-child(3){-ms-flex-order:0;order:0;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-item-align:auto;-ms-grid-row-align:auto;align-self:auto}.wdspromos-about p{padding:0 5px}.wdspromos-about p:first-child{padding-left:0}.wdspromos-about p:nth-child(4){padding-right:0}.no-js #cptui_choose_icon{display:none}.cptui-listings th{font-weight:700}.cptui-listings .post-type-listing th{width:16.66667%}.cptui-listings .taxonomy-listing th{width:20%}#poststuff{min-width:463px}@media screen and (min-width:769px){.cptui-badge{margin-top:-42px;height:173px;width:173px;color:#fafafa;font-weight:700;font-size:14px;text-align:center;margin-bottom:10px;background:url(../images/cptui-icon-173x173.png) no-repeat}}@media screen and (max-width:768px){.cptui-table #description{width:100%}.wdspromos-about{-ms-flex-wrap:wrap;flex-wrap:wrap}.wdspromos-about p{margin:5px auto}.wdspromos-about p:first-child{padding-left:5px}.wdspromos-about p:nth-child(4){padding-right:5px}#cptui_debug_info_email,.cptui-table td.outer{width:100%}}
css/cptui.scss CHANGED
@@ -29,19 +29,11 @@ $max-tablet: "screen and (max-width: 768px)";
29
  }
30
  }
31
  .cptui-table {
32
- #excerpt {
33
- display: inline-block;
34
- height: 16px;
35
- margin: 12px 4px 12px 0;
36
- width: auto;
37
- }
38
  td.outer {
39
  vertical-align: top;
40
  width: 50%;
41
  }
42
- input[type="text"],
43
- .cptui-new & textarea,
44
- .cptui-edit & textarea {
45
  width: 75%;
46
  }
47
  .question:hover {
@@ -63,15 +55,6 @@ $max-tablet: "screen and (max-width: 768px)";
63
  }
64
  }
65
  }
66
- .cpt-ui_page_cptui_tools {
67
- .cptui-table {
68
- .outer {
69
- p {
70
- padding: 0 4px;
71
- }
72
- }
73
- }
74
- }
75
 
76
  .cptui-support #support {
77
  .question {
@@ -173,20 +156,6 @@ $max-tablet: "screen and (max-width: 768px)";
173
  }
174
  }
175
  }
176
- .rtl {
177
- .about-wrap {
178
- .feature-rest div {
179
- padding-left: 100px;
180
- }
181
- .feature-rest div.last-feature {
182
- padding-right: 100px;
183
- padding-left: 0;
184
- }
185
- .feature-rest div.icon:before {
186
- margin: 0 -100px 0 0;
187
- }
188
- }
189
- }
190
  .about-wrap {
191
  .about-integrations {
192
  background: #fff;
@@ -209,17 +178,14 @@ $max-tablet: "screen and (max-width: 768px)";
209
  color: #cccccc;
210
  }
211
  }
 
 
 
212
  .cptui-intro-devblock{
213
  display: flex;
214
  flex-direction: row;
215
  }
216
 
217
- #togglelabels {
218
- display: none;
219
- .js & {
220
- display: inline-block;
221
- }
222
- }
223
  .cptui-help {
224
  color: #424242;
225
  margin-left: 4px;
@@ -248,13 +214,7 @@ $max-tablet: "screen and (max-width: 768px)";
248
  width: 20px;
249
  }
250
  }
251
- #toplevel_page_cptui_main_menu {
252
- img {
253
- height: 20px;
254
- margin-top: -2px;
255
- width: 20px;
256
- }
257
- }
258
  .visuallyhidden {
259
  position: absolute;
260
  left: -10000px;
29
  }
30
  }
31
  .cptui-table {
 
 
 
 
 
 
32
  td.outer {
33
  vertical-align: top;
34
  width: 50%;
35
  }
36
+ input[type="text"] {
 
 
37
  width: 75%;
38
  }
39
  .question:hover {
55
  }
56
  }
57
  }
 
 
 
 
 
 
 
 
 
58
 
59
  .cptui-support #support {
60
  .question {
156
  }
157
  }
158
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  .about-wrap {
160
  .about-integrations {
161
  background: #fff;
178
  color: #cccccc;
179
  }
180
  }
181
+ .email-octopus-form-row-hp {
182
+ visibility: hidden;
183
+ }
184
  .cptui-intro-devblock{
185
  display: flex;
186
  flex-direction: row;
187
  }
188
 
 
 
 
 
 
 
189
  .cptui-help {
190
  color: #424242;
191
  margin-left: 4px;
214
  width: 20px;
215
  }
216
  }
217
+
 
 
 
 
 
 
218
  .visuallyhidden {
219
  position: absolute;
220
  left: -10000px;
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.2
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.2' ); // Left for legacy purposes.
34
- define( 'CPTUI_VERSION', '1.8.2' );
35
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
36
 
37
  /**
@@ -172,6 +172,10 @@ add_action( 'admin_menu', 'cptui_plugin_menu' );
172
  */
173
  function cptui_loaded() {
174
 
 
 
 
 
175
  /**
176
  * Fires upon plugins_loaded WordPress hook.
177
  *
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.0
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.0' ); // Left for legacy purposes.
34
+ define( 'CPTUI_VERSION', '1.9.0' );
35
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
36
 
37
  /**
172
  */
173
  function cptui_loaded() {
174
 
175
+ if ( class_exists( 'WPGraphQL' ) ) {
176
+ require_once plugin_dir_path( __FILE__ ) . 'external/wpgraphql.php';
177
+ }
178
+
179
  /**
180
  * Fires upon plugins_loaded WordPress hook.
181
  *
external/wpgraphql.php ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace CPTUI;
4
+
5
+ if ( ! defined( 'ABSPATH' ) ) {
6
+ exit;
7
+ }
8
+
9
+ /**
10
+ * This class creates settings for Custom Post Type UI to show Custom Post Types in GraphQL
11
+ */
12
+ class CPTUI_GraphQL {
13
+
14
+ /**
15
+ * @var bool
16
+ */
17
+ protected $show_in_graphql = false;
18
+
19
+ /**
20
+ * @var string
21
+ */
22
+ protected $graphql_single_name = '';
23
+
24
+ /**
25
+ * @var string
26
+ */
27
+ protected $graphql_plural_name = '';
28
+
29
+ /**
30
+ * Initializes the plugin functionality
31
+ */
32
+ public function init() {
33
+
34
+ // Post Types
35
+ add_action( 'cptui_post_type_after_fieldsets', [ $this, 'add_graphql_post_type_settings' ], 10, 1 );
36
+ add_filter( 'cptui_before_update_post_type', [ $this, 'before_update_post_type' ], 10, 2 );
37
+ add_filter( 'cptui_pre_register_post_type', [ $this, 'add_graphql_settings_to_registry' ], 10, 3 );
38
+ add_filter( 'cptui_pre_save_post_type', [ $this, 'save_graphql_settings' ], 10, 2 );
39
+
40
+ // Taxonomies
41
+ add_action( 'cptui_taxonomy_after_fieldsets', [ $this, 'add_taxonomy_graphql_settings' ], 10, 1 );
42
+ add_filter( 'cptui_before_update_taxonomy', [ $this, 'before_update_taxonomy' ], 10, 2 );
43
+ add_filter( 'cptui_pre_register_taxonomy', [ $this, 'add_graphql_settings_to_registry' ], 10, 3 );
44
+ add_filter( 'cptui_pre_save_taxonomy', [ $this, 'save_graphql_settings' ], 10, 2 );
45
+ }
46
+
47
+ /**
48
+ * Adds the GraphQL Settings from CPT UI to the post_type and taxonomy registry args.
49
+ *
50
+ * @param array $args The args for the registry
51
+ * @param string $name The name of the type
52
+ * @param array $type The array that composes the Type
53
+ *
54
+ * @return array
55
+ */
56
+ public function add_graphql_settings_to_registry( $args, $name, $type ) {
57
+
58
+ // If the type is not set to show_in_graphql, return the args as-is
59
+ if ( ! isset( $type['show_in_graphql'] ) || true !== (bool) $type['show_in_graphql'] ) {
60
+ return $args;
61
+ }
62
+
63
+ // If the type has no graphql_plural_name, return the args as-is, but
64
+ // add a message to the debug log for why the Type is not in the Schema
65
+ if ( ! isset( $type['graphql_plural_name'] ) || empty( $type['graphql_plural_name'] ) ) {
66
+ graphql_debug( sprintf( __( 'The graphql_plural_name is empty for the "%s" Post Type or Taxonomy registered by Custom Post Type UI.' ), $type['name'] ) );
67
+
68
+ return $args;
69
+ }
70
+
71
+ // If the type has no graphql_single_name, return the args as-is, but
72
+ // add a message to the debug log for why the Type is not in the Schema
73
+ if ( ! isset( $type['graphql_single_name'] ) || empty( $type['graphql_single_name'] ) ) {
74
+ graphql_debug( sprintf( __( 'The graphql_single_name is empty for the "%s" Post Type or Taxonomy registered by Custom Post Type UI.' ), $type['name'] ) );
75
+
76
+ return $args;
77
+ }
78
+
79
+
80
+ $args['show_in_graphql'] = isset( $type['show_in_graphql'] ) ? (bool) $type['show_in_graphql'] : false;
81
+ $args['graphql_single_name'] = ! empty( $type['graphql_single_name'] ) ? $type['graphql_single_name'] : null;
82
+ $args['graphql_plural_name'] = ! empty( $type['graphql_plural_name'] ) ? $type['graphql_plural_name'] : null;
83
+
84
+ return $args;
85
+ }
86
+
87
+ /**
88
+ * Capture post type settings from form submission for saving
89
+ *
90
+ * @param array $data
91
+ */
92
+ public function before_update_post_type( $data ) {
93
+ $this->show_in_graphql = isset( $data['cpt_custom_post_type']['show_in_graphql'] ) ? $data['cpt_custom_post_type']['show_in_graphql'] : false;
94
+ $this->graphql_single_name = isset( $data['cpt_custom_post_type']['graphql_single_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_post_type']['graphql_single_name'] ) : '';
95
+ $this->graphql_plural_name = isset( $data['cpt_custom_post_type']['graphql_plural_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_post_type']['graphql_plural_name'] ) : '';
96
+ }
97
+
98
+ /**
99
+ * Capture taxonomy settings from form submission for saving
100
+ *
101
+ * @param array $data
102
+ */
103
+ public function before_update_taxonomy( $data ) {
104
+ $this->show_in_graphql = isset( $data['cpt_custom_tax']['show_in_graphql'] ) ? $data['cpt_custom_tax']['show_in_graphql'] : false;
105
+ $this->graphql_single_name = isset( $data['cpt_custom_tax']['graphql_single_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_tax']['graphql_single_name'] ) : '';
106
+ $this->graphql_plural_name = isset( $data['cpt_custom_tax']['graphql_plural_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_tax']['graphql_plural_name'] ) : '';
107
+ }
108
+
109
+ /**
110
+ * Save values from form submission
111
+ *
112
+ * @param array $type
113
+ * @param string $name
114
+ *
115
+ * @return array
116
+ */
117
+ public function save_graphql_settings( $type, $name ) {
118
+ $type[ $name ]['show_in_graphql'] = $this->show_in_graphql;
119
+ $type[ $name ]['graphql_single_name'] = \WPGraphQL\Utils\Utils::format_type_name( $this->graphql_single_name );
120
+ $type[ $name ]['graphql_plural_name'] = \WPGraphQL\Utils\Utils::format_type_name( $this->graphql_plural_name );
121
+
122
+ return $type;
123
+ }
124
+
125
+ /**
126
+ * Add settings fields to Custom Post Type UI form
127
+ *
128
+ * @param cptui_admin_ui $ui Admin UI instance
129
+ */
130
+ public function add_graphql_post_type_settings( $ui ) {
131
+ $tab = ( ! empty( $_GET ) && ! empty( $_GET['action'] ) && 'edit' === $_GET['action'] ) ? 'edit' : 'new';
132
+ $current = [];
133
+ $name_array = 'cpt_custom_post_type';
134
+ if ( 'edit' === $tab ) {
135
+ $post_types = cptui_get_post_type_data();
136
+ $selected_post_type = cptui_get_current_post_type( false );
137
+ if ( $selected_post_type ) {
138
+ if ( array_key_exists( $selected_post_type, $post_types ) ) {
139
+ $current = $post_types[ $selected_post_type ];
140
+ }
141
+ }
142
+ }
143
+ echo $this->get_setting_fields( $ui, $current, $name_array );
144
+ }
145
+
146
+ /**
147
+ * Add settings fields to Custom Post Type UI form
148
+ *
149
+ * @param cptui_admin_ui $ui Admin UI instance
150
+ */
151
+ public function add_taxonomy_graphql_settings( $ui ) {
152
+ $tab = ( ! empty( $_GET ) && ! empty( $_GET['action'] ) && 'edit' === $_GET['action'] ) ? 'edit' : 'new';
153
+ $name_array = 'cpt_custom_tax';
154
+ $current = [];
155
+ if ( 'edit' === $tab ) {
156
+ $taxonomies = cptui_get_taxonomy_data();
157
+ $selected_taxonomy = cptui_get_current_taxonomy( false );
158
+ if ( $selected_taxonomy ) {
159
+ if ( array_key_exists( $selected_taxonomy, $taxonomies ) ) {
160
+ $current = $taxonomies[ $selected_taxonomy ];
161
+ }
162
+ }
163
+ }
164
+ echo $this->get_setting_fields( $ui, $current, $name_array );
165
+ }
166
+
167
+ /**
168
+ * Get the settings fields to render for the form
169
+ *
170
+ * @param cptui_admin_ui $ui Admin UI instance
171
+ * @param array $current
172
+ * @param string $name_array
173
+ */
174
+ public function get_setting_fields( $ui, $current, $name_array ) {
175
+ ?>
176
+ <div class="cptui-section postbox">
177
+ <div class="postbox-header">
178
+
179
+ <h2 class="hndle ui-sortable-handle">
180
+ <span><?php esc_html_e( 'WPGraphQL', 'wp-graphql-custom-post-type-ui' ); ?></span>
181
+ </h2>
182
+ <div class="handle-actions hide-if-no-js">
183
+ <button type="button" class="handlediv">
184
+ <span class="screen-reader-text"><?php esc_html_e( 'Toggle panel: GraphQL Settings', 'wp-graphql-custom-post-type-ui' ); ?></span>
185
+ <span class="toggle-indicator" aria-hidden="true"></span>
186
+ </button>
187
+ </div>
188
+ </div>
189
+ <div class="inside">
190
+ <div class="main">
191
+ <table class="form-table cptui-table">
192
+ <?php
193
+
194
+ $selections = [
195
+ 'options' => [
196
+ [
197
+ 'attr' => '0',
198
+ 'text' => esc_attr__( 'False', 'wp-graphql-custom-post-type-ui' )
199
+ ],
200
+ [
201
+ 'attr' => '1',
202
+ 'text' => esc_attr__( 'True', 'wp-graphql-custom-post-type-ui' ),
203
+ ],
204
+ ],
205
+ ];
206
+
207
+ $selected = ( isset( $current ) && ! empty( $current['show_in_graphql'] ) ) ? disp_boolean( $current['show_in_graphql'] ) : '';
208
+ $selections['selected'] = ( ! empty( $selected ) && ! empty( $current['show_in_graphql'] ) ) ? $current['show_in_graphql'] : '0';
209
+
210
+
211
+ echo $ui->get_select_input( [
212
+ 'namearray' => $name_array,
213
+ 'name' => 'show_in_graphql',
214
+ 'labeltext' => esc_html__( 'Show in GraphQL', 'wp-graphql-custom-post-type-ui' ),
215
+ 'aftertext' => esc_html__( 'Whether or not to show data of this type in the WPGraphQL. Default: false', 'wp-graphql-custom-post-type-ui' ),
216
+ 'selections' => $selections,
217
+ 'default' => false,
218
+ 'required' => true,
219
+ ] );
220
+
221
+
222
+ echo $ui->get_text_input( [
223
+ 'namearray' => $name_array,
224
+ 'name' => 'graphql_single_name',
225
+ 'labeltext' => esc_html__( 'GraphQL Single Name', 'wp-graphql-custom-post-type-ui' ),
226
+ 'aftertext' => esc_attr__( 'Singular name for reference in the GraphQL API.', 'wp-graphql-custom-post-type-ui' ),
227
+ 'textvalue' => ( isset( $current['graphql_single_name'] ) ) ? esc_attr( $current['graphql_single_name'] ) : '',
228
+ 'required' => true,
229
+ ] );
230
+
231
+ echo $ui->get_text_input( [
232
+ 'namearray' => $name_array,
233
+ 'name' => 'graphql_plural_name',
234
+ 'labeltext' => esc_html__( 'GraphQL Plural Name', 'wp-graphql-custom-post-type-ui' ),
235
+ 'aftertext' => esc_attr__( 'Plural name for reference in the GraphQL API.', 'wp-graphql-custom-post-type-ui' ),
236
+ 'textvalue' => ( isset( $current['graphql_plural_name'] ) ) ? esc_attr( $current['graphql_plural_name'] ) : '',
237
+ 'required' => true,
238
+ ] );
239
+ ?>
240
+ </table>
241
+ </div>
242
+ </div>
243
+ </div>
244
+ <?php
245
+ $this->graphql_field_helpers();
246
+ }
247
+
248
+ /**
249
+ * JavaScript helpers to add conditional logic and support for the GraphQL setting fields
250
+ */
251
+ public function graphql_field_helpers() {
252
+ // This script provides helpers for the GraphQL fields in the CPT UI screen.
253
+ // If the Post Type or Taxonomy is not set to show_in_graphql the single/plural names
254
+ // should not be required.
255
+ ?>
256
+ <script type="application/javascript">
257
+ let singleName = document.getElementById('graphql_single_name');
258
+ let singleNameRow = singleName.closest('tr');
259
+ let pluralName = document.getElementById('graphql_plural_name');
260
+ let pluralNameRow = pluralName.closest('tr');
261
+ let showInGraphQL = document.getElementById('show_in_graphql');
262
+ let label = document.getElementById('label');
263
+ let singleLabel = document.getElementById('singular_label');
264
+
265
+ // Set the values of the GraphQL fields and their display state
266
+ function updateGraphQlFields() {
267
+
268
+ // Set default state for field values and display state
269
+ // If the show_in_graphql value is true (or '1') show the
270
+ // fields and set them as required
271
+ // Else hide the fields and leave them as not-required
272
+ if (showInGraphQL.value === '1') {
273
+ singleName.required = true;
274
+ pluralName.required = true;
275
+ pluralNameRow.style.display = "table-row";
276
+ singleNameRow.style.display = "table-row";
277
+ } else {
278
+ singleName.required = false;
279
+ pluralName.required = false;
280
+ pluralNameRow.style.display = "none";
281
+ singleNameRow.style.display = "none";
282
+ }
283
+
284
+ // If single_name has no value, but single_label does, use single_label as the value
285
+ if (!singleName.value.length) {
286
+ singleName.value = singleLabel.value;
287
+ }
288
+
289
+ // If single_name has no value, but single_label does, use single_label as the value
290
+ if (!pluralName.value.length) {
291
+ pluralName.value = label.value;
292
+ }
293
+ }
294
+
295
+ // Once the DOM is ready, listen for events
296
+ document.addEventListener("DOMContentLoaded", function () {
297
+ updateGraphQlFields();
298
+ // When the show in graphql field changes, re-apply GraphQL Field Values
299
+ showInGraphQL.addEventListener('input', function () {
300
+ updateGraphQlFields();
301
+ });
302
+ });
303
+ </script>
304
+ <?php
305
+ }
306
+ }
307
+
308
+ /**
309
+ * Load WPGraphQL for CPT UI
310
+ */
311
+ add_action( 'cptui_loaded', __NAMESPACE__ . '\cptui_graphql_init' );
312
+
313
+ function cptui_graphql_init() {
314
+ if ( class_exists( 'WPGraphQL_CPT_UI' ) ) {
315
+ add_action( 'admin_notices', function () {
316
+ $link = trailingslashit( admin_url() ) . 'plugins.php';
317
+ ?>
318
+ <div class="notice notice-error">
319
+ <p><?php echo sprintf( __( 'Custom Post Type UI has native support for WPGraphQL. Please <a href="%s">de-active</a> the "WPGraphQL for Custom Post Type UI" extension to proceed.', 'custom-post-type-ui' ), $link ); ?></p>
320
+ </div>
321
+ <?php
322
+ } );
323
+
324
+ return;
325
+ }
326
+
327
+ $wpgraphql_cpt_ui = new CPTUI_GraphQL();
328
+ $wpgraphql_cpt_ui->init();
329
+ }
inc/about.php CHANGED
@@ -85,12 +85,13 @@ function cptui_settings() {
85
  <div class="changelog about-integrations">
86
  <div class="cptui-feature feature-section col three-col">
87
  <div class="col">
88
- <h2><?php esc_html_e( 'Ability to set a default term for a custom taxonomy.', 'custom-post-type-ui' ); ?></h2>
89
- <p><?php esc_html_e( 'WordPress 5.5 added the ability to set a default term to your custom taxonomy, and now you do not have to worry about extra coding for that with Custom Post Type UI.', 'custom-post-type-ui' ); ?></p>
90
- </div>
91
- <div class="col last-feature">
92
- <h2><?php esc_html_e( 'Removed forced underscores for post type slugs.', 'custom-post-type-ui' ); ?></h2>
93
- <p><?php esc_html_e( 'Post types are actually able to have dashes in their slug/name value, so we have removed the forcing of underscores for them. Taxonomies do still need underscores, until told otherwise.', 'custom-post-type-ui' ); ?></p>
 
94
  </div>
95
  </div>
96
  </div>
85
  <div class="changelog about-integrations">
86
  <div class="cptui-feature feature-section col three-col">
87
  <div class="col">
88
+ <h2><?php esc_html_e( 'Built-in WPGraphQL support options.', 'custom-post-type-ui' ); ?></h2>
89
+ <p><?php esc_html_e( 'If you have the WPGraphQL plugin installed and active, you will no longer need their Custom Post Type UI extension to register GraphQL support with your post types and taxonomies.', 'custom-post-type-ui' ); ?></p>
90
+ <p><?php printf(
91
+ esc_html__( 'Visit the %1$sWPGraphQL plugin page%2$s to acquire your own copy.', 'custom-post-type-ui' ),
92
+ sprintf( '<a href="%s">', esc_url( 'https://wordpress.org/plugins/wp-graphql/' ) ),
93
+ '</a>'
94
+ ); ?></p>
95
  </div>
96
  </div>
97
  </div>
inc/listings.php CHANGED
@@ -234,7 +234,7 @@ function cptui_listings() {
234
  </p>
235
 
236
  <p>
237
- <?php esc_html_e( '*Replace "post_slug" with the slug of the actual post slug.', 'custom-post-type-ui' ); ?>
238
  </p>
239
 
240
  <p>
234
  </p>
235
 
236
  <p>
237
+ <?php esc_html_e( '*Replace "post_slug" with the slug of the actual post.', 'custom-post-type-ui' ); ?>
238
  </p>
239
 
240
  <p>
inc/post-types.php CHANGED
@@ -1955,7 +1955,6 @@ function cptui_process_post_type() {
1955
  add_filter( 'cptui_post_type_deleted', '__return_true' );
1956
  }
1957
 
1958
- // @TODO Utilize anonymous function to admin_notice `$result` if it happens to error.
1959
  if ( $result ) {
1960
  if ( is_callable( "cptui_{$result}_admin_notice" ) ) {
1961
  add_action( 'admin_notices', "cptui_{$result}_admin_notice" );
1955
  add_filter( 'cptui_post_type_deleted', '__return_true' );
1956
  }
1957
 
 
1958
  if ( $result ) {
1959
  if ( is_callable( "cptui_{$result}_admin_notice" ) ) {
1960
  add_action( 'admin_notices', "cptui_{$result}_admin_notice" );
inc/taxonomies.php CHANGED
@@ -1604,6 +1604,7 @@ function cptui_reserved_taxonomies() {
1604
  'term',
1605
  'theme',
1606
  'type',
 
1607
  'w',
1608
  'withcomments',
1609
  'withoutcomments',
@@ -1740,7 +1741,6 @@ function cptui_process_taxonomy() {
1740
  add_filter( 'cptui_taxonomy_deleted', '__return_true' );
1741
  }
1742
 
1743
- // @TODO Utilize anonymous function to admin_notice `$result` if it happens to error.
1744
  if ( $result && is_callable( "cptui_{$result}_admin_notice" ) ) {
1745
  add_action( 'admin_notices', "cptui_{$result}_admin_notice" );
1746
  }
1604
  'term',
1605
  'theme',
1606
  'type',
1607
+ 'types',
1608
  'w',
1609
  'withcomments',
1610
  'withoutcomments',
1741
  add_filter( 'cptui_taxonomy_deleted', '__return_true' );
1742
  }
1743
 
 
1744
  if ( $result && is_callable( "cptui_{$result}_admin_notice" ) ) {
1745
  add_action( 'admin_notices', "cptui_{$result}_admin_notice" );
1746
  }
inc/utility.php CHANGED
@@ -395,7 +395,7 @@ function cptui_newsletter_form() {
395
  <input type="hidden"
396
  name="successRedirectUrl"
397
  value="">
398
- <button type="submit">Subscribe</button>
399
  </div>
400
  </form>
401
  </div>
@@ -927,6 +927,10 @@ function cptui_post_type_supports( $post_type, $feature ) {
927
  * @param array $post_types Array of CPTUI post types.
928
  */
929
  function cptui_published_post_format_fix( $post_types ) {
 
 
 
 
930
  foreach ( $post_types as $type ) {
931
  if ( in_array( 'post-formats', $type['supports'], true ) ) {
932
  add_post_type_support( $type['name'], 'post-formats' );
395
  <input type="hidden"
396
  name="successRedirectUrl"
397
  value="">
398
+ <button type="submit" class="button button-secondary">Subscribe</button>
399
  </div>
400
  </form>
401
  </div>
927
  * @param array $post_types Array of CPTUI post types.
928
  */
929
  function cptui_published_post_format_fix( $post_types ) {
930
+ if ( empty( $post_types ) || ! is_array( $post_types ) ) {
931
+ return;
932
+ }
933
+
934
  foreach ( $post_types as $type ) {
935
  if ( in_array( 'post-formats', $type['supports'], true ) ) {
936
  add_post_type_support( $type['name'], 'post-formats' );
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.6.0
7
- Stable tag: 1.8.2
8
  License: GPL-2.0+
9
  Requires PHP: 5.6
10
 
@@ -31,6 +31,13 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
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.
@@ -45,40 +52,15 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
45
  * Updated: Removed the forcing of underscores for post type slugs. Taxonomies are still forced.
46
  * Fixed: jQuery compatibility issue with WordPress 5.5.0
47
 
48
- = 1.7.5 - 2020-08-11 =
49
- * Updated: Addressed UI issues with WordPress 5.5.0
50
- * Updated: Moved required minimum WordPress version to 5.5.0
51
-
52
- = 1.7.4 - 2020-03-17 =
53
- * Added: Nonce admin verification for import functionality.
54
- * Added: Extra escaping of markup and output for "Get Code" areas.
55
-
56
- = 1.7.3 - 2020-02-05 =
57
- * Updated: styles and appearance to better match WordPress core.
58
- * Updated: Change newsletter service integration. Hey, sign up for our newsletter! Props @Oceas
59
-
60
- = 1.7.2 - 2020-01-08 =
61
- * Fixed: Duplicate entries for "delete_with_user" in get code.
62
- * Fixed: Delete button for post types and taxonomies at bottom of page did not trigger dialog prompt.
63
-
64
- = 1.7.1 - 2019-11-06 =
65
- * Fixed: Random-ish redirects to the "Add new" tab for post types or taxonomies
66
- * Fixed: JavaScript error when trying to delete a taxonomy.
67
-
68
- = 1.7.0 - 2019-11-06 =
69
- * Actually added this time: Delete with user support for post types. Managed to miss the code with 1.6.0 which was a long time ago.
70
- * Added: Ability to disable registration of post types or taxonomies, via code filter, without deleting them completely from settings.
71
- * Added: New post type labels introduced in WordPress 5.0.0.
72
- * Added: Link to Dashicon documentation for when editing menu icon. Props @juliekuehl
73
- * Added: Ability to automatically fill in additional labels based on chosen plural and singular label text.
74
- * Updated: Added post type templates documentation to help section.
75
- * Updated: Redirect user to the "add" tab if deleting the last post type or taxonomy created.
76
- * Updated: Touched up tab markup to match semantic improvements provided by WordPress 5.2.0.
77
- * Fixed: potential duplicate output of "parent_item_colon" with "Get Code" output.
78
- * Misc: Added code of conduct file to github repo. Props GaryJones.
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.
@@ -93,38 +75,6 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
93
  * Updated: Removed the forcing of underscores for post type slugs. Taxonomies are still forced.
94
  * Fixed: jQuery compatibility issue with WordPress 5.5.0
95
 
96
- = 1.7.5 - 2020-08-11 =
97
- * Updated: Addressed UI issues with WordPress 5.5.0
98
- * Updated: Moved required minimum WordPress version to 5.5.0
99
-
100
- = 1.7.4 - 2020-03-17 =
101
- * Added: Nonce admin verification for import functionality.
102
- * Added: Extra escaping of markup and output for "Get Code" areas.
103
-
104
- = 1.7.3 - 2020-02-05 =
105
- * Updated: styles and appearance to better match WordPress core.
106
- * Updated: Change newsletter service integration. Hey, sign up for our newsletter! Props @Oceas
107
-
108
- = 1.7.2 - 2020-01-08 =
109
- * Fixed: Duplicate entries for "delete_with_user" in get code.
110
- * Fixed: Delete button for post types and taxonomies at bottom of page did not trigger dialog prompt.
111
-
112
- = 1.7.1 - 2019-11-06 =
113
- * Fixed: Random-ish redirects to the "Add new" tab for post types or taxonomies
114
- * Fixed: JavaScript error when trying to delete a taxonomy.
115
-
116
- = 1.7.0 - 2019-11-06 =
117
- * Actually added this time: Delete with user support for post types. Managed to miss the code with 1.6.0 which was a long time ago.
118
- * Added: Ability to disable registration of post types or taxonomies, via code filter, without deleting them completely from settings.
119
- * Added: New post type labels introduced in WordPress 5.0.0.
120
- * Added: Link to Dashicon documentation for when editing menu icon. Props @juliekuehl
121
- * Added: Ability to automatically fill in additional labels based on chosen plural and singular label text.
122
- * Updated: Added post type templates documentation to help section.
123
- * Updated: Redirect user to the "add" tab if deleting the last post type or taxonomy created.
124
- * Updated: Touched up tab markup to match semantic improvements provided by WordPress 5.2.0.
125
- * Fixed: potential duplicate output of "parent_item_colon" with "Get Code" output.
126
- * Misc: Added code of conduct file to github repo. Props GaryJones.
127
-
128
  == Installation ==
129
 
130
  = Admin Installer via search =
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.0
7
+ Stable tag: 1.9.0
8
  License: GPL-2.0+
9
  Requires PHP: 5.6
10
 
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.
37
+ * Updated: Cleaned up unused CSS.
38
+ * Updated: Added `types` to disallowed taxonomy slugs.
39
+ * Updated: Amended some helper text on the listings page regarding templates. Props @tarecord
40
+
41
  = 1.8.2 - 2020-12-29 =
42
  * Fixed: Addressed some missing available labels for taxonomies.
43
  * Updated: Provide page slug and link to page if a post type slug is matching an existing page.
52
  * Updated: Removed the forcing of underscores for post type slugs. Taxonomies are still forced.
53
  * Fixed: jQuery compatibility issue with WordPress 5.5.0
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.
60
+ * Updated: Cleaned up unused CSS.
61
+ * Updated: Added `types` to disallowed taxonomy slugs.
62
+ * Updated: Amended some helper text on the listings page regarding templates. Props @tarecord
63
+
64
  = 1.8.2 - 2020-12-29 =
65
  * Fixed: Addressed some missing available labels for taxonomies.
66
  * Updated: Provide page slug and link to page if a post type slug is matching an existing page.
75
  * Updated: Removed the forcing of underscores for post type slugs. Taxonomies are still forced.
76
  * Fixed: jQuery compatibility issue with WordPress 5.5.0
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  == Installation ==
79
 
80
  = Admin Installer via search =