[wp-hackers] filter the default post to edit

Malaiac malaiac at gmail.com
Tue Sep 16 04:00:39 GMT 2008


I think I tried all actions.
in post-new.php, how should I be able to modify the default post ?

[usage : users can pre fill some values in an external form, values
which are used to calculate some custom fields, change the post status
to 'published' - for direct publishing, and change the post_mime_type]

I traced the script actions :
[post-new.php]

<header>

action('admin_menu')

<menu>

action('admin_notices')

$post = get_default_post_to_edit() << $post is defined here

<edit-form-advanced.php...

<< and is used in the first part of edit-form-advanced, without any
filtering or action possibility !!

then some actions, late in the page...
	do_action('post_relatedlinks_list');
	do_action('submitpost_box');
	do_meta_boxes('post', 'normal', $post);
	do_action('edit_form_advanced');
	do_action('dbx_post_advanced');
	do_meta_boxes('post', 'advanced', $post);
	do_action('dbx_post_sidebar');

...>


Any ideas how to modify the default $post according to user generated values ?


Malaiac


More information about the wp-hackers mailing list