restore_current_blog() vs switch_to_blog()

After every instance of switch_to_blog() you should call restore_current_blog() to restore the current (actually, previous) blog. But if you’re looping through two or more blogs and calling switch_to_blog() on each, is there any reason not to use an additional switch_to_blog() at the end of the loop to switch to the original blog rather than calling … Read more

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress manage adding the capability to all administrators of sub blogs and super administrators in multisite installations, or does that function need to be … Read more

How To Add Custom Form Fields To The User Profile Page?

The user profile page has the following fields: Username First Name Last Name Nickname Display name Contact Info E-mail Website AIM Yahoo IM Jabber / Google Talk How can more fields be added to this section. Field such as Phone number, address, or anything else. 2 You need to use the ‘show_user_profile’, ‘edit_user_profile’, ‘personal_options_update’ and … Read more