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

https://github.com/sharpmachine/wakeupmedia.com · PHP · 528 lines · 526 code · 2 blank · 0 comment · 57 complexity · d8550e0c2d4da723e0dc53bda25e179c MD5 · raw file

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