Changeset 1841353
- Timestamp:
- 03/16/2018 12:37:46 PM (8 years ago)
- Location:
- custom-post-type-maker
- Files:
-
- 4 edited
- 6 copied
-
tags/1.1.5 (copied) (copied from custom-post-type-maker/trunk)
-
tags/1.1.5/CHANGELOG.md (copied) (copied from custom-post-type-maker/trunk/CHANGELOG.md) (1 diff)
-
tags/1.1.5/README.md (copied) (copied from custom-post-type-maker/trunk/README.md) (1 diff)
-
tags/1.1.5/custom-post-type-maker.php (copied) (copied from custom-post-type-maker/trunk/custom-post-type-maker.php) (15 diffs)
-
tags/1.1.5/lang (copied) (copied from custom-post-type-maker/trunk/lang)
-
tags/1.1.5/readme.txt (copied) (copied from custom-post-type-maker/trunk/readme.txt) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/custom-post-type-maker.php (modified) (15 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-type-maker/tags/1.1.5/CHANGELOG.md
r1836611 r1841353 1 1 ## Changelog 2 3 ### 1.1.5 4 - Add ability to show custom post in REST API (Thanks @asithade)[#14](https://github.com/Graffino/Custom-Post-Type-Maker/issues/14). 2 5 3 6 ### 1.1.4 -
custom-post-type-maker/tags/1.1.5/README.md
r1836611 r1841353 23 23 24 24 ## Changelog 25 26 ### 1.1.5 27 - Add ability to show custom post in REST API (Thanks @asithade)[#14](https://github.com/Graffino/Custom-Post-Type-Maker/issues/14). 25 28 26 29 ### 1.1.4 -
custom-post-type-maker/tags/1.1.5/custom-post-type-maker.php
r1836611 r1841353 4 4 Plugin URI: https://github.com/Graffino/custom-post-type-maker-ui 5 5 Description: Custom Post Type Maker lets you create Custom Post Types and custom Taxonomies in a user friendly way. 6 Version: 1.1. 46 Version: 1.1.5 7 7 Author: Graffino 8 8 Author URI: http://www.graffino.com/ … … 22 22 /** 23 23 * @author Zeno Popovici <zeno@graffino.com> 24 * @copyright Copyright (c) 201 6, Graffino24 * @copyright Copyright (c) 2018, Graffino 25 25 * @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2 26 26 * @package Custom_Post_Types_Maker 27 * @version 1.1. 427 * @version 1.1.5 28 28 */ 29 29 … … 59 59 $this->dir = plugins_url( '', __FILE__ ); 60 60 $this->path = plugin_dir_path( __FILE__ ); 61 $this->version = '1.1. 4';61 $this->version = '1.1.5'; 62 62 63 63 // actions … … 256 256 $cptm_pages = ( array_key_exists( 'cptm_pages', $cptm_meta ) && $cptm_meta['cptm_pages'][0] == '1' ? true : false ); 257 257 $cptm_query_var = ( array_key_exists( 'cptm_query_var', $cptm_meta ) && $cptm_meta['cptm_query_var'][0] == '1' ? true : false ); 258 $cptm_show_in_rest = ( array_key_exists( 'cptm_show_in_rest', $cptm_meta ) && $cptm_meta['cptm_show_in_rest'][0] == '1' ? true : false ); 258 259 259 260 // If it doesn't exist, it must be set to true ( fix for existing installs ) … … 297 298 'cptm_rewrite' => $cptm_rewrite_options, 298 299 'cptm_query_var' => (bool) $cptm_query_var, 300 'cptm_show_in_rest' => (bool) $cptm_show_in_rest, 299 301 'cptm_publicly_queryable' => (bool) $cptm_publicly_queryable, 300 302 'cptm_show_in_menu' => (bool) $cptm_show_in_menu, … … 334 336 'show_in_menu' => $cptm_post_type['cptm_show_in_menu'], 335 337 'query_var' => $cptm_post_type['cptm_query_var'], 338 'show_in_rest' => $cptm_post_type['cptm_show_in_rest'], 336 339 'publicly_queryable' => $cptm_post_type['cptm_publicly_queryable'], 337 340 '_builtin' => false, … … 371 374 $cptm_tax_rewrite = ( array_key_exists( 'cptm_tax_rewrite', $cptm_meta ) && $cptm_meta['cptm_tax_rewrite'][0] == '1' ? array( 'slug' => _x( $cptm_tax_custom_rewrite_slug, 'URL Slug', 'custom-post-type-maker' ) ) : false ); 372 375 $cptm_tax_query_var = ( array_key_exists( 'cptm_tax_query_var', $cptm_meta ) && $cptm_meta['cptm_tax_query_var'][0] == '1' ? true : false ); 376 $cptm_tax_show_in_rest = ( array_key_exists( 'cptm_tax_show_in_rest', $cptm_meta ) && $cptm_meta['cptm_tax_show_in_rest'][0] == '1' ? true : false ); 373 377 $cptm_tax_show_admin_column = ( array_key_exists( 'cptm_tax_show_admin_column', $cptm_meta ) && $cptm_meta['cptm_tax_show_admin_column'][0] == '1' ? true : false ); 374 378 … … 387 391 'cptm_tax_rewrite' => $cptm_tax_rewrite, 388 392 'cptm_tax_query_var' => (bool) $cptm_tax_query_var, 393 'cptm_tax_show_in_rest' => (bool) $cptm_tax_show_in_rest, 389 394 'cptm_tax_show_admin_column' => (bool) $cptm_tax_show_admin_column, 390 395 'cptm_tax_builtin_taxonomies' => unserialize( $cptm_tax_post_types ), … … 420 425 'hierarchical' => $cptm_taxonomy['cptm_tax_hierarchical'], 421 426 'query_var' => $cptm_taxonomy['cptm_tax_query_var'], 427 'show_in_rest' => $cptm_taxonomy['cptm_tax_show_in_rest'], 422 428 'show_admin_column' => $cptm_taxonomy['cptm_tax_show_admin_column'], 423 429 ); … … 500 506 $cptm_pages = isset( $values['cptm_pages'] ) ? esc_attr( $values['cptm_pages'][0] ) : ''; 501 507 $cptm_query_var = isset( $values['cptm_query_var'] ) ? esc_attr( $values['cptm_query_var'][0] ) : ''; 508 $cptm_show_in_rest = isset( $values['cptm_show_in_rest'] ) ? esc_attr( $values['cptm_show_in_rest'][0] ) : ''; 502 509 $cptm_publicly_queryable = isset( $values['cptm_publicly_queryable'] ) ? esc_attr( $values['cptm_publicly_queryable'][0] ) : ''; 503 510 $cptm_show_in_menu = isset( $values['cptm_show_in_menu'] ) ? esc_attr( $values['cptm_show_in_menu'][0] ) : ''; … … 784 791 <tr> 785 792 <td class="label"> 793 <label for="cptm_show_in_rest"><?php _e( 'Show in REST', 'custom-post-type-maker' ); ?></label> 794 <p><?php _e( 'Sets the show_in_rest key for this post type.', 'custom-post-type-maker' ); ?></p> 795 </td> 796 <td> 797 <select name="cptm_show_in_rest" id="cptm_show_in_rest" tabindex="18"> 798 <option value="1" <?php selected( $cptm_show_in_rest, '1' ); ?>><?php _e( 'True', 'custom-post-type-maker' ); ?> (<?php _e( 'default', 'custom-post-type-maker' ); ?>)</option> 799 <option value="0" <?php selected( $cptm_show_in_rest, '0' ); ?>><?php _e( 'False', 'custom-post-type-maker' ); ?></option> 800 </select> 801 </td> 802 </tr> 803 <tr> 804 <td class="label"> 786 805 <label for="cptm_publicly_queryable"><?php _e( 'Publicly Queryable', 'custom-post-type-maker' ); ?></label> 787 806 <p><?php _e( 'Whether the post is visible on the front-end.', 'custom-post-type-maker' ); ?></p> … … 849 868 $cptm_tax_rewrite = isset( $values['cptm_tax_rewrite'] ) ? esc_attr( $values['cptm_tax_rewrite'][0] ) : ''; 850 869 $cptm_tax_query_var = isset( $values['cptm_tax_query_var'] ) ? esc_attr( $values['cptm_tax_query_var'][0] ) : ''; 870 $cptm_tax_show_in_rest = isset( $values['cptm_tax_show_in_rest'] ) ? esc_attr( $values['cptm_tax_show_in_rest'][0] ) : ''; 851 871 $cptm_tax_show_admin_column = isset( $values['cptm_tax_show_admin_column'] ) ? esc_attr( $values['cptm_tax_show_admin_column'][0] ) : ''; 852 872 … … 963 983 <tr> 964 984 <td class="label"> 985 <label for="cptm_tax_show_in_rest"><?php _e( 'Show in REST', 'custom-post-type-maker' ); ?></label> 986 <p><?php _e( 'Sets the show_in_rest key for this taxonomy.', 'custom-post-type-maker' ); ?></p> 987 </td> 988 <td> 989 <select name="cptm_tax_show_in_rest" id="cptm_tax_show_in_rest" tabindex="8"> 990 <option value="1" <?php selected( $cptm_tax_show_in_rest, '1' ); ?>><?php _e( 'True', 'custom-post-type-maker' ); ?> (<?php _e( 'default', 'custom-post-type-maker' ); ?>)</option> 991 <option value="0" <?php selected( $cptm_tax_show_in_rest, '0' ); ?>><?php _e( 'False', 'custom-post-type-maker' ); ?></option> 992 </select> 993 </td> 994 <tr> 995 <td class="label"> 965 996 <label for="cptm_tax_show_admin_column"><?php _e( 'Admin Column', 'custom-post-type-maker' ); ?></label> 966 997 <p><?php _e( 'Show this taxonomy as a column in the custom post listing.', 'custom-post-type-maker' ); ?></p> … … 1068 1099 update_post_meta( $post_id, 'cptm_query_var', esc_attr( $_POST['cptm_query_var'] ) ); 1069 1100 1101 if ( isset( $_POST['cptm_show_in_rest'] ) ) 1102 update_post_meta( $post_id, 'cptm_show_in_rest', esc_attr( $_POST['cptm_show_in_rest'] ) ); 1103 1070 1104 if ( isset( $_POST['cptm_publicly_queryable'] ) ) 1071 1105 update_post_meta( $post_id, 'cptm_publicly_queryable', esc_attr( $_POST['cptm_publicly_queryable'] ) ); … … 1107 1141 if ( isset( $_POST['cptm_tax_query_var'] ) ) 1108 1142 update_post_meta( $post_id, 'cptm_tax_query_var', esc_attr( $_POST['cptm_tax_query_var'] ) ); 1143 1144 if ( isset( $_POST['cptm_tax_show_in_rest'] ) ) 1145 update_post_meta( $post_id, 'cptm_tax_show_in_rest', esc_attr( $_POST['cptm_tax_show_in_rest'] ) ); 1109 1146 1110 1147 if ( isset( $_POST['cptm_tax_show_admin_column'] ) ) -
custom-post-type-maker/tags/1.1.5/readme.txt
r1837357 r1841353 4 4 Requires at least: 3.0.0 5 5 Tested up to: 4.9 6 Stable tag: 1.1. 46 Stable tag: 1.1.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 67 67 == Changelog == 68 68 69 = 1.1.5 70 - Add ability to show custom post in REST API (Thanks @asithade)[#14](https://github.com/Graffino/Custom-Post-Type-Maker/issues/14). 71 69 72 = 1.1.4 70 73 - Add ability to show custom taxonomy column in post listing. -
custom-post-type-maker/trunk/CHANGELOG.md
r1836611 r1841353 1 1 ## Changelog 2 3 ### 1.1.5 4 - Add ability to show custom post in REST API (Thanks @asithade)[#14](https://github.com/Graffino/Custom-Post-Type-Maker/issues/14). 2 5 3 6 ### 1.1.4 -
custom-post-type-maker/trunk/README.md
r1836611 r1841353 23 23 24 24 ## Changelog 25 26 ### 1.1.5 27 - Add ability to show custom post in REST API (Thanks @asithade)[#14](https://github.com/Graffino/Custom-Post-Type-Maker/issues/14). 25 28 26 29 ### 1.1.4 -
custom-post-type-maker/trunk/custom-post-type-maker.php
r1836611 r1841353 4 4 Plugin URI: https://github.com/Graffino/custom-post-type-maker-ui 5 5 Description: Custom Post Type Maker lets you create Custom Post Types and custom Taxonomies in a user friendly way. 6 Version: 1.1. 46 Version: 1.1.5 7 7 Author: Graffino 8 8 Author URI: http://www.graffino.com/ … … 22 22 /** 23 23 * @author Zeno Popovici <zeno@graffino.com> 24 * @copyright Copyright (c) 201 6, Graffino24 * @copyright Copyright (c) 2018, Graffino 25 25 * @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2 26 26 * @package Custom_Post_Types_Maker 27 * @version 1.1. 427 * @version 1.1.5 28 28 */ 29 29 … … 59 59 $this->dir = plugins_url( '', __FILE__ ); 60 60 $this->path = plugin_dir_path( __FILE__ ); 61 $this->version = '1.1. 4';61 $this->version = '1.1.5'; 62 62 63 63 // actions … … 256 256 $cptm_pages = ( array_key_exists( 'cptm_pages', $cptm_meta ) && $cptm_meta['cptm_pages'][0] == '1' ? true : false ); 257 257 $cptm_query_var = ( array_key_exists( 'cptm_query_var', $cptm_meta ) && $cptm_meta['cptm_query_var'][0] == '1' ? true : false ); 258 $cptm_show_in_rest = ( array_key_exists( 'cptm_show_in_rest', $cptm_meta ) && $cptm_meta['cptm_show_in_rest'][0] == '1' ? true : false ); 258 259 259 260 // If it doesn't exist, it must be set to true ( fix for existing installs ) … … 297 298 'cptm_rewrite' => $cptm_rewrite_options, 298 299 'cptm_query_var' => (bool) $cptm_query_var, 300 'cptm_show_in_rest' => (bool) $cptm_show_in_rest, 299 301 'cptm_publicly_queryable' => (bool) $cptm_publicly_queryable, 300 302 'cptm_show_in_menu' => (bool) $cptm_show_in_menu, … … 334 336 'show_in_menu' => $cptm_post_type['cptm_show_in_menu'], 335 337 'query_var' => $cptm_post_type['cptm_query_var'], 338 'show_in_rest' => $cptm_post_type['cptm_show_in_rest'], 336 339 'publicly_queryable' => $cptm_post_type['cptm_publicly_queryable'], 337 340 '_builtin' => false, … … 371 374 $cptm_tax_rewrite = ( array_key_exists( 'cptm_tax_rewrite', $cptm_meta ) && $cptm_meta['cptm_tax_rewrite'][0] == '1' ? array( 'slug' => _x( $cptm_tax_custom_rewrite_slug, 'URL Slug', 'custom-post-type-maker' ) ) : false ); 372 375 $cptm_tax_query_var = ( array_key_exists( 'cptm_tax_query_var', $cptm_meta ) && $cptm_meta['cptm_tax_query_var'][0] == '1' ? true : false ); 376 $cptm_tax_show_in_rest = ( array_key_exists( 'cptm_tax_show_in_rest', $cptm_meta ) && $cptm_meta['cptm_tax_show_in_rest'][0] == '1' ? true : false ); 373 377 $cptm_tax_show_admin_column = ( array_key_exists( 'cptm_tax_show_admin_column', $cptm_meta ) && $cptm_meta['cptm_tax_show_admin_column'][0] == '1' ? true : false ); 374 378 … … 387 391 'cptm_tax_rewrite' => $cptm_tax_rewrite, 388 392 'cptm_tax_query_var' => (bool) $cptm_tax_query_var, 393 'cptm_tax_show_in_rest' => (bool) $cptm_tax_show_in_rest, 389 394 'cptm_tax_show_admin_column' => (bool) $cptm_tax_show_admin_column, 390 395 'cptm_tax_builtin_taxonomies' => unserialize( $cptm_tax_post_types ), … … 420 425 'hierarchical' => $cptm_taxonomy['cptm_tax_hierarchical'], 421 426 'query_var' => $cptm_taxonomy['cptm_tax_query_var'], 427 'show_in_rest' => $cptm_taxonomy['cptm_tax_show_in_rest'], 422 428 'show_admin_column' => $cptm_taxonomy['cptm_tax_show_admin_column'], 423 429 ); … … 500 506 $cptm_pages = isset( $values['cptm_pages'] ) ? esc_attr( $values['cptm_pages'][0] ) : ''; 501 507 $cptm_query_var = isset( $values['cptm_query_var'] ) ? esc_attr( $values['cptm_query_var'][0] ) : ''; 508 $cptm_show_in_rest = isset( $values['cptm_show_in_rest'] ) ? esc_attr( $values['cptm_show_in_rest'][0] ) : ''; 502 509 $cptm_publicly_queryable = isset( $values['cptm_publicly_queryable'] ) ? esc_attr( $values['cptm_publicly_queryable'][0] ) : ''; 503 510 $cptm_show_in_menu = isset( $values['cptm_show_in_menu'] ) ? esc_attr( $values['cptm_show_in_menu'][0] ) : ''; … … 784 791 <tr> 785 792 <td class="label"> 793 <label for="cptm_show_in_rest"><?php _e( 'Show in REST', 'custom-post-type-maker' ); ?></label> 794 <p><?php _e( 'Sets the show_in_rest key for this post type.', 'custom-post-type-maker' ); ?></p> 795 </td> 796 <td> 797 <select name="cptm_show_in_rest" id="cptm_show_in_rest" tabindex="18"> 798 <option value="1" <?php selected( $cptm_show_in_rest, '1' ); ?>><?php _e( 'True', 'custom-post-type-maker' ); ?> (<?php _e( 'default', 'custom-post-type-maker' ); ?>)</option> 799 <option value="0" <?php selected( $cptm_show_in_rest, '0' ); ?>><?php _e( 'False', 'custom-post-type-maker' ); ?></option> 800 </select> 801 </td> 802 </tr> 803 <tr> 804 <td class="label"> 786 805 <label for="cptm_publicly_queryable"><?php _e( 'Publicly Queryable', 'custom-post-type-maker' ); ?></label> 787 806 <p><?php _e( 'Whether the post is visible on the front-end.', 'custom-post-type-maker' ); ?></p> … … 849 868 $cptm_tax_rewrite = isset( $values['cptm_tax_rewrite'] ) ? esc_attr( $values['cptm_tax_rewrite'][0] ) : ''; 850 869 $cptm_tax_query_var = isset( $values['cptm_tax_query_var'] ) ? esc_attr( $values['cptm_tax_query_var'][0] ) : ''; 870 $cptm_tax_show_in_rest = isset( $values['cptm_tax_show_in_rest'] ) ? esc_attr( $values['cptm_tax_show_in_rest'][0] ) : ''; 851 871 $cptm_tax_show_admin_column = isset( $values['cptm_tax_show_admin_column'] ) ? esc_attr( $values['cptm_tax_show_admin_column'][0] ) : ''; 852 872 … … 963 983 <tr> 964 984 <td class="label"> 985 <label for="cptm_tax_show_in_rest"><?php _e( 'Show in REST', 'custom-post-type-maker' ); ?></label> 986 <p><?php _e( 'Sets the show_in_rest key for this taxonomy.', 'custom-post-type-maker' ); ?></p> 987 </td> 988 <td> 989 <select name="cptm_tax_show_in_rest" id="cptm_tax_show_in_rest" tabindex="8"> 990 <option value="1" <?php selected( $cptm_tax_show_in_rest, '1' ); ?>><?php _e( 'True', 'custom-post-type-maker' ); ?> (<?php _e( 'default', 'custom-post-type-maker' ); ?>)</option> 991 <option value="0" <?php selected( $cptm_tax_show_in_rest, '0' ); ?>><?php _e( 'False', 'custom-post-type-maker' ); ?></option> 992 </select> 993 </td> 994 <tr> 995 <td class="label"> 965 996 <label for="cptm_tax_show_admin_column"><?php _e( 'Admin Column', 'custom-post-type-maker' ); ?></label> 966 997 <p><?php _e( 'Show this taxonomy as a column in the custom post listing.', 'custom-post-type-maker' ); ?></p> … … 1068 1099 update_post_meta( $post_id, 'cptm_query_var', esc_attr( $_POST['cptm_query_var'] ) ); 1069 1100 1101 if ( isset( $_POST['cptm_show_in_rest'] ) ) 1102 update_post_meta( $post_id, 'cptm_show_in_rest', esc_attr( $_POST['cptm_show_in_rest'] ) ); 1103 1070 1104 if ( isset( $_POST['cptm_publicly_queryable'] ) ) 1071 1105 update_post_meta( $post_id, 'cptm_publicly_queryable', esc_attr( $_POST['cptm_publicly_queryable'] ) ); … … 1107 1141 if ( isset( $_POST['cptm_tax_query_var'] ) ) 1108 1142 update_post_meta( $post_id, 'cptm_tax_query_var', esc_attr( $_POST['cptm_tax_query_var'] ) ); 1143 1144 if ( isset( $_POST['cptm_tax_show_in_rest'] ) ) 1145 update_post_meta( $post_id, 'cptm_tax_show_in_rest', esc_attr( $_POST['cptm_tax_show_in_rest'] ) ); 1109 1146 1110 1147 if ( isset( $_POST['cptm_tax_show_admin_column'] ) ) -
custom-post-type-maker/trunk/readme.txt
r1837357 r1841353 4 4 Requires at least: 3.0.0 5 5 Tested up to: 4.9 6 Stable tag: 1.1. 46 Stable tag: 1.1.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 67 67 == Changelog == 68 68 69 = 1.1.5 70 - Add ability to show custom post in REST API (Thanks @asithade)[#14](https://github.com/Graffino/Custom-Post-Type-Maker/issues/14). 71 69 72 = 1.1.4 70 73 - Add ability to show custom taxonomy column in post listing.
Note: See TracChangeset
for help on using the changeset viewer.