false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ )); if($_POST['action'] == 'edit') { if(!isset($_POST['menu_order'])) $_POST['menu_order'] = 0; else { //If the post of any template is set to 1, that is the default template. Set all others to 0 $wpdb->get_results("UPDATE {$wpdb->posts} SET menu_order='0' WHERE post_type='template' AND post_author='{$current_user->ID}'"); } $_POST['post_content'] = $_POST['content']; edit_post($_POST); echo "
" . t('Template modified.') . "
" . t('Template created.') . "
" . t('Template deleted.') . "
ID |
Title | Author | Created on | Action | ||
|---|---|---|---|---|---|---|
| ID ?> | post_title ?> | display_name) ?> | post_date)) ?> | '> | ID"; if (function_exists('wp_nonce_url')) { $link = wp_nonce_url($link, 'delete-post_' . $template->ID); } ?>post_title}'. Press 'OK' to delete and 'Cancel' to stop."))?>');"> | |