Changeset 1523578
- Timestamp:
- 10/28/2016 05:51:06 AM (9 years ago)
- Location:
- advanced-custom-post-types/trunk
- Files:
-
- 8 edited
-
acpt.php (modified) (2 diffs)
-
admin/assets/script.js (modified) (3 diffs)
-
admin/class-load.php (modified) (6 diffs)
-
admin/class-meta-boxes.php (modified) (11 diffs)
-
admin/class-post-type.php (modified) (4 diffs)
-
admin/fields.json (modified) (1 diff)
-
class-settings.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
advanced-custom-post-types/trunk/acpt.php
r1523456 r1523578 3 3 Plugin Name: Advanced Custom Post Types 4 4 Description: Customise WordPress with custom post types 5 Version: 0. 3.05 Version: 0.4.0 6 6 Author: iambriansreed 7 7 Author URI: http://iambrian.com/ … … 46 46 spl_autoload_register( 'acpt_spl_autoload_register' ); 47 47 48 new \Advanced_Custom_Post_Types\Load ();48 new \Advanced_Custom_Post_Types\Load_Main(); 49 49 50 50 } -
advanced-custom-post-types/trunk/admin/assets/script.js
r1506712 r1523578 106 106 plural_name_input = $('[name="acpt_plural_name"]'), 107 107 singular_name_input = $('[name="acpt_singular_name"]'), 108 post_type_name_input = $('[name="acpt_post_type_name"]'), 108 109 auto_generate_checkbox = $('[name="acpt_auto_generate_labels"]'), 109 110 label_inputs = $('[name^="acpt_label_"]'); … … 126 127 }).trigger('change'); 127 128 129 post_type_name_input.on('change', function () { 130 post_type_name_input.prop('readonly', 131 !(post_type_name_input.val().length > 20 || post_type_name_input.val().length == 0)); 132 }).trigger('change'); 133 128 134 function generate_titles() { 129 135 130 136 if (new_acpt) { 131 singular_name_input.val(pluralize.singular(plural_name_input.val())); 137 138 var singular_name_value = pluralize.singular(plural_name_input.val()); 139 140 singular_name_input.val(singular_name_value); 141 142 var post_type_name_value = sanitizeTitle(singular_name_value); 143 144 post_type_name_input.val(post_type_name_value); 145 132 146 } 133 147 … … 190 204 } 191 205 206 function sanitizeTitle(Text) { 207 return Text 208 .toLowerCase() 209 .replace(/[^\w ]+/g, '') 210 .replace(/ +/g, '_') 211 ; 212 } 213 192 214 }) 193 215 (jQuery); -
advanced-custom-post-types/trunk/admin/class-load.php
r1506712 r1523578 3 3 namespace Advanced_Custom_Post_Types\Admin { 4 4 5 use Advanced_Custom_Post_Types\Load_Main; 5 6 use Advanced_Custom_Post_Types\Load_Base; 6 7 use Advanced_Custom_Post_Types\Settings; 7 use Advanced_Custom_Post_Types\Post_Types;8 8 9 9 class Load extends Load_Base { 10 10 11 11 private $settings; 12 private $ post_types;12 private $loader; 13 13 private $fields; 14 14 private $post_type; 15 15 16 16 public function __construct( 17 Load_Main $loader, 17 18 Settings $settings, 18 Post_Types $post_types,19 19 Fields $fields, 20 20 Post_Type $post_type 21 21 ) { 22 22 23 $this-> settings = $settings;24 $this-> post_types = $post_types;25 $this->fields = $fields;26 $this->post_type = $post_type;23 $this->loader = $loader; 24 $this->settings = $settings; 25 $this->fields = $fields; 26 $this->post_type = $post_type; 27 27 28 28 $cap = $settings->get( 'capability' ); … … 70 70 add_filter( 'dashboard_glance_items', array( $this, 'dashboard_glance_items' ), 10, 1 ); 71 71 add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 ); 72 add_filter( 'enter_title_here', array( $this, 'enter_title_here' ) ); 73 72 74 } 73 75 … … 102 104 <style> 103 105 /* dashboard_right_now */ 104 <?php foreach ( $this-> post_typesas $post_type )106 <?php foreach ( $this->loader->get_post_types() as $post_type ) 105 107 { 106 108 if ( $post_type['args']['public'] ) … … 155 157 if ( ! $is_acpt_post_type ) { 156 158 // not an post type to edit 157 158 159 return; 160 159 161 } else if ( $is_doing_autosave || ! $is_published ) { 160 162 // is a post type to edit but it's an autosave or not published … … 251 253 } 252 254 255 public function enter_title_here( $title ) { 256 257 $screen = get_current_screen(); 258 259 $post_types = $this->loader->get_post_types(); 260 261 if ( array_key_exists( $screen->post_type, $post_types ) ) { 262 263 $args = $post_types[ $screen->post_type ]['args']; 264 265 $name = strtolower( $args['singular_name'] ); 266 267 $title = "Enter $name name"; 268 } 269 270 return $title; 271 } 272 253 273 /** 254 274 * @param $actions … … 277 297 public function dashboard_glance_items( $items ) { 278 298 279 foreach ( $this-> post_typesas $post_type ) {299 foreach ( $this->loader->get_post_types() as $post_type ) { 280 300 281 301 if ( $post_type['args']['public'] ) { -
advanced-custom-post-types/trunk/admin/class-meta-boxes.php
r1506712 r1523578 2 2 3 3 namespace Advanced_Custom_Post_Types\Admin; 4 5 use Advanced_Custom_Post_Types\Debug; 4 6 5 7 class Meta_Boxes { … … 7 9 private $plugin_dir_url; 8 10 private $fields; 11 private $field_values = null; 9 12 10 13 public function __construct( Fields $fields ) { … … 100 103 public function meta_box_html( $post, $metabox ) { 101 104 105 $this->set_field_values( $post ); 106 102 107 $group = $this->group_fields_by_tab( $metabox['args'] ); 103 108 104 109 foreach ( $group->fields as $field ) { 105 110 if ( ! property_exists( $field, 'hidden' ) || ! $field->hidden ) { 106 $this->field_html( $post, $field ); 111 112 $this->field_html( $field ); 107 113 } 108 114 } … … 145 151 $selected = ''; 146 152 foreach ( $tab->fields as $field ) { 147 $this->field_html( $ post, $field );153 $this->field_html( $field ); 148 154 } 149 155 … … 195 201 } 196 202 197 private $post_field_values = null; 198 199 public function get_field_value( $post, $field_name ) { 200 201 if ( null === $this->post_field_values ) { 202 203 global $pagenow; 204 205 if ( 'post-new.php' === $pagenow ) { 206 207 $this->post_field_values = $this->fields->defaults(); 208 209 } else { 210 211 $post_type_data = json_decode( $post->post_content, true ); 212 $this->post_field_values = $post_type_data['fields']; 213 } 214 } 215 216 return isset( $this->post_field_values[ $field_name ] ) ? $this->post_field_values[ $field_name ] : ''; 203 public function set_field_values( $post ) { 204 205 global $pagenow; 206 207 if ( $this->field_values ) { 208 return; 209 } 210 211 if ( 'post-new.php' === $pagenow ) { 212 $this->field_values = $this->fields->defaults(); 213 } else { 214 $post_type_data = json_decode( $post->post_content, true ); 215 foreach ( $post_type_data['args'] as $name => $value ) { 216 $this->field_values[ 'acpt_' . $name ] = $value; 217 } 218 } 219 } 220 221 public function get_field_value( $field_name ) { 222 223 return isset( $this->field_values[ $field_name ] ) ? $this->field_values[ $field_name ] : ''; 217 224 } 218 225 … … 223 230 * @internal param $post_id 224 231 */ 225 public function field_html( $ post, $field ) {232 public function field_html( $field ) { 226 233 227 234 $parent_type = $field->type; 228 235 229 $value = $this->get_field_value( $ post, $field->name );236 $value = $this->get_field_value( $field->name ); 230 237 231 238 $options = array(); … … 263 270 $attr_name = esc_attr( $field->name ); 264 271 272 $readonly = ( property_exists( $field, 'readonly' ) && $field->readonly ) ? ' readonly="readonly"' : ''; 273 274 $maxlength = ( property_exists( $field, 'maxlength' ) && is_numeric( $field->maxlength ) 275 && intval( $field->maxlength ) ) ? ' maxlength="' . intval( $field->maxlength ) . '"' : ''; 276 265 277 ?> 266 278 <div class="field <?php echo $field->wrapper->class; ?>" … … 269 281 270 282 <label for="<?php echo $attr_name; ?>"><?php 283 271 284 echo $field->label; 272 285 if ( $field->required ): … … 277 290 <?php 278 291 if ( $field->type === 'text' || $field->type === 'number' ): ?> 279 <input class="widefat" id="<?php echo $attr_name; ?>" name="<?php echo $attr_name; ?>" 292 <input class="widefat" id="<?php echo $attr_name; ?>" 293 name="<?php echo $attr_name; ?>"<?php echo $readonly; ?><?php echo $maxlength; ?> 280 294 type="<?php echo esc_attr( $field->type ); ?>" value="<?php echo esc_attr( $value ); ?>"> 281 295 <?php 282 296 elseif ( $field->type === 'textarea' ): 283 297 ?> 284 <textarea id="<?php echo $attr_name; ?>" 298 <textarea id="<?php echo $attr_name; ?>"<?php echo $readonly; ?> 285 299 name="<?php echo $attr_name; ?>"><?php echo $value; ?></textarea> 286 300 <?php … … 289 303 foreach ( $options as $option ): ?> 290 304 <label class="checkbox"> 291 <input type="checkbox" 305 <input type="checkbox"<?php echo $readonly; ?> 292 306 name="<?php echo esc_attr( $field->name . ( $multiple ? '[]' : '' ) ); ?>" 293 307 <?php if ( ! $multiple ): ?> … … 301 315 elseif ( $field->type === 'select' ): 302 316 303 ?><select name="<?php echo esc_attr( $field->name . ( $multiple ? '[]' : '' ) ); ?>" 304 id="<?php echo $attr_name; ?>" title=""><?php 317 ?><select<?php echo $readonly; ?> 318 name="<?php echo esc_attr( $field->name . ( $multiple ? '[]' : '' ) ); ?>" 319 id="<?php echo $attr_name; ?>" title=""><?php 305 320 foreach ( $options as $option ): ?> 306 321 <option value="<?php echo esc_attr( $option['value'] ); ?>" -
advanced-custom-post-types/trunk/admin/class-post-type.php
r1523456 r1523578 3 3 namespace Advanced_Custom_Post_Types\Admin; 4 4 5 use Advanced_Custom_Post_Types\Debug; 6 use Advanced_Custom_Post_Types\Load_Main; 5 7 use Advanced_Custom_Post_Types\Settings; 6 8 7 9 class Post_Type { 8 10 11 private $loader; 12 private $settings; 9 13 private $fields; 10 14 private $dashicons; 11 private $settings; 12 13 function __construct( Settings $settings, Fields $fields, Dashicons $dashicons ) { 15 16 private $post_data; 17 private $errors = array(); 18 private $field_values; 19 20 public function __construct( Load_Main $loader, Settings $settings, Fields $fields, Dashicons $dashicons ) { 21 22 $this->loader = $loader; 23 $this->settings = $settings; 14 24 $this->fields = $fields; 15 25 $this->dashicons = $dashicons; 16 $this->settings = $settings;17 26 } 18 27 19 28 public function save( $post ) { 20 29 21 if ( ! is_object( $post ) ) { 22 return; 23 } 24 25 $post_data = $this->get_post_data( $post->ID ); 26 27 if ( $post_data->errors ) { 28 Notices::add( $post_data->errors, 'error', false ); 29 } 30 31 wp_update_post( $post_data->post ); 32 33 $save_json = $this->save_json( $post_data ); 34 35 if ( $save_json->errors ) { 36 37 Notices::add( $save_json->errors, 'error', false ); 38 } 39 } 40 41 public function save_json( $post_data ) { 30 $existing_post = get_post( $post->ID ); 31 32 // get fields and pre process the data 33 if ( ! isset( $_POST ) || ! is_array( $_POST ) ) { 34 throw new \Exception( 'No POST data to create custom post type with.' ); 35 } 36 37 $this->set_field_values( $post->ID ); 38 39 $this->post_data = (object) array( 40 'post_type' => $this->field_values['post_type_name'], 41 'args' => $this->get_args() 42 ); 43 44 $this->save_wp_post( $post->ID ); 45 46 $this->save_wp_post_meta( $post->ID ); 47 48 $this->save_json(); 49 50 if ( count( $this->errors ) ) { 51 Notices::add( implode( '<br>', $this->errors ), 'error', false ); 52 } 53 } 54 55 private function save_wp_post( $post_id ) { 56 57 wp_update_post( array( 58 'ID' => $post_id, 59 'post_title' => $this->field_values['plural_name'], 60 'post_type' => ACPT_POST_TYPE, 61 'post_name' => 'acpt_post_type_' . $this->field_values['post_type_name'], 62 'post_status' => count( $this->errors ) ? 'draft' : 'publish', 63 'post_content' => $this->json_encode( $this->post_data ) 64 ) ); 65 } 66 67 private function save_wp_post_meta( $post_id ) { 68 69 $unique_fields = $this->get_unique_fields(); 70 71 $field_names = array_keys( $unique_fields ); 72 73 foreach ( $field_names as $field_name ) { 74 75 update_post_meta( $post_id, 'acpt_' . $field_name, $this->field_values[ $field_name ] ); 76 } 77 } 78 79 private function save_json() { 42 80 43 81 // vars 44 $path = $this->settings->get( 'save_json' ); 45 $file_name = $post_data->post_type . '.json'; 46 $output = (object) array( 'errors' => false ); 82 $path = $this->settings->get( 'save_json' ); 83 84 // bail early if $path isn't set 85 if ( ! $path ) { 86 return false; 87 } 88 89 $file_name = $this->post_data->post_type . '.json'; 47 90 48 91 // remove trailing slash … … 51 94 // bail early if dir does not exist 52 95 if ( ! is_writable( $path ) ) { 53 $ output->errors= "The ACPT JSON save path '$path' is not writable.";54 55 return $output;96 $this->errors[] = "The ACPT JSON save path '$path' is not writable."; 97 98 return false; 56 99 } 57 100 58 101 // write file 59 102 $f = fopen( "{$path}/{$file_name}", 'w' ); 60 fwrite( $f, $this->json_encode( $post_data->data ) ); 61 fclose( $f ); 62 63 // return 64 return $output; 65 66 } 67 68 /** 103 fwrite( $f, $this->json_encode( $this->post_data ) ); 104 105 return fclose( $f ); 106 } 107 108 /** 109 * Cleans up the acpt field values 110 * 69 111 * @param $post_id 70 112 * 71 * @return object 72 * @throws \Exception 73 */ 74 public function get_post_data( $post_id ) { 75 76 // get fields and pre process the data 77 if ( ! isset( $_POST ) || ! is_array( $_POST ) ) { 78 throw new \Exception( 'No POST data to get acpt field data from.' ); 79 } 80 81 $fields = array(); 82 83 $filters = array( 113 * @return array 114 */ 115 private function set_field_values( $post_id ) { 116 117 $this->field_values = array(); 118 119 $filters = $this->get_field_filters(); 120 121 foreach ( $this->fields->names() as $acpt_field_name ) { 122 123 $value = isset( $_POST[ $acpt_field_name ] ) ? $_POST[ $acpt_field_name ] : ''; 124 125 $name = substr( $acpt_field_name, 5 ); 126 127 if ( array_key_exists( $name, $filters ) ) { 128 $value = call_user_func( $filters[ $name ], $value ); 129 } 130 131 $this->field_values[ $name ] = is_string( $value ) ? trim( $value ) : $value; 132 } 133 134 if ( $this->field_values['show_in_rest'] ) { 135 136 $this->field_values['rest_base'] = 137 $this->field_values['rest_base'] ? $this->field_values['rest_base'] : sanitize_title( $this->field_values['plural_name'] ); 138 139 $this->field_values['rest_controller_class'] = 140 $this->field_values['rest_controller_class'] ? $this->field_values['rest_controller_class'] : null; 141 142 } else { 143 $this->field_values['rest_base'] = null; 144 $this->field_values['rest_controller_class'] = null; 145 } 146 147 $this->field_values['post_type_name'] = $this->field_values['post_type_name'] ? 148 $this->field_values['post_type_name'] : $this->sanitize_post_type( $this->field_values['singular_name'] ); 149 150 $invalid_post_type_name_reason = $this->loader->is_invalid_post_type_name( $this->field_values['post_type_name'] ); 151 152 if ( $invalid_post_type_name_reason ) { 153 $this->errors[] = $invalid_post_type_name_reason; 154 } 155 156 // default rewrite_slug 157 if ( $this->field_values['rewrite'] ) { 158 $this->field_values['rewrite_slug'] = $this->field_values['rewrite_slug'] ? $this->field_values['rewrite_slug'] : 159 sanitize_title( $this->field_values['singular_name'] ); 160 } 161 162 foreach ( $this->get_unique_fields() as $key => $title ) { 163 164 $value = $this->field_values[ $key ]; 165 166 if ( ! $this->is_unique( $post_id, $key, $value ) ) { 167 $errors[] = "Another post type has the same value '$value'. " . 168 "Please change the $title and save again."; 169 } 170 } 171 } 172 173 174 /** 175 * creates the register_post_type arguments from the acpt fields values 176 * 177 * @param $this ->field_values 178 * 179 * @return array 180 */ 181 private function get_args() { 182 183 $args = array(); 184 185 foreach ( $this->field_values as $name => $value ) { 186 $args[ $name ] = $value; 187 } 188 189 $args['label'] = $args['plural_name']; 190 191 // build out label data 192 if ( $args['auto_generate_labels'] ) { 193 194 $args['title_placeholder'] = "Enter " . strtolower( $args['singular_name'] ) . " name"; 195 196 $args['labels'] = $this->generate_labels( 197 $args['plural_name'], 198 $args['singular_name'] 199 ); 200 201 } else { 202 203 foreach ( $args as $field_name => $field_value ) { 204 if ( 'label_' === substr( $field_name, 0, 6 ) ) { 205 $args['labels'][ substr( $field_name, 6 ) ] = $field_value; 206 } 207 } 208 } 209 210 // set rewrite information 211 if ( $args['rewrite'] ) { 212 213 $args['rewrite'] = array( 214 'slug' => $this->field_values['rewrite_slug'], 215 'with_front' => $args['rewrite_with_front'], 216 'feeds' => $args['rewrite_feeds'], 217 'pages' => $args['rewrite_pages'] 218 ); 219 } 220 221 // set show_in_menu to bool or to parent if set 222 if ( $args['show_under_a_parent'] && $args['show_under_a_parent'] ) { 223 $args['show_in_menu'] = $args['show_under_parent']; 224 } 225 226 $args['taxonomies'] = (array) $args['taxonomies']; 227 $args['supports'] = (array) $args['supports']; 228 229 // set menu position from select or custom input 230 $args['menu_position'] = intval( $args['menu_position'] ); 231 232 if ( $args['menu_position'] === - 1 ) { 233 $args['menu_position'] = intval( $args['menu_position_custom'] ); 234 } 235 236 // validate and set dashicon 237 $dashicon = $this->dashicons->get( $args['menu_icon'] ); 238 239 $args['menu_icon'] = $dashicon->class_name; 240 241 return $args; 242 } 243 244 private function get_field_filters() { 245 return array( 84 246 'plural_name' => 'ucwords', 85 247 'singular_name' => 'ucwords', … … 100 262 'rewrite_pages' => 'boolval' 101 263 ); 102 103 foreach ( $this->fields->names() as $acpt_field_name ) { 104 105 $value = isset( $_POST[ $acpt_field_name ] ) ? $_POST[ $acpt_field_name ] : ''; 106 107 $name = substr( $acpt_field_name, 5 ); 108 109 if ( array_key_exists( $name, $filters ) ) { 110 $value = call_user_func( $filters[ $name ], $value ); 111 } 112 113 $fields[ $name ] = is_string( $value ) ? trim( $value ) : $value; 114 } 115 116 if ( $fields['show_in_rest'] ) { 117 118 $fields['rest_base'] = 119 $fields['rest_base'] ? $fields['rest_base'] : sanitize_title( $fields['plural_name'] ); 120 $fields['rest_controller_class'] = 121 $fields['rest_controller_class'] ? $fields['rest_controller_class'] : null; 122 } else { 123 124 $fields['rest_base'] = null; 125 $fields['rest_controller_class'] = null; 126 } 127 128 $post_type = $this->sanitize_post_type( $fields['singular_name'] ); 129 130 // default rewrite_slug 131 if ( $fields['rewrite'] ) { 132 133 $fields['rewrite_slug'] = $fields['rewrite_slug'] ? $fields['rewrite_slug'] : sanitize_title( $fields['singular_name'] ); 134 } 135 136 $acpt_fields = array_combine( 137 array_map( create_function( '$name', 'return "acpt_".$name;' ), array_keys( $fields ) ), 138 $fields 139 ); 140 141 // build initial content object 142 $content = (object) array( 143 'post_type' => $post_type, 144 'fields' => $acpt_fields, 145 'args' => array(), 146 'dashicon_unicode_number' => 0, 147 'error' => null, 148 'saved' => null, 149 ); 150 151 $args = array(); 152 153 foreach ( $fields as $name => $value ) { 154 $args[ $name ] = $value; 155 } 156 157 $unique_fields = array( 264 } 265 266 private function get_unique_fields() { 267 return array( 158 268 'singular_name' => 'singular name', 159 269 'plural_name' => 'plural name' 160 270 ); 161 162 $unique_errors = array(); 163 164 foreach ( $unique_fields as $key => $title ) { 165 166 $value = $args[ $key ]; 167 168 update_post_meta( $post_id, 'acpt_' . $key, $value ); 169 170 if ( ! $this->is_unique( $post_id, $key, $value ) ) { 171 172 $unique_errors[] = "Another post type has the same value '$value'. " . 173 "Please change the $title and save again."; 174 } 175 } 176 177 if ( count( $unique_errors ) ) { 178 $content->error = implode( '<br>', $unique_errors ); 179 } 180 181 $args['label'] = $args['plural_name']; 182 183 // build out label data 184 if ( $args['auto_generate_labels'] ) { 185 186 $args['labels'] = $this->generate_labels( 187 $args['plural_name'], 188 $args['singular_name'] 189 ); 190 191 } else { 192 193 foreach ( $args as $field_name => $field_value ) { 194 if ( 'label_' === substr( $field_name, 0, 6 ) ) { 195 unset( $args[ $field_name ] ); 196 $args['labels'][ substr( $field_name, 6 ) ] = $field_value; 197 } 198 } 199 } 200 201 // set rewrite information 202 if ( $args['rewrite'] ) { 203 204 $args['rewrite'] = array( 205 'slug' => $fields['rewrite_slug'], 206 'with_front' => $args['rewrite_with_front'], 207 'feeds' => $args['rewrite_feeds'], 208 'pages' => $args['rewrite_pages'] 209 ); 210 } 211 212 // set show_in_menu to bool or to parent if set 213 if ( $args['show_under_a_parent'] && $args['show_under_a_parent'] ) { 214 $args['show_in_menu'] = $args['show_under_parent']; 215 } 216 217 $args['taxonomies'] = (array) $args['taxonomies']; 218 $args['supports'] = (array) $args['supports']; 219 220 // set menu position from select or custom input 221 $args['menu_position'] = intval( $args['menu_position'] ); 222 223 if ( $args['menu_position'] === - 1 ) { 224 $args['menu_position'] = intval( $args['menu_position_custom'] ); 225 } 226 227 // validate and set dashicon 228 $dashicon = $this->dashicons->get( $args['menu_icon'] ); 229 230 $args['menu_icon'] = $dashicon->class_name; 231 232 $content->dashicon_unicode_number = $dashicon->unicode_number; 233 234 $content->args = $args; 235 236 $content->saved = time(); 237 238 return (object) array( 239 'errors' => $content->error, 240 'post_type' => $post_type, 241 'data' => $content, 242 'post' => array( 243 'ID' => $post_id, 244 'post_type' => $post_type, 245 'post_title' => $args['plural_name'], 246 'post_type' => ACPT_POST_TYPE, 247 'post_name' => 'acpt_post_type_' . $post_type, 248 'post_status' => $content->error ? 'draft' : 'publish', 249 'post_content' => $this->json_encode( $content ), 250 'post_content_data' => $content 251 ) 252 ); 253 } 254 255 function json_encode( $data ) { 256 257 // create json string 271 } 272 273 private function json_encode( $data ) { 274 258 275 if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) { 276 259 277 // PHP at least 5.4 260 278 return json_encode( $data, JSON_PRETTY_PRINT ); 261 262 279 } else { 280 263 281 // PHP less than 5.4 264 282 return json_encode( $data ); … … 291 309 $sql = $wpdb->prepare( 292 310 "SELECT" . " COUNT(*) 293 FROM $wpdb->posts as posts294 LEFT JOIN $wpdb->postmeta as postmeta ON postmeta.post_id = posts.ID295 AND postmeta.meta_key = %s296 WHERE 1 = 1297 AND posts.ID != %d298 AND posts.post_type = 'acpt_content_type'299 AND posts.post_status = 'publish'300 AND postmeta.meta_value = %s; ", "acpt_$field_name", $post_id, $value );311 FROM $wpdb->posts as posts 312 LEFT JOIN $wpdb->postmeta as postmeta ON postmeta.post_id = posts.ID 313 AND postmeta.meta_key = %s 314 WHERE 1 = 1 315 AND posts.ID != %d 316 AND posts.post_type = 'acpt_content_type' 317 AND posts.post_status = 'publish' 318 AND postmeta.meta_value = %s; ", "acpt_$field_name", $post_id, $value ); 301 319 302 320 return 0 === intval( $wpdb->get_var( $sql ) ); -
advanced-custom-post-types/trunk/admin/fields.json
r1506712 r1523578 1 1 { 2 "basic": { 3 "key": "group_576c917f2166e", 4 "title": "acpt-basic", 5 "fields": [ 6 { 7 "key": "field_576c9220dcc28", 8 "label": "Plural Name", 9 "name": "acpt_plural_name", 10 "type": "text", 11 "instructions": "General name for the post type. Default is Posts\/Pages", 12 "required": 1, 13 "conditional_logic": 0, 14 "wrapper": { 15 "width": "", 16 "class": "", 17 "id": "" 18 }, 19 "default_value": "", 20 "placeholder": "", 21 "prepend": "", 22 "append": "", 23 "maxlength": "", 24 "readonly": 0, 25 "disabled": 0 26 }, 27 { 28 "key": "field_576c92a8dcc29", 29 "label": "Singular Name", 30 "name": "acpt_singular_name", 31 "type": "text", 32 "instructions": "Name for one object of this post type. Default is Post\/Page", 33 "required": 1, 34 "conditional_logic": 0, 35 "wrapper": { 36 "width": "", 37 "class": "", 38 "id": "" 39 }, 40 "default_value": "", 41 "placeholder": "", 42 "prepend": "", 43 "append": "", 44 "maxlength": "", 45 "readonly": 0, 46 "disabled": 0 47 }, 48 { 49 "key": "field_576ca22e38fa5", 50 "label": "Description", 51 "name": "acpt_description", 52 "type": "textarea", 53 "instructions": "A short descriptive summary of what the post type is.", 54 "required": 0, 55 "conditional_logic": 0, 56 "wrapper": { 57 "width": "", 58 "class": "", 59 "id": "" 60 }, 61 "default_value": "", 62 "placeholder": "", 63 "maxlength": "", 64 "rows": 3, 65 "new_lines": "", 66 "readonly": 0, 67 "disabled": 0 68 }, 69 { 70 "key": "field_576caf4c3f8e8", 71 "label": "Hierarchical", 72 "name": "acpt_hierarchical", 73 "type": "true_false", 74 "instructions": "Page attributes must be included in supported functionality to show the parent select box on the editor page.", 75 "required": 0, 76 "conditional_logic": 0, 77 "wrapper": { 78 "width": "", 79 "class": "", 80 "id": "" 81 }, 82 "message": "Whether the post type allows a parent to be specified.", 83 "default_value": false 84 } 85 ], 86 "location": [ 87 [ 88 { 89 "param": "post_type", 90 "operator": "==", 91 "value": "acpt_content_type" 92 } 93 ] 94 ], 95 "menu_order": 0, 96 "position": "normal", 97 "style": "default", 98 "label_placement": "top", 99 "instruction_placement": "field", 100 "hide_on_screen": "", 101 "active": 1, 102 "description": "" 103 }, 104 "advanced": { 105 "key": "group_576f06fc7f2f2", 106 "title": "acpt-advanced", 107 "fields": [ 108 { 109 "key": "field_576f06fc8303d", 110 "label": "Advanced", 111 "name": "", 112 "type": "tab", 113 "instructions": "", 114 "required": 0, 115 "conditional_logic": 0, 116 "wrapper": { 117 "width": "", 118 "class": "", 119 "id": "" 120 }, 121 "placement": "top", 122 "endpoint": 1 123 }, 124 { 125 "key": "field_576f06fc83060", 126 "label": "Public", 127 "name": "acpt_public", 128 "type": "true_false", 129 "instructions": "", 130 "required": 0, 131 "conditional_logic": 0, 132 "wrapper": { 133 "width": "", 134 "class": "", 135 "id": "" 136 }, 137 "message": "Controls how the type is visible to authors and readers.", 138 "default_value": true 139 }, 140 { 141 "key": "field_576f06fc83119", 142 "label": "Show in Admin UI", 143 "name": "acpt_show_ui", 144 "type": "true_false", 145 "instructions": "", 146 "required": 0, 147 "conditional_logic": 0, 148 "wrapper": { 149 "width": "", 150 "class": "", 151 "id": "" 152 }, 153 "message": "Whether to generate a default UI for managing this post type in the admin.", 154 "default_value": true 155 }, 156 { 157 "key": "field_576f06fc59164", 158 "label": "Rewrite URL", 159 "name": "acpt_rewrite", 160 "type": "true_false", 161 "instructions": "", 162 "required": 0, 163 "conditional_logic": 0, 164 "wrapper": { 165 "width": "", 166 "class": "", 167 "id": "" 168 }, 169 "message": "Whether to trigger the handling of rewrites for this post type.", 170 "default_value": true 171 }, 172 { 173 "key": "field_576f06fc830c9", 174 "label": "Show in REST API", 175 "name": "acpt_show_in_rest", 176 "type": "true_false", 177 "instructions": "", 178 "required": 0, 179 "conditional_logic": 0, 180 "wrapper": { 181 "width": "", 182 "class": "", 183 "id": "" 184 }, 185 "message": "Whether to expose this post type in the REST API.", 186 "default_value": false 187 }, 188 { 189 "key": "field_576f06fc22742", 190 "label": "Has Archive", 191 "name": "acpt_has_archive", 192 "type": "true_false", 193 "instructions": "", 194 "required": 0, 195 "conditional_logic": 0, 196 "wrapper": { 197 "width": "", 198 "class": "", 199 "id": "" 200 }, 201 "message": "Whether post type archives are enabled.", 202 "default_value": false 203 }, 204 { 205 "key": "field_576f06fc32742", 206 "label": "Show in Navigation Menus", 207 "name": "acpt_show_in_nav_menus", 208 "type": "true_false", 209 "instructions": "", 210 "required": 0, 211 "conditional_logic": 0, 212 "wrapper": { 213 "width": "", 214 "class": "", 215 "id": "" 216 }, 217 "message": "Whether post type is available for selection in navigation menus..", 218 "default_value": true 219 }, 220 { 221 "key": "field_576f06fc83082", 222 "label": "Exclude from Search", 223 "name": "acpt_exclude_from_search", 224 "type": "true_false", 225 "instructions": "", 226 "required": 0, 227 "conditional_logic": 0, 228 "wrapper": { 229 "width": "", 230 "class": "", 231 "id": "" 232 }, 233 "message": "Whether to exclude posts with this post type from front end search results.", 234 "default_value": false 235 }, 236 { 237 "key": "field_576f06fc830ae", 238 "label": "Publicly Queryable", 239 "name": "acpt_publicly_queryable", 240 "type": "true_false", 241 "instructions": "", 242 "required": 0, 243 "conditional_logic": 0, 244 "wrapper": { 245 "width": "", 246 "class": "", 247 "id": "" 248 }, 249 "message": "Whether queries can be performed on the front end.", 250 "default_value": true 251 }, 252 { 253 "key": "field_576f06fc830bb", 254 "label": "Can Export", 255 "name": "acpt_can_export", 256 "type": "true_false", 257 "instructions": "", 258 "required": 0, 259 "conditional_logic": 0, 260 "wrapper": { 261 "width": "", 262 "class": "", 263 "id": "" 264 }, 265 "message": "Whether this post type can be exported.", 266 "default_value": true 267 }, 268 { 269 "key": "field_576f06fc83106", 270 "label": "Admin", 271 "name": "", 272 "type": "tab", 273 "instructions": "", 274 "required": 0, 275 "conditional_logic": [ 276 [ 277 { 278 "field": "field_576f06fc83119", 279 "operator": "==", 280 "value": "1" 281 } 282 ] 283 ], 284 "wrapper": { 285 "width": "", 286 "class": "", 287 "id": "" 288 }, 289 "placement": "top", 290 "endpoint": 0 291 }, 292 { 293 "key": "field_576f06fc83127", 294 "label": "Show in Admin Menu", 295 "name": "acpt_show_in_menu", 296 "type": "true_false", 297 "instructions": "", 298 "required": 0, 299 "conditional_logic": 0, 300 "wrapper": { 301 "width": "", 302 "class": "", 303 "id": "" 304 }, 305 "message": "Whether to show the post type in the admin menu.", 306 "default_value": true 307 }, 308 { 309 "key": "field_576f06fc23127", 310 "label": "Show under a Parent", 311 "name": "acpt_show_under_a_parent", 312 "type": "true_false", 313 "instructions": "", 314 "required": 0, 315 "wrapper": { 316 "width": "", 317 "class": "child-field", 318 "id": "" 319 }, 320 "message": "Whether to show the post type under a parent.", 321 "default_value": false, 322 "conditional_logic": [ 323 [ 324 { 325 "field": "field_576f06fc83127", 326 "operator": "==", 327 "value": "1" 328 } 329 ] 330 ] 331 }, 332 { 333 "key": "field_576f06fc83135", 334 "label": "Under Parent", 335 "name": "acpt_show_under_parent", 336 "type": "select", 337 "instructions": "The post type will be placed as a sub menu of the selected page.", 338 "required": 0, 339 "wrapper": { 340 "width": "", 341 "class": "child-field", 342 "id": "" 343 }, 344 "default_value": "", 345 "conditional_logic": [ 346 [ 347 { 348 "field": "field_576f06fc23127", 349 "operator": "==", 350 "value": "1" 351 } 352 ] 353 ], 354 "choices": [] 355 }, 356 { 357 "key": "field_576f06fc83150", 358 "label": "Menu Position", 359 "name": "acpt_menu_position", 360 "type": "select", 361 "instructions": "", 362 "required": 0, 363 "conditional_logic": [ 364 [ 365 { 366 "field": "field_576f06fc23127", 367 "operator": "!=", 368 "value": "1" 369 }, 370 { 371 "field": "field_576f06fc83127", 372 "operator": "==", 373 "value": "1" 374 } 375 ] 376 ], 377 "wrapper": { 378 "width": "", 379 "class": "", 380 "id": "" 381 }, 382 "choices": { 383 "-1": "Custom Position", 384 "5": "5 - below Posts", 385 "10": "10 - below Media", 386 "15": "15 - below Links", 387 "20": "20 - below Pages", 388 "25": "25 - below comments", 389 "60": "60 - below first separator", 390 "65": "65 - below Plugins", 391 "70": "70 - below Users", 392 "75": "75 - below Tools", 393 "80": "80 - below Settings", 394 "100": "100 - below second separator" 395 }, 396 "default_value": 5, 397 "allow_null": 0, 398 "ui": 0, 399 "ajax": 0, 400 "placeholder": "", 401 "disabled": 0, 402 "readonly": 0 403 }, 404 { 405 "key": "field_576f06fc8315f", 406 "label": "Custom Position", 407 "name": "acpt_menu_position_custom", 408 "type": "number", 409 "instructions": "", 410 "required": 0, 411 "conditional_logic": [ 412 [ 413 { 414 "field": "field_576f06fc83150", 415 "operator": "==", 416 "value": "-1" 417 } 418 ] 419 ], 420 "wrapper": { 421 "width": "", 422 "class": "child-field hide-title", 423 "id": "" 424 }, 425 "default_value": "", 426 "placeholder": "", 427 "prepend": "", 428 "append": "", 429 "min": "", 430 "max": "", 431 "step": "", 432 "readonly": 0, 433 "disabled": 0 434 }, 435 { 436 "key": "field_576f06fc8316d", 437 "label": "Menu Icon", 438 "name": "acpt_menu_icon", 439 "type": "select", 440 "instructions": "", 441 "required": 0, 442 "conditional_logic": [ 443 [ 444 { 445 "field": "field_576f06fc23127", 446 "operator": "!=", 447 "value": "1" 448 }, 449 { 450 "field": "field_576f06fc83127", 451 "operator": "==", 452 "value": "1" 453 } 454 ] 455 ], 456 "wrapper": { 457 "width": "", 458 "class": "", 459 "id": "" 460 }, 461 "choices": { 462 "": "Select Icon", 463 "dashicons-menu": "menu", 464 "dashicons-admin-site": "admin-site", 465 "dashicons-dashboard": "dashboard", 466 "dashicons-admin-media": "admin-media", 467 "dashicons-admin-page": "admin-page", 468 "dashicons-admin-comments": "admin-comments", 469 "dashicons-admin-appearance": "admin-appearance", 470 "dashicons-admin-plugins": "admin-plugins", 471 "dashicons-admin-users": "admin-users", 472 "dashicons-admin-tools": "admin-tools", 473 "dashicons-admin-settings": "admin-settings", 474 "dashicons-admin-network": "admin-network", 475 "dashicons-admin-generic": "admin-generic", 476 "dashicons-admin-home": "admin-home", 477 "dashicons-admin-collapse": "admin-collapse", 478 "dashicons-filter": "filter", 479 "dashicons-admin-customizer": "admin-customizer", 480 "dashicons-admin-multisite": "admin-multisite", 481 "dashicons-admin-links": "admin-links", 482 "dashicons-format-links": "format-links", 483 "dashicons-admin-post": "admin-post", 484 "dashicons-format-standard": "format-standard", 485 "dashicons-format-image": "format-image", 486 "dashicons-format-gallery": "format-gallery", 487 "dashicons-format-audio": "format-audio", 488 "dashicons-format-video": "format-video", 489 "dashicons-format-chat": "format-chat", 490 "dashicons-format-status": "format-status", 491 "dashicons-format-aside": "format-aside", 492 "dashicons-format-quote": "format-quote", 493 "dashicons-welcome-write-blog": "welcome-write-blog", 494 "dashicons-welcome-edit-page": "welcome-edit-page", 495 "dashicons-welcome-add-page": "welcome-add-page", 496 "dashicons-welcome-view-site": "welcome-view-site", 497 "dashicons-welcome-widgets-menus": "welcome-widgets-menus", 498 "dashicons-welcome-comments": "welcome-comments", 499 "dashicons-welcome-learn-more": "welcome-learn-more", 500 "dashicons-image-crop": "image-crop", 501 "dashicons-image-rotate": "image-rotate", 502 "dashicons-image-rotate-left": "image-rotate-left", 503 "dashicons-image-rotate-right": "image-rotate-right", 504 "dashicons-image-flip-vertical": "image-flip-vertical", 505 "dashicons-image-flip-horizontal": "image-flip-horizontal", 506 "dashicons-image-filter": "image-filter", 507 "dashicons-undo": "undo", 508 "dashicons-redo": "redo", 509 "dashicons-editor-bold": "editor-bold", 510 "dashicons-editor-italic": "editor-italic", 511 "dashicons-editor-ul": "editor-ul", 512 "dashicons-editor-ol": "editor-ol", 513 "dashicons-editor-quote": "editor-quote", 514 "dashicons-editor-alignleft": "editor-alignleft", 515 "dashicons-editor-aligncenter": "editor-aligncenter", 516 "dashicons-editor-alignright": "editor-alignright", 517 "dashicons-editor-insertmore": "editor-insertmore", 518 "dashicons-editor-spellcheck": "editor-spellcheck", 519 "dashicons-editor-distractionfree": "editor-distractionfree", 520 "dashicons-editor-expand": "editor-expand", 521 "dashicons-editor-contract": "editor-contract", 522 "dashicons-editor-kitchensink": "editor-kitchensink", 523 "dashicons-editor-underline": "editor-underline", 524 "dashicons-editor-justify": "editor-justify", 525 "dashicons-editor-textcolor": "editor-textcolor", 526 "dashicons-editor-paste-word": "editor-paste-word", 527 "dashicons-editor-paste-text": "editor-paste-text", 528 "dashicons-editor-removeformatting": "editor-removeformatting", 529 "dashicons-editor-video": "editor-video", 530 "dashicons-editor-customchar": "editor-customchar", 531 "dashicons-editor-outdent": "editor-outdent", 532 "dashicons-editor-indent": "editor-indent", 533 "dashicons-editor-help": "editor-help", 534 "dashicons-editor-strikethrough": "editor-strikethrough", 535 "dashicons-editor-unlink": "editor-unlink", 536 "dashicons-editor-rtl": "editor-rtl", 537 "dashicons-editor-break": "editor-break", 538 "dashicons-editor-code": "editor-code", 539 "dashicons-editor-paragraph": "editor-paragraph", 540 "dashicons-editor-table": "editor-table", 541 "dashicons-align-left": "align-left", 542 "dashicons-align-right": "align-right", 543 "dashicons-align-center": "align-center", 544 "dashicons-align-none": "align-none", 545 "dashicons-lock": "lock", 546 "dashicons-unlock": "unlock", 547 "dashicons-calendar": "calendar", 548 "dashicons-calendar-alt": "calendar-alt", 549 "dashicons-visibility": "visibility", 550 "dashicons-hidden": "hidden", 551 "dashicons-post-status": "post-status", 552 "dashicons-edit": "edit", 553 "dashicons-post-trash": "post-trash", 554 "dashicons-trash": "trash", 555 "dashicons-sticky": "sticky", 556 "dashicons-external": "external", 557 "dashicons-arrow-up": "arrow-up", 558 "dashicons-arrow-down": "arrow-down", 559 "dashicons-arrow-left": "arrow-left", 560 "dashicons-arrow-right": "arrow-right", 561 "dashicons-arrow-up-alt": "arrow-up-alt", 562 "dashicons-arrow-down-alt": "arrow-down-alt", 563 "dashicons-arrow-left-alt": "arrow-left-alt", 564 "dashicons-arrow-right-alt": "arrow-right-alt", 565 "dashicons-arrow-up-alt2": "arrow-up-alt2", 566 "dashicons-arrow-down-alt2": "arrow-down-alt2", 567 "dashicons-arrow-left-alt2": "arrow-left-alt2", 568 "dashicons-arrow-right-alt2": "arrow-right-alt2", 569 "dashicons-leftright": "leftright", 570 "dashicons-sort": "sort", 571 "dashicons-randomize": "randomize", 572 "dashicons-list-view": "list-view", 573 "dashicons-exerpt-view": "exerpt-view", 574 "dashicons-excerpt-view": "excerpt-view", 575 "dashicons-grid-view": "grid-view", 576 "dashicons-move": "move", 577 "dashicons-hammer": "hammer", 578 "dashicons-art": "art", 579 "dashicons-migrate": "migrate", 580 "dashicons-performance": "performance", 581 "dashicons-universal-access": "universal-access", 582 "dashicons-universal-access-alt": "universal-access-alt", 583 "dashicons-tickets": "tickets", 584 "dashicons-nametag": "nametag", 585 "dashicons-clipboard": "clipboard", 586 "dashicons-heart": "heart", 587 "dashicons-megaphone": "megaphone", 588 "dashicons-schedule": "schedule", 589 "dashicons-wordpress": "wordpress", 590 "dashicons-wordpress-alt": "wordpress-alt", 591 "dashicons-pressthis": "pressthis", 592 "dashicons-update": "update", 593 "dashicons-screenoptions": "screenoptions", 594 "dashicons-cart": "cart", 595 "dashicons-feedback": "feedback", 596 "dashicons-cloud": "cloud", 597 "dashicons-translation": "translation", 598 "dashicons-tag": "tag", 599 "dashicons-category": "category", 600 "dashicons-archive": "archive", 601 "dashicons-tagcloud": "tagcloud", 602 "dashicons-text": "text", 603 "dashicons-media-archive": "media-archive", 604 "dashicons-media-audio": "media-audio", 605 "dashicons-media-code": "media-code", 606 "dashicons-media-default": "media-default", 607 "dashicons-media-document": "media-document", 608 "dashicons-media-interactive": "media-interactive", 609 "dashicons-media-spreadsheet": "media-spreadsheet", 610 "dashicons-media-text": "media-text", 611 "dashicons-media-video": "media-video", 612 "dashicons-playlist-audio": "playlist-audio", 613 "dashicons-playlist-video": "playlist-video", 614 "dashicons-controls-play": "controls-play", 615 "dashicons-controls-pause": "controls-pause", 616 "dashicons-controls-forward": "controls-forward", 617 "dashicons-controls-skipforward": "controls-skipforward", 618 "dashicons-controls-back": "controls-back", 619 "dashicons-controls-skipback": "controls-skipback", 620 "dashicons-controls-repeat": "controls-repeat", 621 "dashicons-controls-volumeon": "controls-volumeon", 622 "dashicons-controls-volumeoff": "controls-volumeoff", 623 "dashicons-yes": "yes", 624 "dashicons-no": "no", 625 "dashicons-no-alt": "no-alt", 626 "dashicons-plus": "plus", 627 "dashicons-plus-alt": "plus-alt", 628 "dashicons-plus-alt2": "plus-alt2", 629 "dashicons-minus": "minus", 630 "dashicons-dismiss": "dismiss", 631 "dashicons-marker": "marker", 632 "dashicons-star-filled": "star-filled", 633 "dashicons-star-half": "star-half", 634 "dashicons-star-empty": "star-empty", 635 "dashicons-flag": "flag", 636 "dashicons-info": "info", 637 "dashicons-warning": "warning", 638 "dashicons-share": "share", 639 "dashicons-share1": "share1", 640 "dashicons-share-alt": "share-alt", 641 "dashicons-share-alt2": "share-alt2", 642 "dashicons-twitter": "twitter", 643 "dashicons-rss": "rss", 644 "dashicons-email": "email", 645 "dashicons-email-alt": "email-alt", 646 "dashicons-facebook": "facebook", 647 "dashicons-facebook-alt": "facebook-alt", 648 "dashicons-networking": "networking", 649 "dashicons-googleplus": "googleplus", 650 "dashicons-location": "location", 651 "dashicons-location-alt": "location-alt", 652 "dashicons-camera": "camera", 653 "dashicons-images-alt": "images-alt", 654 "dashicons-images-alt2": "images-alt2", 655 "dashicons-video-alt": "video-alt", 656 "dashicons-video-alt2": "video-alt2", 657 "dashicons-video-alt3": "video-alt3", 658 "dashicons-vault": "vault", 659 "dashicons-shield": "shield", 660 "dashicons-shield-alt": "shield-alt", 661 "dashicons-sos": "sos", 662 "dashicons-search": "search", 663 "dashicons-slides": "slides", 664 "dashicons-analytics": "analytics", 665 "dashicons-chart-pie": "chart-pie", 666 "dashicons-chart-bar": "chart-bar", 667 "dashicons-chart-line": "chart-line", 668 "dashicons-chart-area": "chart-area", 669 "dashicons-groups": "groups", 670 "dashicons-businessman": "businessman", 671 "dashicons-id": "id", 672 "dashicons-id-alt": "id-alt", 673 "dashicons-products": "products", 674 "dashicons-awards": "awards", 675 "dashicons-forms": "forms", 676 "dashicons-testimonial": "testimonial", 677 "dashicons-portfolio": "portfolio", 678 "dashicons-book": "book", 679 "dashicons-book-alt": "book-alt", 680 "dashicons-download": "download", 681 "dashicons-upload": "upload", 682 "dashicons-backup": "backup", 683 "dashicons-clock": "clock", 684 "dashicons-lightbulb": "lightbulb", 685 "dashicons-microphone": "microphone", 686 "dashicons-desktop": "desktop", 687 "dashicons-laptop": "laptop", 688 "dashicons-tablet": "tablet", 689 "dashicons-smartphone": "smartphone", 690 "dashicons-phone": "phone", 691 "dashicons-smiley": "smiley", 692 "dashicons-index-card": "index-card", 693 "dashicons-carrot": "carrot", 694 "dashicons-building": "building", 695 "dashicons-store": "store", 696 "dashicons-album": "album", 697 "dashicons-palmtree": "palmtree", 698 "dashicons-tickets-alt": "tickets-alt", 699 "dashicons-money": "money", 700 "dashicons-thumbs-up": "thumbs-up", 701 "dashicons-thumbs-down": "thumbs-down", 702 "dashicons-layout": "layout", 703 "dashicons-paperclip": "paperclip" 704 }, 705 "default_value": "", 706 "allow_null": 0, 707 "ui": 0, 708 "ajax": 0, 709 "placeholder": "", 710 "disabled": 0, 711 "readonly": 0 712 }, 713 { 714 "key": "field_576f06fc83142", 715 "label": "Show in Admin Bar", 716 "name": "acpt_show_in_admin_bar", 717 "type": "true_false", 718 "instructions": "", 719 "required": 0, 720 "conditional_logic": 0, 721 "wrapper": { 722 "width": "", 723 "class": "", 724 "id": "" 725 }, 726 "message": "Whether to make this post type available in the WordPress admin bar.", 727 "default_value": true 728 }, 729 { 730 "key": "field_576f06fc8317a", 731 "label": "Labels", 732 "name": "", 733 "type": "tab", 734 "instructions": "", 735 "required": 0, 736 "conditional_logic": 0, 737 "wrapper": { 738 "width": "", 739 "class": "", 740 "id": "" 741 }, 742 "placement": "top", 743 "endpoint": 0 744 }, 745 { 746 "key": "field_5774abc0a9dfc", 747 "label": "Create Labels Automatically", 748 "name": "acpt_auto_generate_labels", 749 "type": "true_false", 750 "instructions": "", 751 "required": 0, 752 "conditional_logic": 0, 753 "wrapper": { 754 "width": "", 755 "class": "", 756 "id": "" 757 }, 758 "message": "Whether to automatically create the labels from the plural and singular names.", 759 "default_value": true 760 }, 761 { 762 "key": "field_576f06fc83188", 763 "label": "Add New", 764 "name": "acpt_label_add_new", 765 "type": "text", 766 "instructions": "the add new text. The default is \"Add New\" for both hierarchical and non-hierarchical post types.", 767 "required": 0, 768 "conditional_logic": 0, 769 "wrapper": { 770 "width": "", 771 "class": "", 772 "id": "" 773 }, 774 "default_value": "Add New", 775 "placeholder": "Add New", 776 "prepend": "", 777 "append": "", 778 "maxlength": "", 779 "readonly": 0, 780 "disabled": 0 781 }, 782 { 783 "key": "field_576f06fc83195", 784 "label": "Add New Item", 785 "name": "acpt_label_add_new_item", 786 "type": "text", 787 "instructions": "Default is Add New Post\/Add New Page.", 788 "required": 0, 789 "conditional_logic": 0, 790 "wrapper": { 791 "width": "", 792 "class": "", 793 "id": "" 794 }, 795 "default_value": "", 796 "placeholder": "", 797 "prepend": "", 798 "append": "", 799 "maxlength": "", 800 "readonly": 0, 801 "disabled": 0 802 }, 803 { 804 "key": "field_576f06fc831a3", 805 "label": "Edit Item", 806 "name": "acpt_label_edit_item", 807 "type": "text", 808 "instructions": "Default is Edit Post\/Edit Page.", 809 "required": 0, 810 "conditional_logic": 0, 811 "wrapper": { 812 "width": "", 813 "class": "", 814 "id": "" 815 }, 816 "default_value": "", 817 "placeholder": "", 818 "prepend": "", 819 "append": "", 820 "maxlength": "", 821 "readonly": 0, 822 "disabled": 0 823 }, 824 { 825 "key": "field_576f06fc831b0", 826 "label": "New Item", 827 "name": "acpt_label_new_item", 828 "type": "text", 829 "instructions": "Default is New Post\/New Page.", 830 "required": 0, 831 "conditional_logic": 0, 832 "wrapper": { 833 "width": "", 834 "class": "", 835 "id": "" 836 }, 837 "default_value": "", 838 "placeholder": "", 839 "prepend": "", 840 "append": "", 841 "maxlength": "", 842 "readonly": 0, 843 "disabled": 0 844 }, 845 { 846 "key": "field_576f06fc831be", 847 "label": "View Item", 848 "name": "acpt_label_view_item", 849 "type": "text", 850 "instructions": "Default is View Post\/View Page.", 851 "required": 0, 852 "conditional_logic": 0, 853 "wrapper": { 854 "width": "", 855 "class": "", 856 "id": "" 857 }, 858 "default_value": "", 859 "placeholder": "", 860 "prepend": "", 861 "append": "", 862 "maxlength": "", 863 "readonly": 0, 864 "disabled": 0 865 }, 866 { 867 "key": "field_576f06fc831cb", 868 "label": "Search Items", 869 "name": "acpt_label_search_items", 870 "type": "text", 871 "instructions": "Default is Search Posts\/Search Pages.\n", 872 "required": 0, 873 "conditional_logic": 0, 874 "wrapper": { 875 "width": "", 876 "class": "", 877 "id": "" 878 }, 879 "default_value": "", 880 "placeholder": "", 881 "prepend": "", 882 "append": "", 883 "maxlength": "", 884 "readonly": 0, 885 "disabled": 0 886 }, 887 { 888 "key": "field_576f06fc831d9", 889 "label": "Not Found", 890 "name": "acpt_label_not_found", 891 "type": "text", 892 "instructions": "Default is No posts found\/No pages found.\n", 893 "required": 0, 894 "conditional_logic": 0, 895 "wrapper": { 896 "width": "", 897 "class": "", 898 "id": "" 899 }, 900 "default_value": "", 901 "placeholder": "", 902 "prepend": "", 903 "append": "", 904 "maxlength": "", 905 "readonly": 0, 906 "disabled": 0 907 }, 908 { 909 "key": "field_576f06fc831e6", 910 "label": "Not Found in Trash", 911 "name": "acpt_label_not_found_in_trash", 912 "type": "text", 913 "instructions": "Default is No posts found in Trash\/No pages found in Trash.\n", 914 "required": 0, 915 "conditional_logic": 0, 916 "wrapper": { 917 "width": "", 918 "class": "", 919 "id": "" 920 }, 921 "default_value": "", 922 "placeholder": "", 923 "prepend": "", 924 "append": "", 925 "maxlength": "", 926 "readonly": 0, 927 "disabled": 0 928 }, 929 { 930 "key": "field_576f06fc831f3", 931 "label": "Parent Item Colon", 932 "name": "acpt_label_parent_item_colon", 933 "type": "text", 934 "instructions": "This string isn't used on non-hierarchical types. In hierarchical ones the default is 'Parent Page:'.", 935 "required": 0, 936 "conditional_logic": 0, 937 "wrapper": { 938 "width": "", 939 "class": "", 940 "id": "" 941 }, 942 "default_value": "", 943 "placeholder": "", 944 "prepend": "", 945 "append": "", 946 "maxlength": "", 947 "readonly": 0, 948 "disabled": 0 949 }, 950 { 951 "key": "field_576f06fc83200", 952 "label": "All Items", 953 "name": "acpt_label_all_items", 954 "type": "text", 955 "instructions": "Text for the submenu. Default is All Posts\/All Pages.\n", 956 "required": 0, 957 "conditional_logic": 0, 958 "wrapper": { 959 "width": "", 960 "class": "", 961 "id": "" 962 }, 963 "default_value": "", 964 "placeholder": "", 965 "prepend": "", 966 "append": "", 967 "maxlength": "", 968 "readonly": 0, 969 "disabled": 0 970 }, 971 { 972 "key": "field_576f06fc8320d", 973 "label": "Archives", 974 "name": "acpt_label_archives", 975 "type": "text", 976 "instructions": "Text for use with archives in nav menus. Default is Post Archives\/Page Archives.", 977 "required": 0, 978 "conditional_logic": 0, 979 "wrapper": { 980 "width": "", 981 "class": "", 982 "id": "" 983 }, 984 "default_value": "", 985 "placeholder": "", 986 "prepend": "", 987 "append": "", 988 "maxlength": "", 989 "readonly": 0, 990 "disabled": 0 991 }, 992 { 993 "key": "field_576f06fc8321b", 994 "label": "Insert into Item", 995 "name": "acpt_label_insert_into_item", 996 "type": "text", 997 "instructions": "Text for the media frame button. Default is Insert into post\/Insert into page.\n", 998 "required": 0, 999 "conditional_logic": 0, 1000 "wrapper": { 1001 "width": "", 1002 "class": "", 1003 "id": "" 1004 }, 1005 "default_value": "", 1006 "placeholder": "", 1007 "prepend": "", 1008 "append": "", 1009 "maxlength": "", 1010 "readonly": 0, 1011 "disabled": 0 1012 }, 1013 { 1014 "key": "field_576f06fc83228", 1015 "label": "Uploaded to This Item", 1016 "name": "acpt_label_uploaded_to_this_item", 1017 "type": "text", 1018 "instructions": "Text for the media frame filter. Default is Uploaded to this post\/Uploaded to this page.", 1019 "required": 0, 1020 "conditional_logic": 0, 1021 "wrapper": { 1022 "width": "", 1023 "class": "", 1024 "id": "" 1025 }, 1026 "default_value": "", 1027 "placeholder": "", 1028 "prepend": "", 1029 "append": "", 1030 "maxlength": "", 1031 "readonly": 0, 1032 "disabled": 0 1033 }, 1034 { 1035 "key": "field_576f06fc83235", 1036 "label": "Featured Image", 1037 "name": "acpt_label_featured_image", 1038 "type": "text", 1039 "instructions": "Default is Featured Image.\n", 1040 "required": 0, 1041 "conditional_logic": 0, 1042 "wrapper": { 1043 "width": "", 1044 "class": "", 1045 "id": "" 1046 }, 1047 "default_value": "Featured Image", 1048 "placeholder": "", 1049 "prepend": "", 1050 "append": "", 1051 "maxlength": "", 1052 "readonly": 0, 1053 "disabled": 0 1054 }, 1055 { 1056 "key": "field_576f06fc83242", 1057 "label": "Set Featured Image", 1058 "name": "acpt_label_set_featured_image", 1059 "type": "text", 1060 "instructions": "Default is Set featured image.\n", 1061 "required": 0, 1062 "conditional_logic": 0, 1063 "wrapper": { 1064 "width": "", 1065 "class": "", 1066 "id": "" 1067 }, 1068 "default_value": "Set featured image.", 1069 "placeholder": "", 1070 "prepend": "", 1071 "append": "", 1072 "maxlength": "", 1073 "readonly": 0, 1074 "disabled": 0 1075 }, 1076 { 1077 "key": "field_576f06fc83250", 1078 "label": "Remove Featured Image", 1079 "name": "acpt_label_remove_featured_image", 1080 "type": "text", 1081 "instructions": "Default is Remove featured image.\n", 1082 "required": 0, 1083 "conditional_logic": 0, 1084 "wrapper": { 1085 "width": "", 1086 "class": "", 1087 "id": "" 1088 }, 1089 "default_value": "Remove featured image.", 1090 "placeholder": "", 1091 "prepend": "", 1092 "append": "", 1093 "maxlength": "", 1094 "readonly": 0, 1095 "disabled": 0 1096 }, 1097 { 1098 "key": "field_576f06fc8325d", 1099 "label": "Use Featured Image", 1100 "name": "acpt_label_use_featured_image", 1101 "type": "text", 1102 "instructions": "Default is Use as featured image.\n", 1103 "required": 0, 1104 "conditional_logic": 0, 1105 "wrapper": { 1106 "width": "", 1107 "class": "", 1108 "id": "" 1109 }, 1110 "default_value": "Use as featured image.", 1111 "placeholder": "", 1112 "prepend": "", 1113 "append": "", 1114 "maxlength": "", 1115 "readonly": 0, 1116 "disabled": 0 1117 }, 1118 { 1119 "key": "field_576f06fc8326a", 1120 "label": "Menu Name", 1121 "name": "acpt_label_menu_name", 1122 "type": "text", 1123 "instructions": "Default is the same as `Plural Name`.", 1124 "required": 0, 1125 "conditional_logic": 0, 1126 "wrapper": { 1127 "width": "", 1128 "class": "", 1129 "id": "" 1130 }, 1131 "default_value": "", 1132 "placeholder": "", 1133 "prepend": "", 1134 "append": "", 1135 "maxlength": "", 1136 "readonly": 0, 1137 "disabled": 0 1138 }, 1139 { 1140 "key": "field_576f06fc83279", 1141 "label": "Filter Items List", 1142 "name": "acpt_label_filter_items_list", 1143 "type": "text", 1144 "instructions": "Text for the table views hidden heading.\n", 1145 "required": 0, 1146 "conditional_logic": 0, 1147 "wrapper": { 1148 "width": "", 1149 "class": "", 1150 "id": "" 1151 }, 1152 "default_value": "", 1153 "placeholder": "", 1154 "prepend": "", 1155 "append": "", 1156 "maxlength": "", 1157 "readonly": 0, 1158 "disabled": 0 1159 }, 1160 { 1161 "key": "field_576f06fc83286", 1162 "label": "Items List Navigation", 1163 "name": "acpt_label_items_list_navigation", 1164 "type": "text", 1165 "instructions": "Text for the table pagination hidden heading.\n", 1166 "required": 0, 1167 "conditional_logic": 0, 1168 "wrapper": { 1169 "width": "", 1170 "class": "", 1171 "id": "" 1172 }, 1173 "default_value": "", 1174 "placeholder": "", 1175 "prepend": "", 1176 "append": "", 1177 "maxlength": "", 1178 "readonly": 0, 1179 "disabled": 0 1180 }, 1181 { 1182 "key": "field_576f06fc83293", 1183 "label": "Items List", 1184 "name": "acpt_label_items_list", 1185 "type": "text", 1186 "instructions": "Text for the table hidden heading.\n", 1187 "required": 0, 1188 "conditional_logic": 0, 1189 "wrapper": { 1190 "width": "", 1191 "class": "", 1192 "id": "" 1193 }, 1194 "default_value": "", 1195 "placeholder": "", 1196 "prepend": "", 1197 "append": "", 1198 "maxlength": "", 1199 "readonly": 0, 1200 "disabled": 0 1201 }, 1202 { 1203 "key": "field_576f06fc832a0", 1204 "label": "Name Admin Bar", 1205 "name": "acpt_label_name_admin_bar", 1206 "type": "text", 1207 "instructions": "Text for use in New in Admin menu bar. Default is the same as `Singular Name`.", 1208 "required": 0, 1209 "conditional_logic": 0, 1210 "wrapper": { 1211 "width": "", 1212 "class": "", 1213 "id": "" 1214 }, 1215 "default_value": "", 1216 "placeholder": "", 1217 "prepend": "", 1218 "append": "", 1219 "maxlength": "", 1220 "readonly": 0, 1221 "disabled": 0 1222 }, 1223 { 1224 "key": "field_577817c143802", 1225 "label": "Rewrite", 1226 "name": "", 1227 "type": "tab", 1228 "instructions": "", 1229 "required": 0, 1230 "conditional_logic": [ 1231 [ 1232 { 1233 "field": "field_576f06fc59164", 1234 "operator": "==", 1235 "value": "1" 1236 } 1237 ] 1238 ], 1239 "wrapper": { 1240 "width": "", 1241 "class": "", 1242 "id": "" 1243 }, 1244 "placement": "top", 1245 "endpoint": 0 1246 }, 1247 { 1248 "key": "field_57781a8d43805", 1249 "label": "Slug", 1250 "name": "acpt_rewrite_with_front", 1251 "type": "true_false", 1252 "instructions": "", 1253 "required": 0, 1254 "conditional_logic": 0, 1255 "wrapper": { 1256 "width": "", 1257 "class": "", 1258 "id": "" 1259 }, 1260 "message": "Should the permalink structure be prepended with the front base.", 1261 "default_value": false, 1262 "hidden": true 1263 }, 1264 { 1265 "key": "field_577819f443804", 1266 "label": "Slug", 1267 "name": "acpt_rewrite_slug", 1268 "type": "text", 1269 "instructions": "Customize the permalink structure slug. Defaults to a URL friendly version of the singular name value. Should be translatable.", 1270 "required": 0, 1271 "conditional_logic": 0, 1272 "wrapper": { 1273 "width": "", 1274 "class": "", 1275 "id": "" 1276 }, 1277 "default_value": "", 1278 "placeholder": "", 1279 "prepend": "\/", 1280 "append": "", 1281 "maxlength": "", 1282 "readonly": 0, 1283 "disabled": 0 1284 }, 1285 { 1286 "key": "field_57781b3343807", 1287 "label": "Feeds", 1288 "name": "acpt_rewrite_feeds", 1289 "type": "true_false", 1290 "instructions": "", 1291 "required": 0, 1292 "conditional_logic": 0, 1293 "wrapper": { 1294 "width": "", 1295 "class": "", 1296 "id": "" 1297 }, 1298 "message": "Whether a feed permalink structure should be built for this post type. Defaults to the 'Has Archive' value.", 1299 "default_value": true 1300 }, 1301 { 1302 "key": "field_5778210043808", 1303 "label": "Pages", 1304 "name": "acpt_rewrite_pages", 1305 "type": "true_false", 1306 "instructions": "", 1307 "required": 0, 1308 "conditional_logic": 0, 1309 "wrapper": { 1310 "width": "", 1311 "class": "", 1312 "id": "" 1313 }, 1314 "message": "Whether the permalink structure should provide for pagination.", 1315 "default_value": true 1316 }, 1317 { 1318 "key": "field_576f06fc73106", 1319 "label": "REST API", 1320 "name": "", 1321 "type": "tab", 1322 "instructions": "", 1323 "required": 0, 1324 "conditional_logic": [ 1325 [ 1326 { 1327 "field": "field_576f06fc830c9", 1328 "operator": "==", 1329 "value": "1" 1330 } 1331 ] 1332 ], 1333 "wrapper": { 1334 "width": "", 1335 "class": "", 1336 "id": "" 1337 }, 1338 "placement": "top", 1339 "endpoint": 0 1340 }, 1341 { 1342 "key": "field_576f06fc830d6", 1343 "label": "Base Slug", 1344 "name": "acpt_rest_base", 1345 "type": "text", 1346 "instructions": "The base slug that this post type will use when accessed using the REST API.", 1347 "required": 0, 1348 "conditional_logic": 0, 1349 "wrapper": { 1350 "width": "", 1351 "class": "", 1352 "id": "" 1353 }, 1354 "default_value": "", 1355 "placeholder": "", 1356 "prepend": "", 1357 "append": "", 1358 "maxlength": "", 1359 "readonly": 0, 1360 "disabled": 0 1361 }, 1362 { 1363 "key": "field_576f06fc830e4", 1364 "label": "Controller Class", 1365 "name": "acpt_rest_controller_class", 1366 "type": "text", 1367 "instructions": "An optional custom controller to use instead of WP_REST_Posts_Controller. Must be a subclass of WP_REST_Controller.", 1368 "required": 0, 1369 "conditional_logic": [ 1370 [ 1371 { 1372 "field": "field_576f06fc830c9", 1373 "operator": "==", 1374 "value": "1" 1375 } 1376 ] 1377 ], 1378 "wrapper": { 1379 "width": "", 1380 "class": "child-field", 1381 "id": "" 1382 }, 1383 "default_value": "", 1384 "placeholder": "", 1385 "prepend": "", 1386 "append": "", 1387 "maxlength": "", 1388 "readonly": 0, 1389 "disabled": 0 1390 } 1391 ], 1392 "location": [ 1393 [ 1394 { 1395 "param": "post_type", 1396 "operator": "==", 1397 "value": "acpt_content_type" 1398 } 1399 ] 1400 ], 1401 "menu_order": 100, 1402 "position": "normal", 1403 "style": "default", 1404 "label_placement": "top", 1405 "instruction_placement": "field", 1406 "hide_on_screen": "", 1407 "active": 1, 1408 "description": "" 1409 }, 1410 "supports": { 1411 "key": "group_576f06faa6677", 1412 "title": "acpt-supports", 1413 "fields": [ 1414 { 1415 "key": "field_576f06faaa174", 1416 "label": "Supported Functionality", 1417 "name": "acpt_supports", 1418 "type": "checkbox", 1419 "instructions": "", 1420 "required": 0, 1421 "conditional_logic": 0, 1422 "wrapper": { 1423 "width": "", 1424 "class": "", 1425 "id": "" 1426 }, 1427 "choices": { 1428 "title": "Title", 1429 "editor": "Content Editor", 1430 "author": "Author", 1431 "thumbnail": "Thumbnail", 1432 "excerpt": "Excerpt", 1433 "trackbacks": "Trackbacks", 1434 "custom-fields": "Custom Fields", 1435 "comments": "Comments", 1436 "revisions": "Revisions", 1437 "page-attributes": "Page Attributes", 1438 "post-formats": "Post Formats" 1439 }, 1440 "default_value": [ 1441 "title", 1442 "editor" 1443 ], 1444 "layout": "vertical", 1445 "toggle": 0 1446 } 1447 ], 1448 "location": [ 1449 [ 1450 { 1451 "param": "post_type", 1452 "operator": "==", 1453 "value": "acpt_content_type" 1454 } 1455 ] 1456 ], 1457 "menu_order": 0, 1458 "position": "side", 1459 "style": "default", 1460 "label_placement": "top", 1461 "instruction_placement": "field", 1462 "hide_on_screen": "", 1463 "active": 1, 1464 "description": "", 1465 "local": "php" 1466 }, 1467 "taxonomies": { 1468 "key": "group_576f1c751aed7", 1469 "title": "acpt-taxonomies", 1470 "fields": [ 1471 { 1472 "key": "field_576f1c751d202", 1473 "label": "Taxonomies", 1474 "name": "acpt_taxonomies", 1475 "type": "checkbox", 1476 "instructions": "", 1477 "required": 0, 1478 "conditional_logic": 0, 1479 "wrapper": { 1480 "width": "", 1481 "class": "", 1482 "id": "" 1483 }, 1484 "choices": { 1485 "category": "Categories", 1486 "post_tag": "Tags" 1487 }, 1488 "default_value": [], 1489 "layout": "vertical", 1490 "toggle": 0, 1491 "multiple": true 1492 } 1493 ], 1494 "location": [ 1495 [ 1496 { 1497 "param": "post_type", 1498 "operator": "==", 1499 "value": "acpt_content_type" 1500 } 1501 ] 1502 ], 1503 "menu_order": 0, 1504 "position": "side", 1505 "style": "default", 1506 "label_placement": "top", 1507 "instruction_placement": "field", 1508 "hide_on_screen": "", 1509 "active": 1, 1510 "description": "", 1511 "local": "php" 1512 } 2 "basic": { 3 "key": "group_576c917f2166e", 4 "title": "acpt-basic", 5 "fields": [ 6 { 7 "key": "field_576c9220dcc28", 8 "label": "Plural Name", 9 "name": "acpt_plural_name", 10 "type": "text", 11 "instructions": "General name for the post type. Default is Posts\/Pages", 12 "required": 1, 13 "conditional_logic": 0, 14 "wrapper": { 15 "width": "", 16 "class": "", 17 "id": "" 18 }, 19 "default_value": "", 20 "placeholder": "", 21 "prepend": "", 22 "append": "", 23 "maxlength": "", 24 "readonly": 0, 25 "disabled": 0 26 }, 27 { 28 "key": "field_576c92a8dcc29", 29 "label": "Singular Name", 30 "name": "acpt_singular_name", 31 "type": "text", 32 "instructions": "Name for one object of this post type. Default is Post\/Page", 33 "required": 1, 34 "conditional_logic": 0, 35 "wrapper": { 36 "width": "", 37 "class": "", 38 "id": "" 39 }, 40 "default_value": "", 41 "placeholder": "", 42 "prepend": "", 43 "append": "", 44 "maxlength": "", 45 "readonly": 0, 46 "disabled": 0 47 }, 48 { 49 "key": "field_576c92a8dcc20", 50 "label": "Post Type Name", 51 "name": "acpt_post_type_name", 52 "type": "text", 53 "instructions": "Max. 20 characters, cannot contain capital letters or spaces. Generated from singular name.", 54 "required": 0, 55 "conditional_logic": 0, 56 "wrapper": { 57 "width": "", 58 "class": "", 59 "id": "" 60 }, 61 "default_value": "", 62 "placeholder": "", 63 "prepend": "", 64 "append": "", 65 "maxlength": 20, 66 "readonly": 1, 67 "disabled": 0 68 }, 69 { 70 "key": "field_576ca22e38fa5", 71 "label": "Description", 72 "name": "acpt_description", 73 "type": "textarea", 74 "instructions": "A short descriptive summary of what the post type is.", 75 "required": 0, 76 "conditional_logic": 0, 77 "wrapper": { 78 "width": "", 79 "class": "", 80 "id": "" 81 }, 82 "default_value": "", 83 "placeholder": "", 84 "maxlength": "", 85 "rows": 3, 86 "new_lines": "", 87 "readonly": 0, 88 "disabled": 0 89 }, 90 { 91 "key": "field_576caf4c3f8e8", 92 "label": "Hierarchical", 93 "name": "acpt_hierarchical", 94 "type": "true_false", 95 "instructions": "Page attributes must be included in supported functionality to show the parent select box on the editor page.", 96 "required": 0, 97 "conditional_logic": 0, 98 "wrapper": { 99 "width": "", 100 "class": "", 101 "id": "" 102 }, 103 "message": "Whether the post type allows a parent to be specified.", 104 "default_value": false 105 } 106 ], 107 "location": [ 108 [ 109 { 110 "param": "post_type", 111 "operator": "==", 112 "value": "acpt_content_type" 113 } 114 ] 115 ], 116 "menu_order": 0, 117 "position": "normal", 118 "style": "default", 119 "label_placement": "top", 120 "instruction_placement": "field", 121 "hide_on_screen": "", 122 "active": 1, 123 "description": "" 124 }, 125 "advanced": { 126 "key": "group_576f06fc7f2f2", 127 "title": "acpt-advanced", 128 "fields": [ 129 { 130 "key": "field_576f06fc8303d", 131 "label": "Advanced", 132 "name": "", 133 "type": "tab", 134 "instructions": "", 135 "required": 0, 136 "conditional_logic": 0, 137 "wrapper": { 138 "width": "", 139 "class": "", 140 "id": "" 141 }, 142 "placement": "top", 143 "endpoint": 1 144 }, 145 { 146 "key": "field_576f06fc83060", 147 "label": "Public", 148 "name": "acpt_public", 149 "type": "true_false", 150 "instructions": "", 151 "required": 0, 152 "conditional_logic": 0, 153 "wrapper": { 154 "width": "", 155 "class": "", 156 "id": "" 157 }, 158 "message": "Controls how the type is visible to authors and readers.", 159 "default_value": true 160 }, 161 { 162 "key": "field_576f06fc83119", 163 "label": "Show in Admin UI", 164 "name": "acpt_show_ui", 165 "type": "true_false", 166 "instructions": "", 167 "required": 0, 168 "conditional_logic": 0, 169 "wrapper": { 170 "width": "", 171 "class": "", 172 "id": "" 173 }, 174 "message": "Whether to generate a default UI for managing this post type in the admin.", 175 "default_value": true 176 }, 177 { 178 "key": "field_576f06fc59164", 179 "label": "Rewrite URL", 180 "name": "acpt_rewrite", 181 "type": "true_false", 182 "instructions": "", 183 "required": 0, 184 "conditional_logic": 0, 185 "wrapper": { 186 "width": "", 187 "class": "", 188 "id": "" 189 }, 190 "message": "Whether to trigger the handling of rewrites for this post type.", 191 "default_value": true 192 }, 193 { 194 "key": "field_576f06fc830c9", 195 "label": "Show in REST API", 196 "name": "acpt_show_in_rest", 197 "type": "true_false", 198 "instructions": "", 199 "required": 0, 200 "conditional_logic": 0, 201 "wrapper": { 202 "width": "", 203 "class": "", 204 "id": "" 205 }, 206 "message": "Whether to expose this post type in the REST API.", 207 "default_value": false 208 }, 209 { 210 "key": "field_576f06fc22742", 211 "label": "Has Archive", 212 "name": "acpt_has_archive", 213 "type": "true_false", 214 "instructions": "", 215 "required": 0, 216 "conditional_logic": 0, 217 "wrapper": { 218 "width": "", 219 "class": "", 220 "id": "" 221 }, 222 "message": "Whether post type archives are enabled.", 223 "default_value": false 224 }, 225 { 226 "key": "field_576f06fc32742", 227 "label": "Show in Navigation Menus", 228 "name": "acpt_show_in_nav_menus", 229 "type": "true_false", 230 "instructions": "", 231 "required": 0, 232 "conditional_logic": 0, 233 "wrapper": { 234 "width": "", 235 "class": "", 236 "id": "" 237 }, 238 "message": "Whether post type is available for selection in navigation menus..", 239 "default_value": true 240 }, 241 { 242 "key": "field_576f06fc83082", 243 "label": "Exclude from Search", 244 "name": "acpt_exclude_from_search", 245 "type": "true_false", 246 "instructions": "", 247 "required": 0, 248 "conditional_logic": 0, 249 "wrapper": { 250 "width": "", 251 "class": "", 252 "id": "" 253 }, 254 "message": "Whether to exclude posts with this post type from front end search results.", 255 "default_value": false 256 }, 257 { 258 "key": "field_576f06fc830ae", 259 "label": "Publicly Queryable", 260 "name": "acpt_publicly_queryable", 261 "type": "true_false", 262 "instructions": "", 263 "required": 0, 264 "conditional_logic": 0, 265 "wrapper": { 266 "width": "", 267 "class": "", 268 "id": "" 269 }, 270 "message": "Whether queries can be performed on the front end.", 271 "default_value": true 272 }, 273 { 274 "key": "field_576f06fc830bb", 275 "label": "Can Export", 276 "name": "acpt_can_export", 277 "type": "true_false", 278 "instructions": "", 279 "required": 0, 280 "conditional_logic": 0, 281 "wrapper": { 282 "width": "", 283 "class": "", 284 "id": "" 285 }, 286 "message": "Whether this post type can be exported.", 287 "default_value": true 288 }, 289 { 290 "key": "field_576f06fc83106", 291 "label": "Admin", 292 "name": "", 293 "type": "tab", 294 "instructions": "", 295 "required": 0, 296 "conditional_logic": [ 297 [ 298 { 299 "field": "field_576f06fc83119", 300 "operator": "==", 301 "value": "1" 302 } 303 ] 304 ], 305 "wrapper": { 306 "width": "", 307 "class": "", 308 "id": "" 309 }, 310 "placement": "top", 311 "endpoint": 0 312 }, 313 { 314 "key": "field_576f06fc83127", 315 "label": "Show in Admin Menu", 316 "name": "acpt_show_in_menu", 317 "type": "true_false", 318 "instructions": "", 319 "required": 0, 320 "conditional_logic": 0, 321 "wrapper": { 322 "width": "", 323 "class": "", 324 "id": "" 325 }, 326 "message": "Whether to show the post type in the admin menu.", 327 "default_value": true 328 }, 329 { 330 "key": "field_576f06fc23127", 331 "label": "Show under a Parent", 332 "name": "acpt_show_under_a_parent", 333 "type": "true_false", 334 "instructions": "", 335 "required": 0, 336 "wrapper": { 337 "width": "", 338 "class": "child-field", 339 "id": "" 340 }, 341 "message": "Whether to show the post type under a parent.", 342 "default_value": false, 343 "conditional_logic": [ 344 [ 345 { 346 "field": "field_576f06fc83127", 347 "operator": "==", 348 "value": "1" 349 } 350 ] 351 ] 352 }, 353 { 354 "key": "field_576f06fc83135", 355 "label": "Under Parent", 356 "name": "acpt_show_under_parent", 357 "type": "select", 358 "instructions": "The post type will be placed as a sub menu of the selected page.", 359 "required": 0, 360 "wrapper": { 361 "width": "", 362 "class": "child-field", 363 "id": "" 364 }, 365 "default_value": "", 366 "conditional_logic": [ 367 [ 368 { 369 "field": "field_576f06fc23127", 370 "operator": "==", 371 "value": "1" 372 } 373 ] 374 ], 375 "choices": [] 376 }, 377 { 378 "key": "field_576f06fc83150", 379 "label": "Menu Position", 380 "name": "acpt_menu_position", 381 "type": "select", 382 "instructions": "", 383 "required": 0, 384 "conditional_logic": [ 385 [ 386 { 387 "field": "field_576f06fc23127", 388 "operator": "!=", 389 "value": "1" 390 }, 391 { 392 "field": "field_576f06fc83127", 393 "operator": "==", 394 "value": "1" 395 } 396 ] 397 ], 398 "wrapper": { 399 "width": "", 400 "class": "", 401 "id": "" 402 }, 403 "choices": { 404 "-1": "Custom Position", 405 "5": "5 - below Posts", 406 "10": "10 - below Media", 407 "15": "15 - below Links", 408 "20": "20 - below Pages", 409 "25": "25 - below comments", 410 "60": "60 - below first separator", 411 "65": "65 - below Plugins", 412 "70": "70 - below Users", 413 "75": "75 - below Tools", 414 "80": "80 - below Settings", 415 "100": "100 - below second separator" 416 }, 417 "default_value": 5, 418 "allow_null": 0, 419 "ui": 0, 420 "ajax": 0, 421 "placeholder": "", 422 "disabled": 0, 423 "readonly": 0 424 }, 425 { 426 "key": "field_576f06fc8315f", 427 "label": "Custom Position", 428 "name": "acpt_menu_position_custom", 429 "type": "number", 430 "instructions": "", 431 "required": 0, 432 "conditional_logic": [ 433 [ 434 { 435 "field": "field_576f06fc83150", 436 "operator": "==", 437 "value": "-1" 438 } 439 ] 440 ], 441 "wrapper": { 442 "width": "", 443 "class": "child-field hide-title", 444 "id": "" 445 }, 446 "default_value": "", 447 "placeholder": "", 448 "prepend": "", 449 "append": "", 450 "min": "", 451 "max": "", 452 "step": "", 453 "readonly": 0, 454 "disabled": 0 455 }, 456 { 457 "key": "field_576f06fc8316d", 458 "label": "Menu Icon", 459 "name": "acpt_menu_icon", 460 "type": "select", 461 "instructions": "", 462 "required": 0, 463 "conditional_logic": [ 464 [ 465 { 466 "field": "field_576f06fc23127", 467 "operator": "!=", 468 "value": "1" 469 }, 470 { 471 "field": "field_576f06fc83127", 472 "operator": "==", 473 "value": "1" 474 } 475 ] 476 ], 477 "wrapper": { 478 "width": "", 479 "class": "", 480 "id": "" 481 }, 482 "choices": { 483 "": "Select Icon", 484 "dashicons-menu": "menu", 485 "dashicons-admin-site": "admin-site", 486 "dashicons-dashboard": "dashboard", 487 "dashicons-admin-media": "admin-media", 488 "dashicons-admin-page": "admin-page", 489 "dashicons-admin-comments": "admin-comments", 490 "dashicons-admin-appearance": "admin-appearance", 491 "dashicons-admin-plugins": "admin-plugins", 492 "dashicons-admin-users": "admin-users", 493 "dashicons-admin-tools": "admin-tools", 494 "dashicons-admin-settings": "admin-settings", 495 "dashicons-admin-network": "admin-network", 496 "dashicons-admin-generic": "admin-generic", 497 "dashicons-admin-home": "admin-home", 498 "dashicons-admin-collapse": "admin-collapse", 499 "dashicons-filter": "filter", 500 "dashicons-admin-customizer": "admin-customizer", 501 "dashicons-admin-multisite": "admin-multisite", 502 "dashicons-admin-links": "admin-links", 503 "dashicons-format-links": "format-links", 504 "dashicons-admin-post": "admin-post", 505 "dashicons-format-standard": "format-standard", 506 "dashicons-format-image": "format-image", 507 "dashicons-format-gallery": "format-gallery", 508 "dashicons-format-audio": "format-audio", 509 "dashicons-format-video": "format-video", 510 "dashicons-format-chat": "format-chat", 511 "dashicons-format-status": "format-status", 512 "dashicons-format-aside": "format-aside", 513 "dashicons-format-quote": "format-quote", 514 "dashicons-welcome-write-blog": "welcome-write-blog", 515 "dashicons-welcome-edit-page": "welcome-edit-page", 516 "dashicons-welcome-add-page": "welcome-add-page", 517 "dashicons-welcome-view-site": "welcome-view-site", 518 "dashicons-welcome-widgets-menus": "welcome-widgets-menus", 519 "dashicons-welcome-comments": "welcome-comments", 520 "dashicons-welcome-learn-more": "welcome-learn-more", 521 "dashicons-image-crop": "image-crop", 522 "dashicons-image-rotate": "image-rotate", 523 "dashicons-image-rotate-left": "image-rotate-left", 524 "dashicons-image-rotate-right": "image-rotate-right", 525 "dashicons-image-flip-vertical": "image-flip-vertical", 526 "dashicons-image-flip-horizontal": "image-flip-horizontal", 527 "dashicons-image-filter": "image-filter", 528 "dashicons-undo": "undo", 529 "dashicons-redo": "redo", 530 "dashicons-editor-bold": "editor-bold", 531 "dashicons-editor-italic": "editor-italic", 532 "dashicons-editor-ul": "editor-ul", 533 "dashicons-editor-ol": "editor-ol", 534 "dashicons-editor-quote": "editor-quote", 535 "dashicons-editor-alignleft": "editor-alignleft", 536 "dashicons-editor-aligncenter": "editor-aligncenter", 537 "dashicons-editor-alignright": "editor-alignright", 538 "dashicons-editor-insertmore": "editor-insertmore", 539 "dashicons-editor-spellcheck": "editor-spellcheck", 540 "dashicons-editor-distractionfree": "editor-distractionfree", 541 "dashicons-editor-expand": "editor-expand", 542 "dashicons-editor-contract": "editor-contract", 543 "dashicons-editor-kitchensink": "editor-kitchensink", 544 "dashicons-editor-underline": "editor-underline", 545 "dashicons-editor-justify": "editor-justify", 546 "dashicons-editor-textcolor": "editor-textcolor", 547 "dashicons-editor-paste-word": "editor-paste-word", 548 "dashicons-editor-paste-text": "editor-paste-text", 549 "dashicons-editor-removeformatting": "editor-removeformatting", 550 "dashicons-editor-video": "editor-video", 551 "dashicons-editor-customchar": "editor-customchar", 552 "dashicons-editor-outdent": "editor-outdent", 553 "dashicons-editor-indent": "editor-indent", 554 "dashicons-editor-help": "editor-help", 555 "dashicons-editor-strikethrough": "editor-strikethrough", 556 "dashicons-editor-unlink": "editor-unlink", 557 "dashicons-editor-rtl": "editor-rtl", 558 "dashicons-editor-break": "editor-break", 559 "dashicons-editor-code": "editor-code", 560 "dashicons-editor-paragraph": "editor-paragraph", 561 "dashicons-editor-table": "editor-table", 562 "dashicons-align-left": "align-left", 563 "dashicons-align-right": "align-right", 564 "dashicons-align-center": "align-center", 565 "dashicons-align-none": "align-none", 566 "dashicons-lock": "lock", 567 "dashicons-unlock": "unlock", 568 "dashicons-calendar": "calendar", 569 "dashicons-calendar-alt": "calendar-alt", 570 "dashicons-visibility": "visibility", 571 "dashicons-hidden": "hidden", 572 "dashicons-post-status": "post-status", 573 "dashicons-edit": "edit", 574 "dashicons-post-trash": "post-trash", 575 "dashicons-trash": "trash", 576 "dashicons-sticky": "sticky", 577 "dashicons-external": "external", 578 "dashicons-arrow-up": "arrow-up", 579 "dashicons-arrow-down": "arrow-down", 580 "dashicons-arrow-left": "arrow-left", 581 "dashicons-arrow-right": "arrow-right", 582 "dashicons-arrow-up-alt": "arrow-up-alt", 583 "dashicons-arrow-down-alt": "arrow-down-alt", 584 "dashicons-arrow-left-alt": "arrow-left-alt", 585 "dashicons-arrow-right-alt": "arrow-right-alt", 586 "dashicons-arrow-up-alt2": "arrow-up-alt2", 587 "dashicons-arrow-down-alt2": "arrow-down-alt2", 588 "dashicons-arrow-left-alt2": "arrow-left-alt2", 589 "dashicons-arrow-right-alt2": "arrow-right-alt2", 590 "dashicons-leftright": "leftright", 591 "dashicons-sort": "sort", 592 "dashicons-randomize": "randomize", 593 "dashicons-list-view": "list-view", 594 "dashicons-exerpt-view": "exerpt-view", 595 "dashicons-excerpt-view": "excerpt-view", 596 "dashicons-grid-view": "grid-view", 597 "dashicons-move": "move", 598 "dashicons-hammer": "hammer", 599 "dashicons-art": "art", 600 "dashicons-migrate": "migrate", 601 "dashicons-performance": "performance", 602 "dashicons-universal-access": "universal-access", 603 "dashicons-universal-access-alt": "universal-access-alt", 604 "dashicons-tickets": "tickets", 605 "dashicons-nametag": "nametag", 606 "dashicons-clipboard": "clipboard", 607 "dashicons-heart": "heart", 608 "dashicons-megaphone": "megaphone", 609 "dashicons-schedule": "schedule", 610 "dashicons-wordpress": "wordpress", 611 "dashicons-wordpress-alt": "wordpress-alt", 612 "dashicons-pressthis": "pressthis", 613 "dashicons-update": "update", 614 "dashicons-screenoptions": "screenoptions", 615 "dashicons-cart": "cart", 616 "dashicons-feedback": "feedback", 617 "dashicons-cloud": "cloud", 618 "dashicons-translation": "translation", 619 "dashicons-tag": "tag", 620 "dashicons-category": "category", 621 "dashicons-archive": "archive", 622 "dashicons-tagcloud": "tagcloud", 623 "dashicons-text": "text", 624 "dashicons-media-archive": "media-archive", 625 "dashicons-media-audio": "media-audio", 626 "dashicons-media-code": "media-code", 627 "dashicons-media-default": "media-default", 628 "dashicons-media-document": "media-document", 629 "dashicons-media-interactive": "media-interactive", 630 "dashicons-media-spreadsheet": "media-spreadsheet", 631 "dashicons-media-text": "media-text", 632 "dashicons-media-video": "media-video", 633 "dashicons-playlist-audio": "playlist-audio", 634 "dashicons-playlist-video": "playlist-video", 635 "dashicons-controls-play": "controls-play", 636 "dashicons-controls-pause": "controls-pause", 637 "dashicons-controls-forward": "controls-forward", 638 "dashicons-controls-skipforward": "controls-skipforward", 639 "dashicons-controls-back": "controls-back", 640 "dashicons-controls-skipback": "controls-skipback", 641 "dashicons-controls-repeat": "controls-repeat", 642 "dashicons-controls-volumeon": "controls-volumeon", 643 "dashicons-controls-volumeoff": "controls-volumeoff", 644 "dashicons-yes": "yes", 645 "dashicons-no": "no", 646 "dashicons-no-alt": "no-alt", 647 "dashicons-plus": "plus", 648 "dashicons-plus-alt": "plus-alt", 649 "dashicons-plus-alt2": "plus-alt2", 650 "dashicons-minus": "minus", 651 "dashicons-dismiss": "dismiss", 652 "dashicons-marker": "marker", 653 "dashicons-star-filled": "star-filled", 654 "dashicons-star-half": "star-half", 655 "dashicons-star-empty": "star-empty", 656 "dashicons-flag": "flag", 657 "dashicons-info": "info", 658 "dashicons-warning": "warning", 659 "dashicons-share": "share", 660 "dashicons-share1": "share1", 661 "dashicons-share-alt": "share-alt", 662 "dashicons-share-alt2": "share-alt2", 663 "dashicons-twitter": "twitter", 664 "dashicons-rss": "rss", 665 "dashicons-email": "email", 666 "dashicons-email-alt": "email-alt", 667 "dashicons-facebook": "facebook", 668 "dashicons-facebook-alt": "facebook-alt", 669 "dashicons-networking": "networking", 670 "dashicons-googleplus": "googleplus", 671 "dashicons-location": "location", 672 "dashicons-location-alt": "location-alt", 673 "dashicons-camera": "camera", 674 "dashicons-images-alt": "images-alt", 675 "dashicons-images-alt2": "images-alt2", 676 "dashicons-video-alt": "video-alt", 677 "dashicons-video-alt2": "video-alt2", 678 "dashicons-video-alt3": "video-alt3", 679 "dashicons-vault": "vault", 680 "dashicons-shield": "shield", 681 "dashicons-shield-alt": "shield-alt", 682 "dashicons-sos": "sos", 683 "dashicons-search": "search", 684 "dashicons-slides": "slides", 685 "dashicons-analytics": "analytics", 686 "dashicons-chart-pie": "chart-pie", 687 "dashicons-chart-bar": "chart-bar", 688 "dashicons-chart-line": "chart-line", 689 "dashicons-chart-area": "chart-area", 690 "dashicons-groups": "groups", 691 "dashicons-businessman": "businessman", 692 "dashicons-id": "id", 693 "dashicons-id-alt": "id-alt", 694 "dashicons-products": "products", 695 "dashicons-awards": "awards", 696 "dashicons-forms": "forms", 697 "dashicons-testimonial": "testimonial", 698 "dashicons-portfolio": "portfolio", 699 "dashicons-book": "book", 700 "dashicons-book-alt": "book-alt", 701 "dashicons-download": "download", 702 "dashicons-upload": "upload", 703 "dashicons-backup": "backup", 704 "dashicons-clock": "clock", 705 "dashicons-lightbulb": "lightbulb", 706 "dashicons-microphone": "microphone", 707 "dashicons-desktop": "desktop", 708 "dashicons-laptop": "laptop", 709 "dashicons-tablet": "tablet", 710 "dashicons-smartphone": "smartphone", 711 "dashicons-phone": "phone", 712 "dashicons-smiley": "smiley", 713 "dashicons-index-card": "index-card", 714 "dashicons-carrot": "carrot", 715 "dashicons-building": "building", 716 "dashicons-store": "store", 717 "dashicons-album": "album", 718 "dashicons-palmtree": "palmtree", 719 "dashicons-tickets-alt": "tickets-alt", 720 "dashicons-money": "money", 721 "dashicons-thumbs-up": "thumbs-up", 722 "dashicons-thumbs-down": "thumbs-down", 723 "dashicons-layout": "layout", 724 "dashicons-paperclip": "paperclip" 725 }, 726 "default_value": "", 727 "allow_null": 0, 728 "ui": 0, 729 "ajax": 0, 730 "placeholder": "", 731 "disabled": 0, 732 "readonly": 0 733 }, 734 { 735 "key": "field_576f06fc83142", 736 "label": "Show in Admin Bar", 737 "name": "acpt_show_in_admin_bar", 738 "type": "true_false", 739 "instructions": "", 740 "required": 0, 741 "conditional_logic": 0, 742 "wrapper": { 743 "width": "", 744 "class": "", 745 "id": "" 746 }, 747 "message": "Whether to make this post type available in the WordPress admin bar.", 748 "default_value": true 749 }, 750 { 751 "key": "field_576f06fc8317a", 752 "label": "Labels", 753 "name": "", 754 "type": "tab", 755 "instructions": "", 756 "required": 0, 757 "conditional_logic": 0, 758 "wrapper": { 759 "width": "", 760 "class": "", 761 "id": "" 762 }, 763 "placement": "top", 764 "endpoint": 0 765 }, 766 { 767 "key": "field_5774abc0a9dfc", 768 "label": "Create Labels Automatically", 769 "name": "acpt_auto_generate_labels", 770 "type": "true_false", 771 "instructions": "", 772 "required": 0, 773 "conditional_logic": 0, 774 "wrapper": { 775 "width": "", 776 "class": "", 777 "id": "" 778 }, 779 "message": "Whether to automatically create the labels from the plural and singular names.", 780 "default_value": true 781 }, 782 { 783 "key": "field_576f06fc83188", 784 "label": "Add New", 785 "name": "acpt_label_add_new", 786 "type": "text", 787 "instructions": "the add new text. The default is \"Add New\" for both hierarchical and non-hierarchical post types.", 788 "required": 0, 789 "conditional_logic": 0, 790 "wrapper": { 791 "width": "", 792 "class": "", 793 "id": "" 794 }, 795 "default_value": "Add New", 796 "placeholder": "Add New", 797 "prepend": "", 798 "append": "", 799 "maxlength": "", 800 "readonly": 0, 801 "disabled": 0 802 }, 803 { 804 "key": "field_576f06fc83195", 805 "label": "Add New Item", 806 "name": "acpt_label_add_new_item", 807 "type": "text", 808 "instructions": "Default is Add New Post\/Add New Page.", 809 "required": 0, 810 "conditional_logic": 0, 811 "wrapper": { 812 "width": "", 813 "class": "", 814 "id": "" 815 }, 816 "default_value": "", 817 "placeholder": "", 818 "prepend": "", 819 "append": "", 820 "maxlength": "", 821 "readonly": 0, 822 "disabled": 0 823 }, 824 { 825 "key": "field_576f06fc831a3", 826 "label": "Edit Item", 827 "name": "acpt_label_edit_item", 828 "type": "text", 829 "instructions": "Default is Edit Post\/Edit Page.", 830 "required": 0, 831 "conditional_logic": 0, 832 "wrapper": { 833 "width": "", 834 "class": "", 835 "id": "" 836 }, 837 "default_value": "", 838 "placeholder": "", 839 "prepend": "", 840 "append": "", 841 "maxlength": "", 842 "readonly": 0, 843 "disabled": 0 844 }, 845 { 846 "key": "field_576f06fc831b0", 847 "label": "New Item", 848 "name": "acpt_label_new_item", 849 "type": "text", 850 "instructions": "Default is New Post\/New Page.", 851 "required": 0, 852 "conditional_logic": 0, 853 "wrapper": { 854 "width": "", 855 "class": "", 856 "id": "" 857 }, 858 "default_value": "", 859 "placeholder": "", 860 "prepend": "", 861 "append": "", 862 "maxlength": "", 863 "readonly": 0, 864 "disabled": 0 865 }, 866 { 867 "key": "field_576f06fc831be", 868 "label": "View Item", 869 "name": "acpt_label_view_item", 870 "type": "text", 871 "instructions": "Default is View Post\/View Page.", 872 "required": 0, 873 "conditional_logic": 0, 874 "wrapper": { 875 "width": "", 876 "class": "", 877 "id": "" 878 }, 879 "default_value": "", 880 "placeholder": "", 881 "prepend": "", 882 "append": "", 883 "maxlength": "", 884 "readonly": 0, 885 "disabled": 0 886 }, 887 { 888 "key": "field_576f06fc831cb", 889 "label": "Search Items", 890 "name": "acpt_label_search_items", 891 "type": "text", 892 "instructions": "Default is Search Posts\/Search Pages.\n", 893 "required": 0, 894 "conditional_logic": 0, 895 "wrapper": { 896 "width": "", 897 "class": "", 898 "id": "" 899 }, 900 "default_value": "", 901 "placeholder": "", 902 "prepend": "", 903 "append": "", 904 "maxlength": "", 905 "readonly": 0, 906 "disabled": 0 907 }, 908 { 909 "key": "field_576f06fc831d9", 910 "label": "Not Found", 911 "name": "acpt_label_not_found", 912 "type": "text", 913 "instructions": "Default is No posts found\/No pages found.\n", 914 "required": 0, 915 "conditional_logic": 0, 916 "wrapper": { 917 "width": "", 918 "class": "", 919 "id": "" 920 }, 921 "default_value": "", 922 "placeholder": "", 923 "prepend": "", 924 "append": "", 925 "maxlength": "", 926 "readonly": 0, 927 "disabled": 0 928 }, 929 { 930 "key": "field_576f06fc831e6", 931 "label": "Not Found in Trash", 932 "name": "acpt_label_not_found_in_trash", 933 "type": "text", 934 "instructions": "Default is No posts found in Trash\/No pages found in Trash.\n", 935 "required": 0, 936 "conditional_logic": 0, 937 "wrapper": { 938 "width": "", 939 "class": "", 940 "id": "" 941 }, 942 "default_value": "", 943 "placeholder": "", 944 "prepend": "", 945 "append": "", 946 "maxlength": "", 947 "readonly": 0, 948 "disabled": 0 949 }, 950 { 951 "key": "field_576f06fc831f3", 952 "label": "Parent Item Colon", 953 "name": "acpt_label_parent_item_colon", 954 "type": "text", 955 "instructions": "This string isn't used on non-hierarchical types. In hierarchical ones the default is 'Parent Page:'.", 956 "required": 0, 957 "conditional_logic": 0, 958 "wrapper": { 959 "width": "", 960 "class": "", 961 "id": "" 962 }, 963 "default_value": "", 964 "placeholder": "", 965 "prepend": "", 966 "append": "", 967 "maxlength": "", 968 "readonly": 0, 969 "disabled": 0 970 }, 971 { 972 "key": "field_576f06fc83200", 973 "label": "All Items", 974 "name": "acpt_label_all_items", 975 "type": "text", 976 "instructions": "Text for the submenu. Default is All Posts\/All Pages.\n", 977 "required": 0, 978 "conditional_logic": 0, 979 "wrapper": { 980 "width": "", 981 "class": "", 982 "id": "" 983 }, 984 "default_value": "", 985 "placeholder": "", 986 "prepend": "", 987 "append": "", 988 "maxlength": "", 989 "readonly": 0, 990 "disabled": 0 991 }, 992 { 993 "key": "field_576f06fc8320d", 994 "label": "Archives", 995 "name": "acpt_label_archives", 996 "type": "text", 997 "instructions": "Text for use with archives in nav menus. Default is Post Archives\/Page Archives.", 998 "required": 0, 999 "conditional_logic": 0, 1000 "wrapper": { 1001 "width": "", 1002 "class": "", 1003 "id": "" 1004 }, 1005 "default_value": "", 1006 "placeholder": "", 1007 "prepend": "", 1008 "append": "", 1009 "maxlength": "", 1010 "readonly": 0, 1011 "disabled": 0 1012 }, 1013 { 1014 "key": "field_576f06fc8321b", 1015 "label": "Insert into Item", 1016 "name": "acpt_label_insert_into_item", 1017 "type": "text", 1018 "instructions": "Text for the media frame button. Default is Insert into post\/Insert into page.\n", 1019 "required": 0, 1020 "conditional_logic": 0, 1021 "wrapper": { 1022 "width": "", 1023 "class": "", 1024 "id": "" 1025 }, 1026 "default_value": "", 1027 "placeholder": "", 1028 "prepend": "", 1029 "append": "", 1030 "maxlength": "", 1031 "readonly": 0, 1032 "disabled": 0 1033 }, 1034 { 1035 "key": "field_576f06fc83228", 1036 "label": "Uploaded to This Item", 1037 "name": "acpt_label_uploaded_to_this_item", 1038 "type": "text", 1039 "instructions": "Text for the media frame filter. Default is Uploaded to this post\/Uploaded to this page.", 1040 "required": 0, 1041 "conditional_logic": 0, 1042 "wrapper": { 1043 "width": "", 1044 "class": "", 1045 "id": "" 1046 }, 1047 "default_value": "", 1048 "placeholder": "", 1049 "prepend": "", 1050 "append": "", 1051 "maxlength": "", 1052 "readonly": 0, 1053 "disabled": 0 1054 }, 1055 { 1056 "key": "field_576f06fc83235", 1057 "label": "Featured Image", 1058 "name": "acpt_label_featured_image", 1059 "type": "text", 1060 "instructions": "Default is Featured Image.\n", 1061 "required": 0, 1062 "conditional_logic": 0, 1063 "wrapper": { 1064 "width": "", 1065 "class": "", 1066 "id": "" 1067 }, 1068 "default_value": "Featured Image", 1069 "placeholder": "", 1070 "prepend": "", 1071 "append": "", 1072 "maxlength": "", 1073 "readonly": 0, 1074 "disabled": 0 1075 }, 1076 { 1077 "key": "field_576f06fc83242", 1078 "label": "Set Featured Image", 1079 "name": "acpt_label_set_featured_image", 1080 "type": "text", 1081 "instructions": "Default is Set featured image.\n", 1082 "required": 0, 1083 "conditional_logic": 0, 1084 "wrapper": { 1085 "width": "", 1086 "class": "", 1087 "id": "" 1088 }, 1089 "default_value": "Set featured image.", 1090 "placeholder": "", 1091 "prepend": "", 1092 "append": "", 1093 "maxlength": "", 1094 "readonly": 0, 1095 "disabled": 0 1096 }, 1097 { 1098 "key": "field_576f06fc83250", 1099 "label": "Remove Featured Image", 1100 "name": "acpt_label_remove_featured_image", 1101 "type": "text", 1102 "instructions": "Default is Remove featured image.\n", 1103 "required": 0, 1104 "conditional_logic": 0, 1105 "wrapper": { 1106 "width": "", 1107 "class": "", 1108 "id": "" 1109 }, 1110 "default_value": "Remove featured image.", 1111 "placeholder": "", 1112 "prepend": "", 1113 "append": "", 1114 "maxlength": "", 1115 "readonly": 0, 1116 "disabled": 0 1117 }, 1118 { 1119 "key": "field_576f06fc8325d", 1120 "label": "Use Featured Image", 1121 "name": "acpt_label_use_featured_image", 1122 "type": "text", 1123 "instructions": "Default is Use as featured image.\n", 1124 "required": 0, 1125 "conditional_logic": 0, 1126 "wrapper": { 1127 "width": "", 1128 "class": "", 1129 "id": "" 1130 }, 1131 "default_value": "Use as featured image.", 1132 "placeholder": "", 1133 "prepend": "", 1134 "append": "", 1135 "maxlength": "", 1136 "readonly": 0, 1137 "disabled": 0 1138 }, 1139 { 1140 "key": "field_576f06fc8326a", 1141 "label": "Menu Name", 1142 "name": "acpt_label_menu_name", 1143 "type": "text", 1144 "instructions": "Default is the same as `Plural Name`.", 1145 "required": 0, 1146 "conditional_logic": 0, 1147 "wrapper": { 1148 "width": "", 1149 "class": "", 1150 "id": "" 1151 }, 1152 "default_value": "", 1153 "placeholder": "", 1154 "prepend": "", 1155 "append": "", 1156 "maxlength": "", 1157 "readonly": 0, 1158 "disabled": 0 1159 }, 1160 { 1161 "key": "field_576f06fc83279", 1162 "label": "Filter Items List", 1163 "name": "acpt_label_filter_items_list", 1164 "type": "text", 1165 "instructions": "Text for the table views hidden heading.\n", 1166 "required": 0, 1167 "conditional_logic": 0, 1168 "wrapper": { 1169 "width": "", 1170 "class": "", 1171 "id": "" 1172 }, 1173 "default_value": "", 1174 "placeholder": "", 1175 "prepend": "", 1176 "append": "", 1177 "maxlength": "", 1178 "readonly": 0, 1179 "disabled": 0 1180 }, 1181 { 1182 "key": "field_576f06fc83286", 1183 "label": "Items List Navigation", 1184 "name": "acpt_label_items_list_navigation", 1185 "type": "text", 1186 "instructions": "Text for the table pagination hidden heading.\n", 1187 "required": 0, 1188 "conditional_logic": 0, 1189 "wrapper": { 1190 "width": "", 1191 "class": "", 1192 "id": "" 1193 }, 1194 "default_value": "", 1195 "placeholder": "", 1196 "prepend": "", 1197 "append": "", 1198 "maxlength": "", 1199 "readonly": 0, 1200 "disabled": 0 1201 }, 1202 { 1203 "key": "field_576f06fc83293", 1204 "label": "Items List", 1205 "name": "acpt_label_items_list", 1206 "type": "text", 1207 "instructions": "Text for the table hidden heading.\n", 1208 "required": 0, 1209 "conditional_logic": 0, 1210 "wrapper": { 1211 "width": "", 1212 "class": "", 1213 "id": "" 1214 }, 1215 "default_value": "", 1216 "placeholder": "", 1217 "prepend": "", 1218 "append": "", 1219 "maxlength": "", 1220 "readonly": 0, 1221 "disabled": 0 1222 }, 1223 { 1224 "key": "field_576f06fc832a0", 1225 "label": "Name Admin Bar", 1226 "name": "acpt_label_name_admin_bar", 1227 "type": "text", 1228 "instructions": "Text for use in New in Admin menu bar. Default is the same as `Singular Name`.", 1229 "required": 0, 1230 "conditional_logic": 0, 1231 "wrapper": { 1232 "width": "", 1233 "class": "", 1234 "id": "" 1235 }, 1236 "default_value": "", 1237 "placeholder": "", 1238 "prepend": "", 1239 "append": "", 1240 "maxlength": "", 1241 "readonly": 0, 1242 "disabled": 0 1243 }, 1244 { 1245 "key": "field_577817c143802", 1246 "label": "Rewrite", 1247 "name": "", 1248 "type": "tab", 1249 "instructions": "", 1250 "required": 0, 1251 "conditional_logic": [ 1252 [ 1253 { 1254 "field": "field_576f06fc59164", 1255 "operator": "==", 1256 "value": "1" 1257 } 1258 ] 1259 ], 1260 "wrapper": { 1261 "width": "", 1262 "class": "", 1263 "id": "" 1264 }, 1265 "placement": "top", 1266 "endpoint": 0 1267 }, 1268 { 1269 "key": "field_57781a8d43805", 1270 "label": "Slug", 1271 "name": "acpt_rewrite_with_front", 1272 "type": "true_false", 1273 "instructions": "", 1274 "required": 0, 1275 "conditional_logic": 0, 1276 "wrapper": { 1277 "width": "", 1278 "class": "", 1279 "id": "" 1280 }, 1281 "message": "Should the permalink structure be prepended with the front base.", 1282 "default_value": false, 1283 "hidden": true 1284 }, 1285 { 1286 "key": "field_577819f443804", 1287 "label": "Slug", 1288 "name": "acpt_rewrite_slug", 1289 "type": "text", 1290 "instructions": "Customize the permalink structure slug. Defaults to a URL friendly version of the singular name value. Should be translatable.", 1291 "required": 0, 1292 "conditional_logic": 0, 1293 "wrapper": { 1294 "width": "", 1295 "class": "", 1296 "id": "" 1297 }, 1298 "default_value": "", 1299 "placeholder": "", 1300 "prepend": "\/", 1301 "append": "", 1302 "maxlength": "", 1303 "readonly": 0, 1304 "disabled": 0 1305 }, 1306 { 1307 "key": "field_57781b3343807", 1308 "label": "Feeds", 1309 "name": "acpt_rewrite_feeds", 1310 "type": "true_false", 1311 "instructions": "", 1312 "required": 0, 1313 "conditional_logic": 0, 1314 "wrapper": { 1315 "width": "", 1316 "class": "", 1317 "id": "" 1318 }, 1319 "message": "Whether a feed permalink structure should be built for this post type. Defaults to the 'Has Archive' value.", 1320 "default_value": true 1321 }, 1322 { 1323 "key": "field_5778210043808", 1324 "label": "Pages", 1325 "name": "acpt_rewrite_pages", 1326 "type": "true_false", 1327 "instructions": "", 1328 "required": 0, 1329 "conditional_logic": 0, 1330 "wrapper": { 1331 "width": "", 1332 "class": "", 1333 "id": "" 1334 }, 1335 "message": "Whether the permalink structure should provide for pagination.", 1336 "default_value": true 1337 }, 1338 { 1339 "key": "field_576f06fc73106", 1340 "label": "REST API", 1341 "name": "", 1342 "type": "tab", 1343 "instructions": "", 1344 "required": 0, 1345 "conditional_logic": [ 1346 [ 1347 { 1348 "field": "field_576f06fc830c9", 1349 "operator": "==", 1350 "value": "1" 1351 } 1352 ] 1353 ], 1354 "wrapper": { 1355 "width": "", 1356 "class": "", 1357 "id": "" 1358 }, 1359 "placement": "top", 1360 "endpoint": 0 1361 }, 1362 { 1363 "key": "field_576f06fc830d6", 1364 "label": "Base Slug", 1365 "name": "acpt_rest_base", 1366 "type": "text", 1367 "instructions": "The base slug that this post type will use when accessed using the REST API.", 1368 "required": 0, 1369 "conditional_logic": 0, 1370 "wrapper": { 1371 "width": "", 1372 "class": "", 1373 "id": "" 1374 }, 1375 "default_value": "", 1376 "placeholder": "", 1377 "prepend": "", 1378 "append": "", 1379 "maxlength": "", 1380 "readonly": 0, 1381 "disabled": 0 1382 }, 1383 { 1384 "key": "field_576f06fc830e4", 1385 "label": "Controller Class", 1386 "name": "acpt_rest_controller_class", 1387 "type": "text", 1388 "instructions": "An optional custom controller to use instead of WP_REST_Posts_Controller. Must be a subclass of WP_REST_Controller.", 1389 "required": 0, 1390 "conditional_logic": [ 1391 [ 1392 { 1393 "field": "field_576f06fc830c9", 1394 "operator": "==", 1395 "value": "1" 1396 } 1397 ] 1398 ], 1399 "wrapper": { 1400 "width": "", 1401 "class": "child-field", 1402 "id": "" 1403 }, 1404 "default_value": "", 1405 "placeholder": "", 1406 "prepend": "", 1407 "append": "", 1408 "maxlength": "", 1409 "readonly": 0, 1410 "disabled": 0 1411 } 1412 ], 1413 "location": [ 1414 [ 1415 { 1416 "param": "post_type", 1417 "operator": "==", 1418 "value": "acpt_content_type" 1419 } 1420 ] 1421 ], 1422 "menu_order": 100, 1423 "position": "normal", 1424 "style": "default", 1425 "label_placement": "top", 1426 "instruction_placement": "field", 1427 "hide_on_screen": "", 1428 "active": 1, 1429 "description": "" 1430 }, 1431 "supports": { 1432 "key": "group_576f06faa6677", 1433 "title": "acpt-supports", 1434 "fields": [ 1435 { 1436 "key": "field_576f06faaa174", 1437 "label": "Supported Functionality", 1438 "name": "acpt_supports", 1439 "type": "checkbox", 1440 "instructions": "", 1441 "required": 0, 1442 "conditional_logic": 0, 1443 "wrapper": { 1444 "width": "", 1445 "class": "", 1446 "id": "" 1447 }, 1448 "choices": { 1449 "title": "Title", 1450 "editor": "Content Editor", 1451 "author": "Author", 1452 "thumbnail": "Thumbnail", 1453 "excerpt": "Excerpt", 1454 "trackbacks": "Trackbacks", 1455 "custom-fields": "Custom Fields", 1456 "comments": "Comments", 1457 "revisions": "Revisions", 1458 "page-attributes": "Page Attributes", 1459 "post-formats": "Post Formats" 1460 }, 1461 "default_value": [ 1462 "title", 1463 "editor" 1464 ], 1465 "layout": "vertical", 1466 "toggle": 0 1467 } 1468 ], 1469 "location": [ 1470 [ 1471 { 1472 "param": "post_type", 1473 "operator": "==", 1474 "value": "acpt_content_type" 1475 } 1476 ] 1477 ], 1478 "menu_order": 0, 1479 "position": "side", 1480 "style": "default", 1481 "label_placement": "top", 1482 "instruction_placement": "field", 1483 "hide_on_screen": "", 1484 "active": 1, 1485 "description": "", 1486 "local": "php" 1487 }, 1488 "taxonomies": { 1489 "key": "group_576f1c751aed7", 1490 "title": "acpt-taxonomies", 1491 "fields": [ 1492 { 1493 "key": "field_576f1c751d202", 1494 "label": "Taxonomies", 1495 "name": "acpt_taxonomies", 1496 "type": "checkbox", 1497 "instructions": "", 1498 "required": 0, 1499 "conditional_logic": 0, 1500 "wrapper": { 1501 "width": "", 1502 "class": "", 1503 "id": "" 1504 }, 1505 "choices": { 1506 "category": "Categories", 1507 "post_tag": "Tags" 1508 }, 1509 "default_value": [], 1510 "layout": "vertical", 1511 "toggle": 0, 1512 "multiple": true 1513 } 1514 ], 1515 "location": [ 1516 [ 1517 { 1518 "param": "post_type", 1519 "operator": "==", 1520 "value": "acpt_content_type" 1521 } 1522 ] 1523 ], 1524 "menu_order": 0, 1525 "position": "side", 1526 "style": "default", 1527 "label_placement": "top", 1528 "instruction_placement": "field", 1529 "hide_on_screen": "", 1530 "active": 1, 1531 "description": "", 1532 "local": "php" 1533 } 1513 1534 } -
advanced-custom-post-types/trunk/class-settings.php
r1523456 r1523578 10 10 11 11 $this->defaults = array( 12 'show_admin' => true,13 'capability' => 'manage_options',12 'show_admin' => true, 13 'capability' => 'manage_options', 14 14 'save_json' => null 15 15 ); -
advanced-custom-post-types/trunk/readme.txt
r1523456 r1523578 62 62 * Added the Local JSON feature which saves post type settings to files within your theme. The idea is similar to caching and both dramatically speeds up ACPT and allows for version control over your post type settings. Removed unused filters and added the save_json filter to determine where post type setting files are saved. 63 63 64 = 0.4.0 = 65 * Fixes post name issues more refactoring and cleanup 64 66
Note: See TracChangeset
for help on using the changeset viewer.