/wp-content/plugins/custompress/ui-admin/add-post-type.php

https://github.com/sharpmachine/wakeupmedia.com · PHP · 536 lines · 534 code · 2 blank · 0 comment · 116 complexity · 120835f6214417448a9b0417d4554169 MD5 · raw file

  1. <?php if (!defined('ABSPATH')) die('No direct access allowed!'); ?>
  2. <h3><?php _e('Add Post Type', $this->text_domain); ?></h3>
  3. <form action="" method="post" class="ct-post-type">
  4. <div class="ct-wrap-left">
  5. <div class="ct-table-wrap">
  6. <div class="ct-arrow"><br></div>
  7. <h3 class="ct-toggle"><?php _e('Post Type', $this->text_domain) ?></h3>
  8. <table class="form-table <?php do_action('ct_invalid_field_post_type'); ?>">
  9. <tr>
  10. <th>
  11. <label for="post_type"><?php _e('Post Type', $this->text_domain) ?> <span class="ct-required">( <?php _e('required', $this->text_domain); ?> )</span></label>
  12. </th>
  13. <td>
  14. <input type="text" name="post_type" value="<?php if ( isset( $_POST['post_type'] ) ) echo $_POST['post_type']; elseif ( isset( $_GET['ct_edit_post_type'] ) ) echo $_GET['ct_edit_post_type']; ?>">
  15. <span class="description"><?php _e('The new post type system name ( max. 20 characters ). Alphanumeric characters and underscores only. Min 2 letters. Once added the post type system name cannot be changed.', $this->text_domain); ?></span>
  16. </td>
  17. </tr>
  18. </table>
  19. </div>
  20. <div class="ct-table-wrap">
  21. <div class="ct-arrow"><br></div>
  22. <h3 class="ct-toggle"><?php _e('Supports', $this->text_domain) ?></h3>
  23. <table class="form-table supports">
  24. <tr>
  25. <th>
  26. <label for="supports"><?php _e('Supports', $this->text_domain) ?></label>
  27. </th>
  28. <td>
  29. <span class="description"><?php _e('Register support of certain features for a post type.', $this->text_domain); ?></span>
  30. </td>
  31. </tr>
  32. <tr>
  33. <th></th>
  34. <td>
  35. <input type="checkbox" name="supports[title]" value="title" <?php if ( isset( $_POST['supports']['title'] ) && $_POST['supports']['title'] == 'title') { echo( 'checked="checked"' ); } elseif ( !isset( $_POST['supports']['title'] ) && !isset( $_POST['ct_submit_add_post_type'] )) { echo( 'checked="checked"' ); } ?>>
  36. <span class="description"><strong><?php _e('Title', $this->text_domain) ?></strong></span>
  37. <br />
  38. <input type="checkbox" name="supports[editor]" value="editor" <?php if ( isset( $_POST['supports']['editor'] ) && $_POST['supports']['editor'] == 'editor') echo( 'checked="checked"' ); elseif ( !isset( $_POST['supports']['editor'] ) && !isset( $_POST['ct_submit_add_post_type'] )) echo( 'checked="checked"' ); ?>>
  39. <span class="description"><strong><?php _e('Editor', $this->text_domain) ?></strong> - <?php _e('Content', $this->text_domain) ?></span>
  40. <br />
  41. <input type="checkbox" name="supports[author]" value="author" <?php if ( isset( $_POST['supports']['author'] ) && $_POST['supports']['author'] == 'author') echo( 'checked="checked"' ); ?>>
  42. <span class="description"><strong><?php _e('Author', $this->text_domain) ?></strong></span>
  43. <br />
  44. <input type="checkbox" name="supports[thumbnail]" value="thumbnail" <?php if ( isset( $_POST['supports']['thumbnail'] ) && $_POST['supports']['thumbnail'] == 'thumbnail') echo( 'checked="checked"' ); ?>>
  45. <span class="description"><strong><?php _e('Thumbnail', $this->text_domain) ?></strong> - <?php _e('Featured Image - current theme must also support post-thumbnails.', $this->text_domain) ?></span>
  46. <br />
  47. <input type="checkbox" name="supports[excerpt]" value="excerpt" <?php if ( isset( $_POST['supports']['excerpt'] ) && $_POST['supports']['excerpt'] == 'excerpt') echo( 'checked="checked"' ); ?>>
  48. <span class="description"><strong><?php _e('Excerpt', $this->text_domain) ?></strong></span>
  49. <br />
  50. <input type="checkbox" name="supports[trackbacks]" value="trackbacks" <?php if ( isset( $_POST['supports']['trackbacks'] ) && $_POST['supports']['trackbacks'] == 'trackbacks') echo( 'checked="checked"' ); ?>>
  51. <span class="description"><strong><?php _e('Trackbacks', $this->text_domain) ?></strong></span>
  52. <br />
  53. <input type="checkbox" name="supports[custom_fields]" value="custom_fields" <?php if ( isset( $_POST['supports']['custom_fields'] ) && $_POST['supports']['custom_fields'] == 'custom_fields') echo( 'checked="checked"' ); ?>>
  54. <span class="description"><strong><?php _e('Custom Fields', $this->text_domain) ?></strong></span>
  55. <br />
  56. <input type="checkbox" name="supports[comments]" value="comments" <?php if ( isset( $_POST['supports']['comments'] ) && $_POST['supports']['comments'] == 'comments') echo( 'checked="checked"' ); ?>>
  57. <span class="description"><strong><?php _e('Comments', $this->text_domain) ?></strong> - <?php _e('Also will see comment count balloon on edit screen.', $this->text_domain) ?></span>
  58. <br />
  59. <input type="checkbox" name="supports[revisions]" value="revisions" <?php if ( isset( $_POST['supports']['revisions'] ) && $_POST['supports']['revisions'] == 'revisions') echo( 'checked="checked"' ); ?>>
  60. <span class="description"><strong><?php _e('Revisions', $this->text_domain) ?></strong> - <?php _e('Will store revisions.', $this->text_domain) ?></span>
  61. <br />
  62. <input type="checkbox" name="supports[page_attributes]" value="page-attributes" <?php if ( isset( $_POST['supports']['page_attributes'] ) && $_POST['supports']['page_attributes'] == 'page-attributes') echo( 'checked="checked"' ); ?>>
  63. <span class="description"><strong><?php _e('Page Attributes', $this->text_domain) ?></strong> - <?php _e('Template and menu order - Hierarchical must be true!', $this->text_domain) ?></span>
  64. <br />
  65. <input type="checkbox" name="supports[post_formats]" value="post-formats" <?php if ( isset( $_POST['supports']['post_formats'] ) && $_POST['supports']['post_formats'] == 'post-formats') echo( 'checked="checked"' ); ?>>
  66. <span class="description"><strong><?php _e('Post Formats', $this->text_domain) ?></strong> - <?php _e('Add post formats.', $this->text_domain) ?></span>
  67. </td>
  68. </tr>
  69. </table>
  70. </div>
  71. <div class="ct-table-wrap">
  72. <div class="ct-arrow"><br></div>
  73. <h3 class="ct-toggle"><?php _e('Capability Type', $this->text_domain) ?></h3>
  74. <table class="form-table">
  75. <tr>
  76. <th>
  77. <label for="capability_type"><?php _e('Capability Type', $this->text_domain) ?></label>
  78. </th>
  79. <td>
  80. <input type="text" name="capability_type" value="post">
  81. <input type="checkbox" name="capability_type_edit" value="1" />
  82. <span class="description ct-capability-type-edit"><strong><?php _e('Edit' , $this->text_domain); ?></strong> (<?php _e('advanced' , $this->text_domain); ?>)</span>
  83. <span class="description"><?php _e('The post type to use for checking read, edit, and delete capabilities. Default: "post".' , $this->text_domain); ?></span>
  84. </td>
  85. </tr>
  86. </table>
  87. </div>
  88. <div class="ct-table-wrap">
  89. <div class="ct-arrow"><br></div>
  90. <h3 class="ct-toggle"><?php _e('Labels', $this->text_domain) ?></h3>
  91. <table class="form-table">
  92. <tr>
  93. <th>
  94. <label for="name"><?php _e('Name', $this->text_domain) ?></label>
  95. </th>
  96. <td>
  97. <input type="text" name="labels[name]" value="<?php if ( isset( $_POST['labels']['name'] ) ) echo $_POST['labels']['name']; ?>">
  98. <span class="description"><?php _e('General name for the post type, usually plural.', $this->text_domain); ?></span>
  99. </td>
  100. </tr>
  101. <tr>
  102. <th>
  103. <label for="singular_name"><?php _e('Singular Name', $this->text_domain) ?></label>
  104. </th>
  105. <td>
  106. <input type="text" name="labels[singular_name]" value="<?php if ( isset( $_POST['labels']['singular_name'] ) ) echo $_POST['labels']['singular_name']; ?>">
  107. <span class="description"><?php _e('Name for one object of this post type. Defaults to value of name.', $this->text_domain); ?></span>
  108. </td>
  109. </tr>
  110. <tr>
  111. <th>
  112. <label for="add_new"><?php _e('Add New', $this->text_domain) ?></label>
  113. </th>
  114. <td>
  115. <input type="text" name="labels[add_new]" value="<?php if ( isset( $_POST['labels']['add_new'] ) ) echo $_POST['labels']['add_new']; ?>">
  116. <span class="description"><?php _e('The add new text. The default is Add New for both hierarchical and non-hierarchical types.', $this->text_domain); ?></span>
  117. </td>
  118. </tr>
  119. <tr>
  120. <th>
  121. <label for="add_new_item"><?php _e('Add New Item', $this->text_domain) ?></label>
  122. </th>
  123. <td>
  124. <input type="text" name="labels[add_new_item]" value="<?php if ( isset( $_POST['labels']['add_new_item'] ) ) echo $_POST['labels']['add_new_item']; ?>">
  125. <span class="description"><?php _e('The add new item text. Default is Add New Post/Add New Page.', $this->text_domain); ?></span>
  126. </td>
  127. </tr>
  128. <tr>
  129. <th>
  130. <label for="edit_item"><?php _e('Edit Item', $this->text_domain) ?></label>
  131. </th>
  132. <td>
  133. <input type="text" name="labels[edit_item]" value="<?php if ( isset( $_POST['labels']['edit_item'] ) ) echo $_POST['labels']['edit_item']; ?>">
  134. <span class="description"><?php _e('The edit item text. Default is Edit Post/Edit Page.', $this->text_domain); ?></span>
  135. </td>
  136. </tr>
  137. <tr>
  138. <th>
  139. <label for="new_item"><?php _e('New Item', $this->text_domain) ?></label>
  140. </th>
  141. <td>
  142. <input type="text" name="labels[new_item]" value="<?php if ( isset( $_POST['labels']['new_item'] ) ) echo $_POST['labels']['new_item']; ?>">
  143. <span class="description"><?php _e('The new item text. Default is New Post/New Page.', $this->text_domain); ?></span>
  144. </td>
  145. </tr>
  146. <tr>
  147. <th>
  148. <label for="view_item"><?php _e('View Item', $this->text_domain) ?></label>
  149. </th>
  150. <td>
  151. <input type="text" name="labels[view_item]" value="<?php if ( isset( $_POST['labels']['view_item'] ) ) echo $_POST['labels']['view_item']; ?>">
  152. <span class="description"><?php _e('The view item text. Default is View Post/View Page.', $this->text_domain); ?></span>
  153. </td>
  154. </tr>
  155. <tr>
  156. <th>
  157. <label for="search_items"><?php _e('Search Items', $this->text_domain) ?></label>
  158. </th>
  159. <td>
  160. <input type="text" name="labels[search_items]" value="<?php if ( isset( $_POST['labels']['search_items'] ) ) echo $_POST['labels']['search_items']; ?>">
  161. <span class="description"><?php _e('The search items text. Default is Search Posts/Search Pages.', $this->text_domain); ?></span>
  162. </td>
  163. </tr>
  164. <tr>
  165. <th>
  166. <label for="not_found"><?php _e('Not Found', $this->text_domain) ?></label>
  167. </th>
  168. <td>
  169. <input type="text" name="labels[not_found]" value="<?php if ( isset( $_POST['labels']['not_found'] ) ) echo $_POST['labels']['not_found']; ?>">
  170. <span class="description"><?php _e('The not found text. Default is No posts found/No pages found.', $this->text_domain); ?></span>
  171. </td>
  172. </tr>
  173. <tr>
  174. <th>
  175. <label for="not_found_in_trash"><?php _e('Not Found In Trash', $this->text_domain) ?></label>
  176. </th>
  177. <td>
  178. <input type="text" name="labels[not_found_in_trash]" value="<?php if ( isset( $_POST['labels']['not_found_in_trash'] ) ) echo $_POST['labels']['not_found_in_trash']; ?>">
  179. <span class="description"><?php _e('The not found in trash text. Default is No posts found in Trash/No pages found in Trash.', $this->text_domain); ?></span>
  180. </td>
  181. </tr>
  182. <tr>
  183. <th>
  184. <label for="parent_item_colon"><?php _e('Parent Item Colon', $this->text_domain) ?></label>
  185. </th>
  186. <td>
  187. <input type="text" name="labels[parent_item_colon]" value="<?php if ( isset( $_POST['labels']['parent_item_colon'] ) ) echo $_POST['labels']['parent_item_colon']; ?>">
  188. <span class="description"><?php _e('The parent text. This string isn\'t used on non-hierarchical types. In hierarchical ones the default is Parent Page', $this->text_domain); ?></span>
  189. </td>
  190. </tr>
  191. </table>
  192. </div>
  193. <div class="ct-table-wrap">
  194. <div class="ct-arrow"><br></div>
  195. <h3 class="ct-toggle"><?php _e('Description', $this->text_domain) ?></h3>
  196. <table class="form-table">
  197. <tr>
  198. <th>
  199. <label for="description"><?php _e('Description', $this->text_domain) ?></label>
  200. </th>
  201. <td>
  202. <textarea class="ct-field-description" name="description" rows="3"><?php if ( isset( $_POST['description'] ) ) echo $_POST['description']; ?></textarea>
  203. <span class="description"><?php _e('A short descriptive summary of what the post type is.', $this->text_domain); ?></span>
  204. </td>
  205. </tr>
  206. </table>
  207. </div>
  208. <div class="ct-table-wrap">
  209. <div class="ct-arrow"><br></div>
  210. <h3 class="ct-toggle"><?php _e('Menu Position', $this->text_domain) ?></h3>
  211. <table class="form-table">
  212. <tr>
  213. <th>
  214. <label for="menu_position"><?php _e('Menu Position', $this->text_domain) ?></label>
  215. </th>
  216. <td>
  217. <input type="text" name="menu_position" value="<?php if ( isset( $_POST['menu_position'] ) ) echo $_POST['menu_position']; elseif ( !isset( $_POST['menu_position'] ) ) echo '50'; ?>">
  218. <span class="description"><?php _e('5 - below Posts; 10 - below Media; 20 - below Pages; 60 - below first separator; 100 - below second separator', $this->text_domain); ?></span>
  219. </td>
  220. </tr>
  221. </table>
  222. </div>
  223. <div class="ct-table-wrap">
  224. <div class="ct-arrow"><br></div>
  225. <h3 class="ct-toggle"><?php _e('Menu Icon', $this->text_domain) ?></h3>
  226. <table class="form-table">
  227. <tr>
  228. <th>
  229. <label for="menu_icon"><?php _e('Menu Icon', $this->text_domain) ?></label>
  230. </th>
  231. <td>
  232. <input type="text" name="menu_icon" value="<?php if ( isset( $_POST['menu_icon'] ) ) echo $_POST['menu_icon']; ?>">
  233. <span class="description"><?php _e('The url to the icon to be used for this menu.', $this->text_domain); ?></span>
  234. </td>
  235. </tr>
  236. </table>
  237. </div>
  238. </div>
  239. <div class="ct-wrap-right">
  240. <div class="ct-table-wrap">
  241. <div class="ct-arrow"><br></div>
  242. <h3 class="ct-toggle"><?php _e('Public', $this->text_domain) ?></h3>
  243. <table class="form-table publica">
  244. <tr>
  245. <th>
  246. <label for="public"><?php _e('Public', $this->text_domain) ?></label>
  247. </th>
  248. <td>
  249. <span class="description"><?php _e('Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search.', $this->text_domain); ?></span>
  250. </td>
  251. </tr>
  252. <tr>
  253. <th></th>
  254. <td>
  255. <input type="radio" name="public" value="1" <?php if ( isset( $_POST['public'] ) && $_POST['public'] === '1' ) echo( 'checked="checked"' ); elseif ( !isset( $_POST['public'] ) ) echo 'checked="checked"'; ?>>
  256. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong><br />
  257. <?php _e('Display a user-interface for this "post_type"', $this->text_domain);?><br /><code>( show_ui = TRUE )</code><br /><br />
  258. <?php _e('Show "post_type" for selection in navigation menus', $this->text_domain); ?><br /><code>( show_in_nav_menus = TRUE )</code><br /><br />
  259. <?php _e('"post_type" queries can be performed from the front-end', $this->text_domain); ?><br /><code>( publicly_queryable = TRUE )</code><br /><br />
  260. <?php _e('Exclude posts with this post type from search results', $this->text_domain); ?><br /> <code>( exclude_from_search = FALSE )</code></span>
  261. <br /><br />
  262. <input type="radio" name="public" value="0" <?php if ( isset( $_POST['public'] ) && $_POST['public'] === '0' ) echo 'checked="checked"'; ?>>
  263. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong><br />
  264. <?php _e('Don not display a user-interface for this "post_type"', $this->text_domain);?><br /><code>( show_ui = FALSE )</code><br /><br />
  265. <?php _e('Hide "post_type" for selection in navigation menus', $this->text_domain); ?><br /><code>( show_in_nav_menus = FALSE )</code><br /><br />
  266. <?php _e('"post_type" queries cannot be performed from the front-end', $this->text_domain); ?><br /><code>( publicly_queryable = FALSE )</code><br /><br />
  267. <?php _e('Exclude posts with this post type from search results', $this->text_domain); ?><br /> <code>( exclude_from_search = TRUE )</code></span>
  268. <br /><br />
  269. <input type="radio" name="public" value="advanced" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' ) echo( 'checked="checked"' ); ?>>
  270. <span class="description"><strong><?php _e('Advanced', $this->text_domain); ?></strong>
  271. <br />
  272. <?php _e('You can set each component manualy.', $this->text_domain); ?></span>
  273. </td>
  274. </tr>
  275. </table>
  276. </div>
  277. <div class="ct-table-wrap">
  278. <div class="ct-arrow"><br></div>
  279. <h3 class="ct-toggle"><?php _e('Show UI', $this->text_domain) ?></h3>
  280. <table class="form-table show-ui">
  281. <tr>
  282. <th>
  283. <label for="show_ui"><?php _e('Show UI', $this->text_domain) ?></label>
  284. </th>
  285. <td>
  286. <span class="description"><?php _e('Whether to generate a default UI for managing this post type.', $this->text_domain); ?></span>
  287. </td>
  288. </tr>
  289. <tr>
  290. <th></th>
  291. <td>
  292. <input type="radio" name="show_ui" value="1" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['show_ui'] ) && $_POST['show_ui'] === '1' ) echo( 'checked="checked"' ); ?>>
  293. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong>
  294. <br />
  295. <?php _e('Display a user-interface (admin panel) for this post type.', $this->text_domain); ?></span>
  296. <br />
  297. <input type="radio" name="show_ui" value="0" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['show_ui'] ) && $_POST['show_ui'] === '0' ) echo( 'checked="checked"' ); ?>>
  298. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong>
  299. <br />
  300. <?php _e('Do not display a user-interface for this post type.', $this->text_domain); ?></span>
  301. </td>
  302. </tr>
  303. </table>
  304. </div>
  305. <div class="ct-table-wrap">
  306. <div class="ct-arrow"><br></div>
  307. <h3 class="ct-toggle"><?php _e('Show In Nav Menus ', $this->text_domain) ?></h3>
  308. <table class="form-table show-in-nav-menus">
  309. <tr>
  310. <th>
  311. <label for="show_in_nav_menus"><?php _e('Show In Nav Menus', $this->text_domain) ?></label>
  312. </th>
  313. <td>
  314. <span class="description"><?php _e('Whether post_type is available for selection in navigation menus.', $this->text_domain); ?></span>
  315. </td>
  316. </tr>
  317. <tr>
  318. <th></th>
  319. <td>
  320. <input type="radio" name="show_in_nav_menus" value="1" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['show_in_nav_menus'] ) && $_POST['show_in_nav_menus'] === '1' ) echo( 'checked="checked"' ); ?>>
  321. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  322. <br />
  323. <input type="radio" name="show_in_nav_menus" value="0" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['show_in_nav_menus'] ) && $_POST['show_in_nav_menus'] === '0' ) echo( 'checked="checked"' ); ?>>
  324. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  325. </td>
  326. </tr>
  327. </table>
  328. </div>
  329. <div class="ct-table-wrap">
  330. <div class="ct-arrow"><br></div>
  331. <h3 class="ct-toggle"><?php _e('Publicly Queryable', $this->text_domain) ?></h3>
  332. <table class="form-table public-queryable">
  333. <tr>
  334. <th>
  335. <label for="publicly_queryable"><?php _e('Publicly Queryable', $this->text_domain ) ?></label>
  336. </th>
  337. <td>
  338. <span class="description"><?php _e('Whether post_type queries can be performed from the front end.', $this->text_domain); ?></span>
  339. </td>
  340. </tr>
  341. <tr>
  342. <th></th>
  343. <td>
  344. <input type="radio" name="publicly_queryable" value="1" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['publicly_queryable'] ) && $_POST['publicly_queryable'] === '1' ) echo( 'checked="checked"' ); ?>>
  345. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  346. <br />
  347. <input type="radio" name="publicly_queryable" value="0" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['publicly_queryable'] ) && $_POST['publicly_queryable'] === '0' ) echo( 'checked="checked"' ); ?>>
  348. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  349. </td>
  350. </tr>
  351. </table>
  352. </div>
  353. <div class="ct-table-wrap">
  354. <div class="ct-arrow"><br></div>
  355. <h3 class="ct-toggle"><?php _e('Exclude From Search', $this->text_domain) ?></h3>
  356. <table class="form-table exclude-from-search">
  357. <tr>
  358. <th>
  359. <label for="exclude_from_search"><?php _e('Exclude From Search', $this->text_domain) ?></label>
  360. </th>
  361. <td>
  362. <span class="description"><?php _e('Whether to exclude posts with this post type from search results.', $this->text_domain); ?></span>
  363. </td>
  364. </tr>
  365. <tr>
  366. <th></th>
  367. <td>
  368. <input type="radio" name="exclude_from_search" value="1" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['exclude_from_search'] ) && $_POST['exclude_from_search'] === '1' ) echo( 'checked="checked"' ); ?>>
  369. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  370. <br />
  371. <input type="radio" name="exclude_from_search" value="0" <?php if ( isset( $_POST['public'] ) && $_POST['public'] == 'advanced' && isset( $_POST['exclude_from_search'] ) && $_POST['exclude_from_search'] === '0' ) echo( 'checked="checked"' ); ?>>
  372. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  373. </td>
  374. </tr>
  375. </table>
  376. </div>
  377. <div class="ct-table-wrap">
  378. <div class="ct-arrow"><br></div>
  379. <h3 class="ct-toggle"><?php _e('Hierarchical', $this->text_domain) ?></h3>
  380. <table class="form-table">
  381. <tr>
  382. <th>
  383. <label for="hierarchical"><?php _e('Hierarchical', $this->text_domain) ?></label>
  384. </th>
  385. <td>
  386. <span class="description"><?php _e('Whether the post type is hierarchical. Allows Parent to be specified.', $this->text_domain); ?></span>
  387. </td>
  388. </tr>
  389. <tr>
  390. <th></th>
  391. <td>
  392. <input type="radio" name="hierarchical" value="1" <?php if ( isset( $_POST['hierarchical'] ) && $_POST['hierarchical'] === '1' ) echo( 'checked="checked"' ); ?>>
  393. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  394. <br />
  395. <input type="radio" name="hierarchical" value="0" checked="checked" <?php if ( isset( $_POST['hierarchical'] ) && $_POST['hierarchical'] === '0' ) echo( 'checked="checked"' ); elseif ( !isset( $_POST['hierarchical'] ) ) echo( 'checked="checked"' ); ?>>
  396. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  397. </td>
  398. </tr>
  399. </table>
  400. </div>
  401. <div class="ct-table-wrap">
  402. <div class="ct-arrow"><br></div>
  403. <h3 class="ct-toggle"><?php _e('Has Archive', $this->text_domain) ?></h3>
  404. <table class="form-table">
  405. <tr>
  406. <th>
  407. <label for="hierarchical"><?php _e('Has Archive', $this->text_domain) ?></label>
  408. </th>
  409. <td>
  410. <span class="description"><?php _e('Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.', $this->text_domain); ?></span>
  411. </td>
  412. </tr>
  413. <tr>
  414. <th></th>
  415. <td>
  416. <input type="radio" name="has_archive" value="1" <?php if ( isset( $_POST['has_archive'] ) && $_POST['has_archive'] === '1' ) echo 'checked="checked"'; ?>>
  417. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  418. <br />
  419. <input type="radio" name="has_archive" value="0" <?php if ( isset( $_POST['has_archive'] ) && $_POST['has_archive'] === '0' ) echo 'checked="checked"'; elseif ( !isset( $_POST['has_archive'] ) ) echo 'checked="checked"'; ?>>
  420. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  421. <br /><br />
  422. <span class="description"><strong><?php _e('Custom Slug', $this->text_domain); ?></strong></span>
  423. <br />
  424. <input type="text" name="has_archive_slug" value="<?php if ( !empty( $_POST['has_archive_slug'] ) ) echo $_POST['has_archive_slug']; ?>" />
  425. <br />
  426. <span class="description"><?php _e('Custom slug for post type archive.', $this->text_domain); ?></span>
  427. </td>
  428. </tr>
  429. </table>
  430. </div>
  431. <div class="ct-table-wrap">
  432. <div class="ct-arrow"><br></div>
  433. <h3 class="ct-toggle"><?php _e('Rewrite', $this->text_domain) ?></h3>
  434. <table class="form-table">
  435. <tr>
  436. <th>
  437. <label for="rewrite"><?php _e('Rewrite', $this->text_domain) ?></label>
  438. </th>
  439. <td>
  440. <span class="description"><?php _e('Rewrite permalinks with this format.', $this->text_domain); ?></span>
  441. </td>
  442. </tr>
  443. <tr>
  444. <th></th>
  445. <td>
  446. <input type="radio" name="rewrite" value="1" <?php if ( isset( $_POST['rewrite'] ) && $_POST['rewrite'] === '1' ) echo( 'checked="checked"' ); elseif ( !isset( $_POST['rewrite'] ) ) echo( 'checked="checked"' ); ?>>
  447. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  448. <br />
  449. <span class="description"><?php _e('Default will use post type.', $this->text_domain); ?></span>
  450. <br />
  451. <input type="radio" name="rewrite" value="0" <?php if ( isset( $_POST['rewrite'] ) && $_POST['rewrite'] === '0' ) echo( 'checked="checked"' ); ?>>
  452. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  453. <br />
  454. <span class="description"><?php _e('Prevent rewrite.', $this->text_domain); ?></span>
  455. <br /><br />
  456. <span class="description"><strong><?php _e('Custom Slug', $this->text_domain); ?></strong></span>
  457. <br />
  458. <input type="text" name="rewrite_slug" value="<?php if ( !empty( $_POST['rewrite_slug'] ) ) echo $_POST['rewrite_slug']; ?>" />
  459. <br />
  460. <span class="description"><?php _e('Prepend posts with this slug. If empty default will be used.', $this->text_domain); ?></span>
  461. <br /><br />
  462. <input type="checkbox" name="rewrite_with_front" value="1" <?php if ( !isset( $_POST['rewrite_with_front'] ) || !empty( $_POST['rewrite_with_front'] ) ) echo 'checked="checked"'; ?>>
  463. <span class="description"><strong><?php _e('Allow Front Base', $this->text_domain); ?></strong></span>
  464. <br />
  465. <span class="description"><?php _e('Allowing permalinks to be prepended with front base.', $this->text_domain); ?></span>
  466. <br /><br />
  467. <input type="checkbox" name="rewrite_feeds" value="1" <?php if ( !empty( $_POST['rewrite_feeds'] ) ) echo 'checked="checked"'; ?>>
  468. <span class="description"><strong><?php _e('Feeds', $this->text_domain); ?></strong></span>
  469. <br />
  470. <span class="description"><?php _e('Default will use has_archive.', $this->text_domain); ?></span>
  471. <br />
  472. <input type="checkbox" name="rewrite_pages" value="1" <?php if ( !empty( $_POST['rewrite_pages'] ) ) echo 'checked="checked"'; ?>>
  473. <span class="description"><strong><?php _e('Pages', $this->text_domain); ?></strong></span>
  474. <br />
  475. <span class="description"><?php _e('Defaults to true.', $this->text_domain); ?></span>
  476. </td>
  477. </tr>
  478. </table>
  479. </div>
  480. <div class="ct-table-wrap">
  481. <div class="ct-arrow"><br></div>
  482. <h3 class="ct-toggle"><?php _e('Query var', $this->text_domain) ?></h3>
  483. <table class="form-table">
  484. <tr>
  485. <th>
  486. <label for="query_var"><?php _e('Query var', $this->text_domain) ?></label>
  487. </th>
  488. <td>
  489. <span class="description"><?php _e('Can queries be performed on this post_type.', $this->text_domain); ?></span>
  490. </td>
  491. </tr>
  492. <tr>
  493. <th></th>
  494. <td>
  495. <input type="radio" name="query_var" value="1" checked="checked">
  496. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  497. <br />
  498. <input type="radio" name="query_var" value="0">
  499. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  500. </td>
  501. </tr>
  502. </table>
  503. </div>
  504. <div class="ct-table-wrap">
  505. <div class="ct-arrow"><br></div>
  506. <h3 class="ct-toggle"><?php _e('Can Export', $this->text_domain) ?></h3>
  507. <table class="form-table">
  508. <tr>
  509. <th>
  510. <label for="hierarchical"><?php _e('Can Export', $this->text_domain) ?></label>
  511. </th>
  512. <td>
  513. <span class="description"><?php _e('Can this post_type be exported.', $this->text_domain); ?></span>
  514. </td>
  515. </tr>
  516. <tr>
  517. <th></th>
  518. <td>
  519. <input type="radio" name="can_export" value="1" checked="checked">
  520. <span class="description"><strong><?php _e('TRUE', $this->text_domain); ?></strong></span>
  521. <br />
  522. <input type="radio" name="can_export" value="0">
  523. <span class="description"><strong><?php _e('FALSE', $this->text_domain); ?></strong></span>
  524. </td>
  525. </tr>
  526. </table>
  527. </div>
  528. </div>
  529. <p class="submit">
  530. <?php wp_nonce_field('submit_post_type'); ?>
  531. <input type="submit" class="button-primary" name="submit" value="Add Post Type" />
  532. </p>
  533. <br /><br /><br /><br />
  534. </form>