[Plugin:add_action problem] load-{$page} action not work
-
In my plugin, I want to do some operation on both post-new.php page and post.php page,or another way of saying when I add a new post and edit a existed post.
So I use theadd_action('load-post.php','my_test_funtion');//I hope this can work ,but it doesn't add_action('load-post-new.php','my_test_funtion');//I hope this can work ,but it doesn't add_action('wp_insert_post','my_test_funtion');//This is the original code,but it only works on the post-new.php,and I can't find a similar action on the post.php pagein my plugin.
And then I try to use
add_action('admin_enqueue_scripts','my_test_funtion');//only for test add_action('admin_print_styles','my_test_funtion');//only for test add_action('admin_print_scripts','my_test_funtion');//only for test add_action('admin_head','my_test_funtion');//only for testbut all above do not work on all admin page but the post-new.php, and I can’t see any effect but on the post-new.php. So weird!
I hope you guys can help me , it’s so confusing!
The topic ‘[Plugin:add_action problem] load-{$page} action not work’ is closed to new replies.