More presave filters.

git-svn-id: https://develop.svn.wordpress.org/trunk@2317 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-02-14 04:05:19 +00:00
parent b217e56e28
commit f2f1c3083e
1 changed files with 9 additions and 9 deletions

View File

@ -28,22 +28,22 @@ case 'post':
if ( !user_can_create_draft($user_ID) ) if ( !user_can_create_draft($user_ID) )
die('You are not allowed to create posts or drafts on this blog.'); die('You are not allowed to create posts or drafts on this blog.');
$post_pingback = intval($_POST['post_pingback']); $post_pingback = (int) $_POST['post_pingback'];
$content = apply_filters('content_save_pre', $_POST['content']); $content = apply_filters('content_save_pre', $_POST['content']);
$excerpt = apply_filters('excerpt_save_pre',$_POST['excerpt']); $excerpt = apply_filters('excerpt_save_pre', $_POST['excerpt']);
$post_title = $_POST['post_title']; $post_title = apply_filters('title_save_pre', $_POST['post_title']);
$post_categories = $_POST['post_category']; $post_categories = apply_filters('category_save_pre', $_POST['post_category']);
$post_status = $_POST['post_status']; $post_status = apply_filters('status_save_pre', $_POST['post_status']);
$post_name = $_POST['post_name']; $post_name = apply_filters('name_save_pre', $_POST['post_name']);
$post_parent = 0; $post_parent = 0;
$menu_order = 0; $menu_order = 0;
if ( isset($_POST['parent_id']) ) if ( isset($_POST['parent_id']) )
$post_parent = $_POST['parent_id']; $post_parent = (int) $_POST['parent_id'];
if ( isset($_POST['menu_order']) ) if ( isset($_POST['menu_order']) )
$menu_order = $_POST['menu_order']; $menu_order = (int) $_POST['menu_order'];
if (! empty($_POST['post_author_override'])) { if (! empty($_POST['post_author_override'])) {
$post_author = (int) $_POST['post_author_override']; $post_author = (int) $_POST['post_author_override'];