Title: First plugin
Last modified: August 20, 2016

---

# First plugin

 *  [SFMichael](https://wordpress.org/support/users/sfmichael/)
 * (@sfmichael)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/first-plugin/)
 * Hello,
 * currently developing my first plugin.. pretty much done.
 * However i would like to include wordpress functions within my plugins do i simply
   include wp-load.php are is there a better option?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [halferdev](https://wordpress.org/support/users/halferdev/)
 * (@halferdev)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/first-plugin/#post-3274259)
 * Your plugin should be called only after that file is included, so you should 
   be able to use WP functions without including anything else. What function specifically
   do you want to use?
 *  Thread Starter [SFMichael](https://wordpress.org/support/users/sfmichael/)
 * (@sfmichael)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/first-plugin/#post-3274275)
 * trying to use get_blog_list and the likes of is_main_site
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/first-plugin/#post-3274289)
 * You really should find a different way than use get_blog_list(). It is depreciated
   and could disappear from an upgrade at any time. As halferdev said, you should
   be able to call is_main_site() or any other WP function without including anything
   because your plugin code is typically hooked into a filter or action. Thus the
   WP environment is already loaded for the filter or action to fire. Since your
   code is called from WP, you have access to the functions, objects, etc.
 * The one reason to include wp-load.php is if you have a separate file that is 
   requested via a browser link that needs to interface with WP. Since this starts
   a new process, you would initiate the WP environment by including wp-load.php.
 *  Thread Starter [SFMichael](https://wordpress.org/support/users/sfmichael/)
 * (@sfmichael)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/first-plugin/#post-3274303)
 * Ok thanks for the replies and advice. I’ll have another look into it.
 * I wasn’t aware get_blog_list has been depreciated.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘First plugin’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 3 participants
 * Last reply from: [SFMichael](https://wordpress.org/support/users/sfmichael/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/first-plugin/#post-3274303)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
