Changeset 1706357
- Timestamp:
- 08/01/2017 01:52:57 PM (9 years ago)
- Location:
- custom-post-type-maker
- Files:
-
- 4 edited
- 6 copied
-
tags/1.1.2 (copied) (copied from custom-post-type-maker/trunk)
-
tags/1.1.2/CHANGELOG.md (copied) (copied from custom-post-type-maker/trunk/CHANGELOG.md) (1 diff)
-
tags/1.1.2/README.md (copied) (copied from custom-post-type-maker/trunk/README.md) (1 diff)
-
tags/1.1.2/custom-post-type-maker.php (copied) (copied from custom-post-type-maker/trunk/custom-post-type-maker.php) (27 diffs)
-
tags/1.1.2/lang (copied) (copied from custom-post-type-maker/trunk/lang)
-
tags/1.1.2/readme.txt (copied) (copied from custom-post-type-maker/trunk/readme.txt) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/custom-post-type-maker.php (modified) (27 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-type-maker/tags/1.1.2/CHANGELOG.md
r1644953 r1706357 1 1 ## Changelog 2 3 ### 1.1.2 4 - [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7) 2 5 3 6 ### 1.1.1 -
custom-post-type-maker/tags/1.1.2/README.md
r1644993 r1706357 23 23 24 24 ## Changelog 25 26 ### 1.1.2 27 - [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7) 25 28 26 29 ### 1.1.1 -
custom-post-type-maker/tags/1.1.2/custom-post-type-maker.php
r1644953 r1706357 4 4 Plugin URI: https://github.com/Graffino/custom-post-type-maker-ui 5 5 Description: Custom Post Type Maker lets you create Custom Post Types and custom Taxonomies in a user friendly way. 6 Version: 1.1. 16 Version: 1.1.2 7 7 Author: Graffino 8 8 Author URI: http://www.graffino.com/ … … 25 25 * @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2 26 26 * @package Custom_Post_Types_Maker 27 * @version 1.1. 127 * @version 1.1.2 28 28 */ 29 29 … … 40 40 * @since 1.0.0 41 41 */ 42 class Cptm { 43 44 // vars 45 var $dir, 46 $path, 47 $version; 48 49 function __construct() { 50 42 class Cptm 43 { 44 45 46 /** @var string $dir Plugin dir */ 47 private $dir; 48 /** @var string $path Plugin path */ 49 private $path; 50 /** @var string $version Plugin version */ 51 private $version; 52 53 /** 54 * Constructor 55 */ 56 function __construct() 57 { 51 58 // vars 52 59 $this->dir = plugins_url( '', __FILE__ ); 53 60 $this->path = plugin_dir_path( __FILE__ ); 54 $this->version = '1.1. 1';61 $this->version = '1.1.2'; 55 62 56 63 // actions … … 80 87 // set textdomain 81 88 load_plugin_textdomain( 'cptm', false, basename( dirname(__FILE__) ).'/lang' ); 82 83 } // # function __construct() 84 85 public function init() { 86 89 } 90 91 /** 92 * Initialize plugin 93 */ 94 public function init() 95 { 87 96 // Create cptm post type 88 97 $labels = array( … … 147 156 add_image_size( 'cptm_icon', 16, 16, true ); 148 157 } 149 150 } // # function init() 151 152 public function cptm_admin_menu() { 153 158 } 159 160 /** 161 * Add admin menu items 162 */ 163 public function cptm_admin_menu() 164 { 154 165 // add cptm page to options menu 155 166 add_menu_page( __('CPT Maker', 'custom-post-type-maker' ), __('Post Types', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm', '', 'dashicons-layout' ); 156 167 add_submenu_page( 'edit.php?post_type=cptm', __('Taxonomies', 'custom-post-type-maker' ), __('Taxonomies', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm_tax' ); 157 158 } // # function cptm_admin_menu() 159 160 public function cptm_styles( $hook ) { 161 168 } 169 170 /** 171 * Register admin styles 172 * 173 * @param string $hook Wordpress hook 174 */ 175 public function cptm_styles( $hook ) 176 { 162 177 // register overview style 163 178 if ( $hook == 'edit.php' && isset($_GET['post_type']) && ( $_GET['post_type'] == 'cptm' || $_GET['post_type'] == 'cptm_tax' ) ) { … … 182 197 wp_enqueue_media(); 183 198 } 184 185 } // # function cptm_styles() 186 187 public function cptm_create_custom_post_types() { 188 199 } 200 201 /** 202 * Create custom post types 203 */ 204 public function cptm_create_custom_post_types() 205 { 189 206 // vars 190 207 $cptms = array(); … … 201 218 202 219 // create array of post meta 203 if ( $cptm_post_types ) {204 foreach ( $cptm_post_types as $cptm ) {220 if ( $cptm_post_types ) { 221 foreach ( $cptm_post_types as $cptm ) { 205 222 $cptm_meta = get_post_meta( $cptm->ID, '', true ); 206 223 … … 257 274 $cptm_rewrite_options = array(); 258 275 if ( $cptm_rewrite ) { $cptm_rewrite_options['slug'] = _x( $cptm_custom_rewrite_slug, 'URL Slug', 'custom-post-type-maker' ); } 259 if ( $cptm_withfront ) { $cptm_rewrite_options['with_front'] = $cptm_withfront; } 276 277 $cptm_rewrite_options['with_front'] = $cptm_withfront; 278 260 279 if ( $cptm_feeds ) { $cptm_rewrite_options['feeds'] = $cptm_feeds; } 261 280 if ( $cptm_pages ) { $cptm_rewrite_options['pages'] = $cptm_pages; } … … 283 302 'cptm_builtin_taxonomies' => unserialize( $cptm_builtin_taxonomies ), 284 303 ); 285 304 286 305 // register custom post types 287 306 if ( is_array( $cptms ) ) { … … 320 339 'taxonomies' => $cptm_post_type['cptm_builtin_taxonomies'] 321 340 ); 322 323 if ( $cptm_post_type['cptm_name'] != 'no_name' )341 var_dump($args); //die(); 342 if ( $cptm_post_type['cptm_name'] != 'no_name' ) 324 343 register_post_type( $cptm_post_type['cptm_name'], $args); 325 344 } … … 338 357 339 358 // create array of post meta 340 if ( $cptm_taxonomies ) {341 foreach ( $cptm_taxonomies as $cptm_tax ) {359 if ( $cptm_taxonomies ) { 360 foreach ( $cptm_taxonomies as $cptm_tax ) { 342 361 $cptm_meta = get_post_meta( $cptm_tax->ID, '', true ); 343 362 … … 401 420 ); 402 421 403 if ( $cptm_taxonomy['cptm_tax_name'] != 'no_name' )422 if ( $cptm_taxonomy['cptm_tax_name'] != 'no_name' ) 404 423 register_taxonomy( $cptm_taxonomy['cptm_tax_name'], $cptm_taxonomy['cptm_tax_builtin_taxonomies'], $args ); 405 424 } … … 407 426 } 408 427 } 409 } // # function cptm_create_custom_post_types() 410 411 public function cptm_create_meta_boxes() { 412 428 } 429 430 /** 431 * Create admin meta boxes 432 */ 433 public function cptm_create_meta_boxes() 434 { 413 435 // add options meta box 414 436 add_meta_box( … … 428 450 'high' 429 451 ); 430 431 } // # function cptm_create_meta_boxes() 432 452 } 453 454 /** 455 * Create custom post meta box 456 * 457 * @param object $post Wordpress $post object 458 */ 433 459 public function cptm_meta_box( $post ) { 434 435 460 // get post meta values 436 461 $values = get_post_custom( $post->ID ); … … 798 823 799 824 <?php 800 801 } // # function cptm_meta_box() 802 803 public function cptm_tax_meta_box( $post ) { 804 825 } 826 827 /** 828 * Create custom post taxonomy meta box 829 * 830 * @param object $post Wordpress $post object 831 */ 832 public function cptm_tax_meta_box( $post ) 833 { 805 834 // get post meta values 806 835 $values = get_post_custom( $post->ID ); … … 951 980 </table> 952 981 <?php 953 954 } // # function cptm_meta_box() 955 956 public function cptm_save_post( $post_id ) { 957 982 } 983 984 /** 985 * Save custom post 986 * 987 * @param int $post_id Wordpress Post ID 988 */ 989 public function cptm_save_post( $post_id ) 990 { 958 991 // verify if this is an auto save routine. 959 992 // If it is our form has not been submitted, so we dont want to do anything … … 962 995 963 996 // if our nonce isn't there, or we can't verify it, bail 964 if ( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return;997 if ( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return; 965 998 966 999 // update custom post type meta values 967 if ( isset($_POST['cptm_name']) )1000 if ( isset($_POST['cptm_name']) ) 968 1001 update_post_meta( $post_id, 'cptm_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_name'] ) ) ); 969 1002 970 if ( isset($_POST['cptm_label']) )1003 if ( isset($_POST['cptm_label']) ) 971 1004 update_post_meta( $post_id, 'cptm_label', sanitize_text_field( $_POST['cptm_label'] ) ); 972 1005 973 if ( isset($_POST['cptm_singular_name']) )1006 if ( isset($_POST['cptm_singular_name']) ) 974 1007 update_post_meta( $post_id, 'cptm_singular_name', sanitize_text_field( $_POST['cptm_singular_name'] ) ); 975 1008 976 if ( isset($_POST['cptm_description']) )1009 if ( isset($_POST['cptm_description']) ) 977 1010 update_post_meta( $post_id, 'cptm_description', esc_textarea( $_POST['cptm_description'] ) ); 978 1011 979 if ( isset($_POST['cptm_icon_slug']) )1012 if ( isset($_POST['cptm_icon_slug']) ) 980 1013 update_post_meta( $post_id, 'cptm_icon_slug', esc_textarea( $_POST['cptm_icon_slug'] ) ); 981 1014 982 if ( isset($_POST['cptm_icon_url']) )1015 if ( isset($_POST['cptm_icon_url']) ) 983 1016 update_post_meta( $post_id, 'cptm_icon_url', esc_textarea( $_POST['cptm_icon_url'] ) ); 984 1017 985 if ( isset( $_POST['cptm_public'] ) )1018 if ( isset( $_POST['cptm_public'] ) ) 986 1019 update_post_meta( $post_id, 'cptm_public', esc_attr( $_POST['cptm_public'] ) ); 987 1020 988 if ( isset( $_POST['cptm_show_ui'] ) )1021 if ( isset( $_POST['cptm_show_ui'] ) ) 989 1022 update_post_meta( $post_id, 'cptm_show_ui', esc_attr( $_POST['cptm_show_ui'] ) ); 990 1023 991 if ( isset( $_POST['cptm_has_archive'] ) )1024 if ( isset( $_POST['cptm_has_archive'] ) ) 992 1025 update_post_meta( $post_id, 'cptm_has_archive', esc_attr( $_POST['cptm_has_archive'] ) ); 993 1026 994 if ( isset( $_POST['cptm_exclude_from_search'] ) )1027 if ( isset( $_POST['cptm_exclude_from_search'] ) ) 995 1028 update_post_meta( $post_id, 'cptm_exclude_from_search', esc_attr( $_POST['cptm_exclude_from_search'] ) ); 996 1029 997 if ( isset( $_POST['cptm_capability_type'] ) )1030 if ( isset( $_POST['cptm_capability_type'] ) ) 998 1031 update_post_meta( $post_id, 'cptm_capability_type', esc_attr( $_POST['cptm_capability_type'] ) ); 999 1032 1000 if ( isset( $_POST['cptm_hierarchical'] ) )1033 if ( isset( $_POST['cptm_hierarchical'] ) ) 1001 1034 update_post_meta( $post_id, 'cptm_hierarchical', esc_attr( $_POST['cptm_hierarchical'] ) ); 1002 1035 1003 if ( isset( $_POST['cptm_rewrite'] ) )1036 if ( isset( $_POST['cptm_rewrite'] ) ) 1004 1037 update_post_meta( $post_id, 'cptm_rewrite', esc_attr( $_POST['cptm_rewrite'] ) ); 1005 1038 1006 if ( isset( $_POST['cptm_withfront'] ) )1039 if ( isset( $_POST['cptm_withfront'] ) ) 1007 1040 update_post_meta( $post_id, 'cptm_withfront', esc_attr( $_POST['cptm_withfront'] ) ); 1008 1041 1009 if ( isset( $_POST['cptm_feeds'] ) )1042 if ( isset( $_POST['cptm_feeds'] ) ) 1010 1043 update_post_meta( $post_id, 'cptm_feeds', esc_attr( $_POST['cptm_feeds'] ) ); 1011 1044 1012 if ( isset( $_POST['cptm_pages'] ) )1045 if ( isset( $_POST['cptm_pages'] ) ) 1013 1046 update_post_meta( $post_id, 'cptm_pages', esc_attr( $_POST['cptm_pages'] ) ); 1014 1047 1015 if ( isset($_POST['cptm_custom_rewrite_slug']) )1048 if ( isset($_POST['cptm_custom_rewrite_slug']) ) 1016 1049 update_post_meta( $post_id, 'cptm_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_custom_rewrite_slug'] ) ); 1017 1050 1018 if ( isset( $_POST['cptm_query_var'] ) )1051 if ( isset( $_POST['cptm_query_var'] ) ) 1019 1052 update_post_meta( $post_id, 'cptm_query_var', esc_attr( $_POST['cptm_query_var'] ) ); 1020 1053 1021 if ( isset( $_POST['cptm_publicly_queryable'] ) )1054 if ( isset( $_POST['cptm_publicly_queryable'] ) ) 1022 1055 update_post_meta( $post_id, 'cptm_publicly_queryable', esc_attr( $_POST['cptm_publicly_queryable'] ) ); 1023 1056 1024 if ( isset($_POST['cptm_menu_position']) )1057 if ( isset($_POST['cptm_menu_position']) ) 1025 1058 update_post_meta( $post_id, 'cptm_menu_position', sanitize_text_field( $_POST['cptm_menu_position'] ) ); 1026 1059 1027 if ( isset( $_POST['cptm_show_in_menu'] ) )1060 if ( isset( $_POST['cptm_show_in_menu'] ) ) 1028 1061 update_post_meta( $post_id, 'cptm_show_in_menu', esc_attr( $_POST['cptm_show_in_menu'] ) ); 1029 1062 … … 1035 1068 1036 1069 // update taxonomy meta values 1037 if ( isset($_POST['cptm_tax_name']) )1070 if ( isset($_POST['cptm_tax_name']) ) 1038 1071 update_post_meta( $post_id, 'cptm_tax_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_tax_name'] ) ) ); 1039 1072 1040 if ( isset($_POST['cptm_tax_label']) )1073 if ( isset($_POST['cptm_tax_label']) ) 1041 1074 update_post_meta( $post_id, 'cptm_tax_label', sanitize_text_field( $_POST['cptm_tax_label'] ) ); 1042 1075 1043 if ( isset($_POST['cptm_tax_singular_name']) )1076 if ( isset($_POST['cptm_tax_singular_name']) ) 1044 1077 update_post_meta( $post_id, 'cptm_tax_singular_name', sanitize_text_field( $_POST['cptm_tax_singular_name'] ) ); 1045 1078 1046 if ( isset( $_POST['cptm_tax_show_ui'] ) )1079 if ( isset( $_POST['cptm_tax_show_ui'] ) ) 1047 1080 update_post_meta( $post_id, 'cptm_tax_show_ui', esc_attr( $_POST['cptm_tax_show_ui'] ) ); 1048 1081 1049 if ( isset( $_POST['cptm_tax_hierarchical'] ) )1082 if ( isset( $_POST['cptm_tax_hierarchical'] ) ) 1050 1083 update_post_meta( $post_id, 'cptm_tax_hierarchical', esc_attr( $_POST['cptm_tax_hierarchical'] ) ); 1051 1084 1052 if ( isset( $_POST['cptm_tax_rewrite'] ) )1085 if ( isset( $_POST['cptm_tax_rewrite'] ) ) 1053 1086 update_post_meta( $post_id, 'cptm_tax_rewrite', esc_attr( $_POST['cptm_tax_rewrite'] ) ); 1054 1087 1055 if ( isset($_POST['cptm_tax_custom_rewrite_slug']) )1088 if ( isset($_POST['cptm_tax_custom_rewrite_slug']) ) 1056 1089 update_post_meta( $post_id, 'cptm_tax_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_tax_custom_rewrite_slug'] ) ); 1057 1090 1058 if ( isset( $_POST['cptm_tax_query_var'] ) )1091 if ( isset( $_POST['cptm_tax_query_var'] ) ) 1059 1092 update_post_meta( $post_id, 'cptm_tax_query_var', esc_attr( $_POST['cptm_tax_query_var'] ) ); 1060 1093 1061 1094 $cptm_tax_post_types = isset( $_POST['cptm_tax_post_types'] ) ? $_POST['cptm_tax_post_types'] : array(); 1062 1095 update_post_meta( $post_id, 'cptm_tax_post_types', $cptm_tax_post_types ); 1063 1096 1064 1097 // Update plugin saved 1065 1098 update_option( 'cptm_plugin_settings_changed', true ); 1066 1067 } // # function save_post() 1099 } 1068 1100 1069 function cptm_plugin_settings_flush_rewrite() { 1101 /** 1102 * Flush rewrite rules 1103 */ 1104 function cptm_plugin_settings_flush_rewrite() 1105 { 1070 1106 if ( get_option( 'cptm_plugin_settings_changed' ) == true ) { 1071 1107 flush_rewrite_rules(); 1072 1108 update_option( 'cptm_plugin_settings_changed', false ); 1073 1109 } 1074 } // # function cptm_plugin_settings_flush_rewrite() 1075 1076 1077 function cptm_plugin_activate_flush_rewrite() { 1110 } 1111 1112 /** 1113 * Flush rewrite rules on plugin activation 1114 */ 1115 function cptm_plugin_activate_flush_rewrite() 1116 { 1078 1117 $this->cptm_create_custom_post_types(); 1079 1118 flush_rewrite_rules(); 1080 } // # function cptm_plugin_settings_flush_rewrite() 1081 1082 function cptm_change_columns( $cols ) { 1083 1119 } 1120 1121 /** 1122 * Modify existing columns 1123 * 1124 * @param array $cols Post columns 1125 * @return object Modified columns 1126 */ 1127 function cptm_change_columns( $cols ) 1128 { 1084 1129 $cols = array( 1085 1130 'cb' => '<input type="checkbox" />', … … 1090 1135 ); 1091 1136 return $cols; 1092 1093 } // # function cptm_change_columns() 1094 1095 function cptm_sortable_columns() { 1096 1137 } 1138 1139 /** 1140 * Make columns sortable 1141 * 1142 * @return array Sortable array 1143 */ 1144 function cptm_sortable_columns() 1145 { 1097 1146 return array( 1098 1147 'title' => 'title' 1099 1148 ); 1100 1101 } // # function cptm_sortable_columns() 1102 1103 function cptm_custom_columns( $column, $post_id ) { 1104 1149 } 1150 1151 /** 1152 * Insert custom column 1153 * 1154 * @param string $column Column name 1155 * @param int $post_id Wordpress Post ID 1156 */ 1157 function cptm_custom_columns( $column, $post_id ) 1158 { 1105 1159 switch ( $column ) { 1106 1160 case "custom_post_type_name": … … 1114 1168 break; 1115 1169 } 1116 1117 } // # function cptm_custom_columns() 1118 1119 function cptm_tax_change_columns( $cols ) { 1120 1170 } 1171 1172 /** 1173 * Modify existing taxonomy columns 1174 * 1175 * @param array $cols Taxonomy columns 1176 * @return array Modified taxonomy columns 1177 */ 1178 function cptm_tax_change_columns( $cols ) 1179 { 1121 1180 $cols = array( 1122 1181 'cb' => '<input type="checkbox" />', … … 1126 1185 ); 1127 1186 return $cols; 1128 1129 } // # function cptm_tax_change_columns() 1130 1131 function cptm_tax_sortable_columns() { 1132 1187 } 1188 1189 /** 1190 * Make taxonomy columns sortable 1191 * 1192 * @return array Sortable array 1193 */ 1194 function cptm_tax_sortable_columns() 1195 { 1133 1196 return array( 1134 1197 'title' => 'title' 1135 1198 ); 1136 1137 } // # function cptm_tax_sortable_columns() 1138 1139 function cptm_tax_custom_columns( $column, $post_id ) { 1140 1199 } 1200 1201 /** 1202 * Insert custom taxonomy columns 1203 * 1204 * @param string $column Column name 1205 * @param int $post_id Wordpress Post ID 1206 */ 1207 function cptm_tax_custom_columns( $column, $post_id ) 1208 { 1141 1209 switch ( $column ) { 1142 1210 case "custom_post_type_name": … … 1147 1215 break; 1148 1216 } 1149 1150 } // # function cptm_tax_custom_columns() 1151 1152 function cptm_admin_footer() { 1153 1217 } 1218 1219 /** 1220 * Insert admin footer 1221 */ 1222 function cptm_admin_footer() 1223 { 1154 1224 global $post_type; 1155 1225 ?> … … 1179 1249 </div> 1180 1250 <?php 1181 if ( 'cptm' == $post_type ) {1251 if ( 'cptm' == $post_type ) { 1182 1252 1183 1253 // Get all public Custom Post Types … … 1279 1349 } 1280 1350 } 1281 if ( 'cptm_tax' == $post_type ) {1351 if ( 'cptm_tax' == $post_type ) { 1282 1352 1283 1353 // Get all public custom Taxonomies … … 1372 1442 } 1373 1443 } 1374 1375 } // # function cptm_admin_footer() 1376 1377 function cptm_post_updated_messages( $messages ) { 1378 1444 } 1445 1446 /** 1447 * Update messages 1448 * 1449 * @param array $messages Update messages 1450 * @return array Update messages 1451 */ 1452 function cptm_post_updated_messages( $messages ) 1453 { 1379 1454 global $post, $post_ID; 1380 1455 … … 1395 1470 1396 1471 return $messages; 1397 1398 } // # function cptm_post_updated_messages() 1399 1472 } 1473 1474 /** 1475 * Prepare attachment for Ajax Upload Request 1476 * @param array $response Response 1477 * @param string $attachment File contents 1478 * @param array $meta File meta contents 1479 * 1480 * @return array Modified response 1481 */ 1400 1482 function wp_prepare_attachment_for_js( $response, $attachment, $meta ) 1401 1483 { 1402 1484 // only for image 1403 if ( $response['type'] != 'image' )1485 if ( $response['type'] != 'image' ) 1404 1486 { 1405 1487 return $response; 1406 1488 } 1407 1489 1408 1409 1490 $attachment_url = $response['url']; 1410 1491 $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url ); 1411 1492 1412 if ( isset( $meta['sizes'] ) && is_array($meta['sizes']) )1493 if ( isset( $meta['sizes'] ) && is_array($meta['sizes']) ) 1413 1494 { 1414 foreach ( $meta['sizes'] as $k => $v )1495 foreach ( $meta['sizes'] as $k => $v ) 1415 1496 { 1416 if ( !isset($response['sizes'][ $k ]) )1497 if ( !isset($response['sizes'][ $k ]) ) 1417 1498 { 1418 1499 $response['sizes'][ $k ] = array( … … 1427 1508 1428 1509 return $response; 1429 } // # function wp_prepare_attachment_for_js() 1430 1510 } 1431 1511 } 1432 1512 -
custom-post-type-maker/tags/1.1.2/readme.txt
r1680040 r1706357 4 4 Requires at least: 3.0.0 5 5 Tested up to: 4.8 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 67 67 == Changelog == 68 68 69 = 1.1.2 = 70 - [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7) 71 69 72 = 1.1.1 = 70 73 - [Feature] Auto-flush rewrite rules on: custom post save, plugin activation, plugin deactivation. -
custom-post-type-maker/trunk/CHANGELOG.md
r1644953 r1706357 1 1 ## Changelog 2 3 ### 1.1.2 4 - [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7) 2 5 3 6 ### 1.1.1 -
custom-post-type-maker/trunk/README.md
r1644993 r1706357 23 23 24 24 ## Changelog 25 26 ### 1.1.2 27 - [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7) 25 28 26 29 ### 1.1.1 -
custom-post-type-maker/trunk/custom-post-type-maker.php
r1644953 r1706357 4 4 Plugin URI: https://github.com/Graffino/custom-post-type-maker-ui 5 5 Description: Custom Post Type Maker lets you create Custom Post Types and custom Taxonomies in a user friendly way. 6 Version: 1.1. 16 Version: 1.1.2 7 7 Author: Graffino 8 8 Author URI: http://www.graffino.com/ … … 25 25 * @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2 26 26 * @package Custom_Post_Types_Maker 27 * @version 1.1. 127 * @version 1.1.2 28 28 */ 29 29 … … 40 40 * @since 1.0.0 41 41 */ 42 class Cptm { 43 44 // vars 45 var $dir, 46 $path, 47 $version; 48 49 function __construct() { 50 42 class Cptm 43 { 44 45 46 /** @var string $dir Plugin dir */ 47 private $dir; 48 /** @var string $path Plugin path */ 49 private $path; 50 /** @var string $version Plugin version */ 51 private $version; 52 53 /** 54 * Constructor 55 */ 56 function __construct() 57 { 51 58 // vars 52 59 $this->dir = plugins_url( '', __FILE__ ); 53 60 $this->path = plugin_dir_path( __FILE__ ); 54 $this->version = '1.1. 1';61 $this->version = '1.1.2'; 55 62 56 63 // actions … … 80 87 // set textdomain 81 88 load_plugin_textdomain( 'cptm', false, basename( dirname(__FILE__) ).'/lang' ); 82 83 } // # function __construct() 84 85 public function init() { 86 89 } 90 91 /** 92 * Initialize plugin 93 */ 94 public function init() 95 { 87 96 // Create cptm post type 88 97 $labels = array( … … 147 156 add_image_size( 'cptm_icon', 16, 16, true ); 148 157 } 149 150 } // # function init() 151 152 public function cptm_admin_menu() { 153 158 } 159 160 /** 161 * Add admin menu items 162 */ 163 public function cptm_admin_menu() 164 { 154 165 // add cptm page to options menu 155 166 add_menu_page( __('CPT Maker', 'custom-post-type-maker' ), __('Post Types', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm', '', 'dashicons-layout' ); 156 167 add_submenu_page( 'edit.php?post_type=cptm', __('Taxonomies', 'custom-post-type-maker' ), __('Taxonomies', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm_tax' ); 157 158 } // # function cptm_admin_menu() 159 160 public function cptm_styles( $hook ) { 161 168 } 169 170 /** 171 * Register admin styles 172 * 173 * @param string $hook Wordpress hook 174 */ 175 public function cptm_styles( $hook ) 176 { 162 177 // register overview style 163 178 if ( $hook == 'edit.php' && isset($_GET['post_type']) && ( $_GET['post_type'] == 'cptm' || $_GET['post_type'] == 'cptm_tax' ) ) { … … 182 197 wp_enqueue_media(); 183 198 } 184 185 } // # function cptm_styles() 186 187 public function cptm_create_custom_post_types() { 188 199 } 200 201 /** 202 * Create custom post types 203 */ 204 public function cptm_create_custom_post_types() 205 { 189 206 // vars 190 207 $cptms = array(); … … 201 218 202 219 // create array of post meta 203 if ( $cptm_post_types ) {204 foreach ( $cptm_post_types as $cptm ) {220 if ( $cptm_post_types ) { 221 foreach ( $cptm_post_types as $cptm ) { 205 222 $cptm_meta = get_post_meta( $cptm->ID, '', true ); 206 223 … … 257 274 $cptm_rewrite_options = array(); 258 275 if ( $cptm_rewrite ) { $cptm_rewrite_options['slug'] = _x( $cptm_custom_rewrite_slug, 'URL Slug', 'custom-post-type-maker' ); } 259 if ( $cptm_withfront ) { $cptm_rewrite_options['with_front'] = $cptm_withfront; } 276 277 $cptm_rewrite_options['with_front'] = $cptm_withfront; 278 260 279 if ( $cptm_feeds ) { $cptm_rewrite_options['feeds'] = $cptm_feeds; } 261 280 if ( $cptm_pages ) { $cptm_rewrite_options['pages'] = $cptm_pages; } … … 283 302 'cptm_builtin_taxonomies' => unserialize( $cptm_builtin_taxonomies ), 284 303 ); 285 304 286 305 // register custom post types 287 306 if ( is_array( $cptms ) ) { … … 320 339 'taxonomies' => $cptm_post_type['cptm_builtin_taxonomies'] 321 340 ); 322 323 if ( $cptm_post_type['cptm_name'] != 'no_name' )341 var_dump($args); //die(); 342 if ( $cptm_post_type['cptm_name'] != 'no_name' ) 324 343 register_post_type( $cptm_post_type['cptm_name'], $args); 325 344 } … … 338 357 339 358 // create array of post meta 340 if ( $cptm_taxonomies ) {341 foreach ( $cptm_taxonomies as $cptm_tax ) {359 if ( $cptm_taxonomies ) { 360 foreach ( $cptm_taxonomies as $cptm_tax ) { 342 361 $cptm_meta = get_post_meta( $cptm_tax->ID, '', true ); 343 362 … … 401 420 ); 402 421 403 if ( $cptm_taxonomy['cptm_tax_name'] != 'no_name' )422 if ( $cptm_taxonomy['cptm_tax_name'] != 'no_name' ) 404 423 register_taxonomy( $cptm_taxonomy['cptm_tax_name'], $cptm_taxonomy['cptm_tax_builtin_taxonomies'], $args ); 405 424 } … … 407 426 } 408 427 } 409 } // # function cptm_create_custom_post_types() 410 411 public function cptm_create_meta_boxes() { 412 428 } 429 430 /** 431 * Create admin meta boxes 432 */ 433 public function cptm_create_meta_boxes() 434 { 413 435 // add options meta box 414 436 add_meta_box( … … 428 450 'high' 429 451 ); 430 431 } // # function cptm_create_meta_boxes() 432 452 } 453 454 /** 455 * Create custom post meta box 456 * 457 * @param object $post Wordpress $post object 458 */ 433 459 public function cptm_meta_box( $post ) { 434 435 460 // get post meta values 436 461 $values = get_post_custom( $post->ID ); … … 798 823 799 824 <?php 800 801 } // # function cptm_meta_box() 802 803 public function cptm_tax_meta_box( $post ) { 804 825 } 826 827 /** 828 * Create custom post taxonomy meta box 829 * 830 * @param object $post Wordpress $post object 831 */ 832 public function cptm_tax_meta_box( $post ) 833 { 805 834 // get post meta values 806 835 $values = get_post_custom( $post->ID ); … … 951 980 </table> 952 981 <?php 953 954 } // # function cptm_meta_box() 955 956 public function cptm_save_post( $post_id ) { 957 982 } 983 984 /** 985 * Save custom post 986 * 987 * @param int $post_id Wordpress Post ID 988 */ 989 public function cptm_save_post( $post_id ) 990 { 958 991 // verify if this is an auto save routine. 959 992 // If it is our form has not been submitted, so we dont want to do anything … … 962 995 963 996 // if our nonce isn't there, or we can't verify it, bail 964 if ( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return;997 if ( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return; 965 998 966 999 // update custom post type meta values 967 if ( isset($_POST['cptm_name']) )1000 if ( isset($_POST['cptm_name']) ) 968 1001 update_post_meta( $post_id, 'cptm_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_name'] ) ) ); 969 1002 970 if ( isset($_POST['cptm_label']) )1003 if ( isset($_POST['cptm_label']) ) 971 1004 update_post_meta( $post_id, 'cptm_label', sanitize_text_field( $_POST['cptm_label'] ) ); 972 1005 973 if ( isset($_POST['cptm_singular_name']) )1006 if ( isset($_POST['cptm_singular_name']) ) 974 1007 update_post_meta( $post_id, 'cptm_singular_name', sanitize_text_field( $_POST['cptm_singular_name'] ) ); 975 1008 976 if ( isset($_POST['cptm_description']) )1009 if ( isset($_POST['cptm_description']) ) 977 1010 update_post_meta( $post_id, 'cptm_description', esc_textarea( $_POST['cptm_description'] ) ); 978 1011 979 if ( isset($_POST['cptm_icon_slug']) )1012 if ( isset($_POST['cptm_icon_slug']) ) 980 1013 update_post_meta( $post_id, 'cptm_icon_slug', esc_textarea( $_POST['cptm_icon_slug'] ) ); 981 1014 982 if ( isset($_POST['cptm_icon_url']) )1015 if ( isset($_POST['cptm_icon_url']) ) 983 1016 update_post_meta( $post_id, 'cptm_icon_url', esc_textarea( $_POST['cptm_icon_url'] ) ); 984 1017 985 if ( isset( $_POST['cptm_public'] ) )1018 if ( isset( $_POST['cptm_public'] ) ) 986 1019 update_post_meta( $post_id, 'cptm_public', esc_attr( $_POST['cptm_public'] ) ); 987 1020 988 if ( isset( $_POST['cptm_show_ui'] ) )1021 if ( isset( $_POST['cptm_show_ui'] ) ) 989 1022 update_post_meta( $post_id, 'cptm_show_ui', esc_attr( $_POST['cptm_show_ui'] ) ); 990 1023 991 if ( isset( $_POST['cptm_has_archive'] ) )1024 if ( isset( $_POST['cptm_has_archive'] ) ) 992 1025 update_post_meta( $post_id, 'cptm_has_archive', esc_attr( $_POST['cptm_has_archive'] ) ); 993 1026 994 if ( isset( $_POST['cptm_exclude_from_search'] ) )1027 if ( isset( $_POST['cptm_exclude_from_search'] ) ) 995 1028 update_post_meta( $post_id, 'cptm_exclude_from_search', esc_attr( $_POST['cptm_exclude_from_search'] ) ); 996 1029 997 if ( isset( $_POST['cptm_capability_type'] ) )1030 if ( isset( $_POST['cptm_capability_type'] ) ) 998 1031 update_post_meta( $post_id, 'cptm_capability_type', esc_attr( $_POST['cptm_capability_type'] ) ); 999 1032 1000 if ( isset( $_POST['cptm_hierarchical'] ) )1033 if ( isset( $_POST['cptm_hierarchical'] ) ) 1001 1034 update_post_meta( $post_id, 'cptm_hierarchical', esc_attr( $_POST['cptm_hierarchical'] ) ); 1002 1035 1003 if ( isset( $_POST['cptm_rewrite'] ) )1036 if ( isset( $_POST['cptm_rewrite'] ) ) 1004 1037 update_post_meta( $post_id, 'cptm_rewrite', esc_attr( $_POST['cptm_rewrite'] ) ); 1005 1038 1006 if ( isset( $_POST['cptm_withfront'] ) )1039 if ( isset( $_POST['cptm_withfront'] ) ) 1007 1040 update_post_meta( $post_id, 'cptm_withfront', esc_attr( $_POST['cptm_withfront'] ) ); 1008 1041 1009 if ( isset( $_POST['cptm_feeds'] ) )1042 if ( isset( $_POST['cptm_feeds'] ) ) 1010 1043 update_post_meta( $post_id, 'cptm_feeds', esc_attr( $_POST['cptm_feeds'] ) ); 1011 1044 1012 if ( isset( $_POST['cptm_pages'] ) )1045 if ( isset( $_POST['cptm_pages'] ) ) 1013 1046 update_post_meta( $post_id, 'cptm_pages', esc_attr( $_POST['cptm_pages'] ) ); 1014 1047 1015 if ( isset($_POST['cptm_custom_rewrite_slug']) )1048 if ( isset($_POST['cptm_custom_rewrite_slug']) ) 1016 1049 update_post_meta( $post_id, 'cptm_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_custom_rewrite_slug'] ) ); 1017 1050 1018 if ( isset( $_POST['cptm_query_var'] ) )1051 if ( isset( $_POST['cptm_query_var'] ) ) 1019 1052 update_post_meta( $post_id, 'cptm_query_var', esc_attr( $_POST['cptm_query_var'] ) ); 1020 1053 1021 if ( isset( $_POST['cptm_publicly_queryable'] ) )1054 if ( isset( $_POST['cptm_publicly_queryable'] ) ) 1022 1055 update_post_meta( $post_id, 'cptm_publicly_queryable', esc_attr( $_POST['cptm_publicly_queryable'] ) ); 1023 1056 1024 if ( isset($_POST['cptm_menu_position']) )1057 if ( isset($_POST['cptm_menu_position']) ) 1025 1058 update_post_meta( $post_id, 'cptm_menu_position', sanitize_text_field( $_POST['cptm_menu_position'] ) ); 1026 1059 1027 if ( isset( $_POST['cptm_show_in_menu'] ) )1060 if ( isset( $_POST['cptm_show_in_menu'] ) ) 1028 1061 update_post_meta( $post_id, 'cptm_show_in_menu', esc_attr( $_POST['cptm_show_in_menu'] ) ); 1029 1062 … … 1035 1068 1036 1069 // update taxonomy meta values 1037 if ( isset($_POST['cptm_tax_name']) )1070 if ( isset($_POST['cptm_tax_name']) ) 1038 1071 update_post_meta( $post_id, 'cptm_tax_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_tax_name'] ) ) ); 1039 1072 1040 if ( isset($_POST['cptm_tax_label']) )1073 if ( isset($_POST['cptm_tax_label']) ) 1041 1074 update_post_meta( $post_id, 'cptm_tax_label', sanitize_text_field( $_POST['cptm_tax_label'] ) ); 1042 1075 1043 if ( isset($_POST['cptm_tax_singular_name']) )1076 if ( isset($_POST['cptm_tax_singular_name']) ) 1044 1077 update_post_meta( $post_id, 'cptm_tax_singular_name', sanitize_text_field( $_POST['cptm_tax_singular_name'] ) ); 1045 1078 1046 if ( isset( $_POST['cptm_tax_show_ui'] ) )1079 if ( isset( $_POST['cptm_tax_show_ui'] ) ) 1047 1080 update_post_meta( $post_id, 'cptm_tax_show_ui', esc_attr( $_POST['cptm_tax_show_ui'] ) ); 1048 1081 1049 if ( isset( $_POST['cptm_tax_hierarchical'] ) )1082 if ( isset( $_POST['cptm_tax_hierarchical'] ) ) 1050 1083 update_post_meta( $post_id, 'cptm_tax_hierarchical', esc_attr( $_POST['cptm_tax_hierarchical'] ) ); 1051 1084 1052 if ( isset( $_POST['cptm_tax_rewrite'] ) )1085 if ( isset( $_POST['cptm_tax_rewrite'] ) ) 1053 1086 update_post_meta( $post_id, 'cptm_tax_rewrite', esc_attr( $_POST['cptm_tax_rewrite'] ) ); 1054 1087 1055 if ( isset($_POST['cptm_tax_custom_rewrite_slug']) )1088 if ( isset($_POST['cptm_tax_custom_rewrite_slug']) ) 1056 1089 update_post_meta( $post_id, 'cptm_tax_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_tax_custom_rewrite_slug'] ) ); 1057 1090 1058 if ( isset( $_POST['cptm_tax_query_var'] ) )1091 if ( isset( $_POST['cptm_tax_query_var'] ) ) 1059 1092 update_post_meta( $post_id, 'cptm_tax_query_var', esc_attr( $_POST['cptm_tax_query_var'] ) ); 1060 1093 1061 1094 $cptm_tax_post_types = isset( $_POST['cptm_tax_post_types'] ) ? $_POST['cptm_tax_post_types'] : array(); 1062 1095 update_post_meta( $post_id, 'cptm_tax_post_types', $cptm_tax_post_types ); 1063 1096 1064 1097 // Update plugin saved 1065 1098 update_option( 'cptm_plugin_settings_changed', true ); 1066 1067 } // # function save_post() 1099 } 1068 1100 1069 function cptm_plugin_settings_flush_rewrite() { 1101 /** 1102 * Flush rewrite rules 1103 */ 1104 function cptm_plugin_settings_flush_rewrite() 1105 { 1070 1106 if ( get_option( 'cptm_plugin_settings_changed' ) == true ) { 1071 1107 flush_rewrite_rules(); 1072 1108 update_option( 'cptm_plugin_settings_changed', false ); 1073 1109 } 1074 } // # function cptm_plugin_settings_flush_rewrite() 1075 1076 1077 function cptm_plugin_activate_flush_rewrite() { 1110 } 1111 1112 /** 1113 * Flush rewrite rules on plugin activation 1114 */ 1115 function cptm_plugin_activate_flush_rewrite() 1116 { 1078 1117 $this->cptm_create_custom_post_types(); 1079 1118 flush_rewrite_rules(); 1080 } // # function cptm_plugin_settings_flush_rewrite() 1081 1082 function cptm_change_columns( $cols ) { 1083 1119 } 1120 1121 /** 1122 * Modify existing columns 1123 * 1124 * @param array $cols Post columns 1125 * @return object Modified columns 1126 */ 1127 function cptm_change_columns( $cols ) 1128 { 1084 1129 $cols = array( 1085 1130 'cb' => '<input type="checkbox" />', … … 1090 1135 ); 1091 1136 return $cols; 1092 1093 } // # function cptm_change_columns() 1094 1095 function cptm_sortable_columns() { 1096 1137 } 1138 1139 /** 1140 * Make columns sortable 1141 * 1142 * @return array Sortable array 1143 */ 1144 function cptm_sortable_columns() 1145 { 1097 1146 return array( 1098 1147 'title' => 'title' 1099 1148 ); 1100 1101 } // # function cptm_sortable_columns() 1102 1103 function cptm_custom_columns( $column, $post_id ) { 1104 1149 } 1150 1151 /** 1152 * Insert custom column 1153 * 1154 * @param string $column Column name 1155 * @param int $post_id Wordpress Post ID 1156 */ 1157 function cptm_custom_columns( $column, $post_id ) 1158 { 1105 1159 switch ( $column ) { 1106 1160 case "custom_post_type_name": … … 1114 1168 break; 1115 1169 } 1116 1117 } // # function cptm_custom_columns() 1118 1119 function cptm_tax_change_columns( $cols ) { 1120 1170 } 1171 1172 /** 1173 * Modify existing taxonomy columns 1174 * 1175 * @param array $cols Taxonomy columns 1176 * @return array Modified taxonomy columns 1177 */ 1178 function cptm_tax_change_columns( $cols ) 1179 { 1121 1180 $cols = array( 1122 1181 'cb' => '<input type="checkbox" />', … … 1126 1185 ); 1127 1186 return $cols; 1128 1129 } // # function cptm_tax_change_columns() 1130 1131 function cptm_tax_sortable_columns() { 1132 1187 } 1188 1189 /** 1190 * Make taxonomy columns sortable 1191 * 1192 * @return array Sortable array 1193 */ 1194 function cptm_tax_sortable_columns() 1195 { 1133 1196 return array( 1134 1197 'title' => 'title' 1135 1198 ); 1136 1137 } // # function cptm_tax_sortable_columns() 1138 1139 function cptm_tax_custom_columns( $column, $post_id ) { 1140 1199 } 1200 1201 /** 1202 * Insert custom taxonomy columns 1203 * 1204 * @param string $column Column name 1205 * @param int $post_id Wordpress Post ID 1206 */ 1207 function cptm_tax_custom_columns( $column, $post_id ) 1208 { 1141 1209 switch ( $column ) { 1142 1210 case "custom_post_type_name": … … 1147 1215 break; 1148 1216 } 1149 1150 } // # function cptm_tax_custom_columns() 1151 1152 function cptm_admin_footer() { 1153 1217 } 1218 1219 /** 1220 * Insert admin footer 1221 */ 1222 function cptm_admin_footer() 1223 { 1154 1224 global $post_type; 1155 1225 ?> … … 1179 1249 </div> 1180 1250 <?php 1181 if ( 'cptm' == $post_type ) {1251 if ( 'cptm' == $post_type ) { 1182 1252 1183 1253 // Get all public Custom Post Types … … 1279 1349 } 1280 1350 } 1281 if ( 'cptm_tax' == $post_type ) {1351 if ( 'cptm_tax' == $post_type ) { 1282 1352 1283 1353 // Get all public custom Taxonomies … … 1372 1442 } 1373 1443 } 1374 1375 } // # function cptm_admin_footer() 1376 1377 function cptm_post_updated_messages( $messages ) { 1378 1444 } 1445 1446 /** 1447 * Update messages 1448 * 1449 * @param array $messages Update messages 1450 * @return array Update messages 1451 */ 1452 function cptm_post_updated_messages( $messages ) 1453 { 1379 1454 global $post, $post_ID; 1380 1455 … … 1395 1470 1396 1471 return $messages; 1397 1398 } // # function cptm_post_updated_messages() 1399 1472 } 1473 1474 /** 1475 * Prepare attachment for Ajax Upload Request 1476 * @param array $response Response 1477 * @param string $attachment File contents 1478 * @param array $meta File meta contents 1479 * 1480 * @return array Modified response 1481 */ 1400 1482 function wp_prepare_attachment_for_js( $response, $attachment, $meta ) 1401 1483 { 1402 1484 // only for image 1403 if ( $response['type'] != 'image' )1485 if ( $response['type'] != 'image' ) 1404 1486 { 1405 1487 return $response; 1406 1488 } 1407 1489 1408 1409 1490 $attachment_url = $response['url']; 1410 1491 $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url ); 1411 1492 1412 if ( isset( $meta['sizes'] ) && is_array($meta['sizes']) )1493 if ( isset( $meta['sizes'] ) && is_array($meta['sizes']) ) 1413 1494 { 1414 foreach ( $meta['sizes'] as $k => $v )1495 foreach ( $meta['sizes'] as $k => $v ) 1415 1496 { 1416 if ( !isset($response['sizes'][ $k ]) )1497 if ( !isset($response['sizes'][ $k ]) ) 1417 1498 { 1418 1499 $response['sizes'][ $k ] = array( … … 1427 1508 1428 1509 return $response; 1429 } // # function wp_prepare_attachment_for_js() 1430 1510 } 1431 1511 } 1432 1512 -
custom-post-type-maker/trunk/readme.txt
r1680040 r1706357 4 4 Requires at least: 3.0.0 5 5 Tested up to: 4.8 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 67 67 == Changelog == 68 68 69 = 1.1.2 = 70 - [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7) 71 69 72 = 1.1.1 = 70 73 - [Feature] Auto-flush rewrite rules on: custom post save, plugin activation, plugin deactivation.
Note: See TracChangeset
for help on using the changeset viewer.