[wp-hackers] Three Plugin development questions
ssruprai at hotmail.com
Fri Jul 9 14:27:49 UTC 2010
Sorry for posting at wrong mailing list. I know cannot expect any more support here but I still want to explain what I am doing.
Regarding user capabilities I'lll look at those. I just started with wordpress plugin development and have only done few projects. So I looked at other plugins code etc. and user the methods I saw there.
> In your call to add_submenu_page(), one of the 'Add Firm' strings
> page title.
I understand this but thing is the same form will handle editing/adding so when an id is passed I wanted to dynamically change what appears in browser address bar to 'Update Firm'.
> With regards to headers already being sent, you are hooking in too
> perform a redirection -- it must come before any HTTP
headers are sent. You
> should consider using a custom post type.
The headers are sent by wordpress admin.php file and I don't output anything myself before redirecting.
I think when using add_menu_page or add_submenu_page whatever page/code redirects gets the header already sent warning. I am not sure if there is any other way to add menus or submenus so that I don't get headers warning.
Also there is a problem of menu item appearing twice (once in main menu and once in submenu)
Regarding custom posts we started with those but I think data for custom posts is stored in post_meta in row format rather than columns (I understand it has to be done this way). I want to extract data in different ways and pass on to some flash front end so I am not sure the custom posts may be best way.
I have searched around and have not found answers to these questions. Only as last resort I post to forum or subscribe to mailing list.
Could you please let me know what should mailing list I should subscribe
to for help in plugin development?
> From: wp at andrewnacin.com
> Date: Fri, 9 Jul 2010 09:58:29 -0400
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Three Plugin development questions
> On Fri, Jul 9, 2010 at 9:47 AM, Sukhwinder Singh <ssruprai at hotmail.com>wrote:
> > I had posted this at wordpress.org forum but haven't received any reply
> > since yesterday so I subscribed to this mailing list to try to get any help.
> This is not a support mailing list, but I will lead you on your way with
> some general advice that can apply to numerous situations:
> You are using user levels, i.e. 8. Please use capabilities, i.e. edit_posts
> or manage_options: http://codex.wordpress.org/Roles_and_Capabilities. User
> levels have been deprecated since the year 2005. Don't use them.
> Turn on WP_DEBUG during development: define('WP_DEBUG', true); in
> In your call to add_submenu_page(), one of the 'Add Firm' strings is the
> page title.
> With regards to headers already being sent, you are hooking in too late to
> perform a redirection -- it must come before any HTTP headers are sent. You
> should consider using a custom post type or the settings API in general
> since most of the work has been done for you, but if you want to build your
> own pages, please look through the Codex, the various tutorials that are out
> there, and the hooks in the code (admin.php, admin-header.php, etc.).
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
See the news as it happens on MSN videos
More information about the wp-hackers