Writing Plugins for WordPress MU
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Writing Plugins for WordPress MU

on

  • 4,174 views

Slides for my writing plugins presentation at WordCamp NYC 2009.

Slides for my writing plugins presentation at WordCamp NYC 2009.

Statistics

Views

Total Views
4,174
Views on SlideShare
4,137
Embed Views
37

Actions

Likes
6
Downloads
37
Comments
0

5 Embeds 37

http://wpmututorials.com 19
http://www.slideshare.net 11
http://blogs.grandlyon.com.gdlyon-preprod-cat1.accelance.net 3
http://wp-mu.com 2
http://dev.wpmued.org 2

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Writing Plugins for WordPress MU Presentation Transcript

  • 1. WordCamp NYC 2009 Writing Plugins for WordPress MU by Ron Rennick
  • 2. Where to find me
    • http://wpmututorials.com
    • http://ronandandrea.com /contact/
    • http://freebpthemes.com
    • http://musupport.net
    • @wpmuguru
    • http://profiles.wordpress.org/wpmuguru
  • 3. Overview
    • A little out of order -
    • Background
    • Traps
    • Tips
    • Tricks
    • Discussion
  • 4. Background
    • Freelancing 16 years
    • Teaching
    • WordPress
  • 5. Traps
    • Template tags <?php my_plugin_output(); ?>
  • 6. Traps
    • Template tags <?php my_plugin_output(); ?>
    • $_SERVER['PHP_SELF']
  • 7. Traps
    • Template tags <?php my_plugin_output(); ?>
    • $_SERVER['PHP_SELF']
    • wp-content/uploads
  • 8. Traps
    • Template tags <?php my_plugin_output(); ?>
    • $_SERVER['PHP_SELF']
    • wp-content/uploads
    • plugin tables
  • 9. Tips
    • Am I WordPress MU ?
      • global $wpmu_version;
      • if( isset( $wpmu_version ) ) {
        • // do MU specific code
      • } else {
        • // do standard WP code
      • }
  • 10. Tips
    • Globals/Constants
    • $current_blog
    • $current_site
  • 11. Tips
    • Globals/Constants
    • $current_blog
    • $current_site
    • VHOST
    • $bp
  • 12. Tips
    • Functions
    • get_site_option($key, $default)
    • update_site_option($key, $value)
    • is_site_admin()
  • 13. Tips
    • Functions
    • get_site_option($key, $default)
    • update_site_option($key, $value)
    • is_site_admin()
    • switch_to_blog($id)/restore_current_blog()
    • $wpdb->get_blog_prefix($id)
  • 14. Tips
    • Constants
    • WPMU_PLUGIN_DIR
    • WPMU_PLUGIN_URL
    • BLOGUPLOADDIR
  • 15. Tips
    • Global tables
    • $wpdb->site
    • $wpdb->blogs
    • $wpdb->sitemeta
    • $wpdb->sitecategories
  • 16. Tricks
    • Filters
    • 'pre_site_option_' . $key
    • 'site_option_' . $key
    • 'pre_update_site_option_' . $key
    • 'pre_add_site_option_' . $key
  • 17. Tricks
    • Hooks
    • muplugins_loaded
    • delete_blog
    • wpmu_new_user
    • wpmu_new_blog
  • 18. Tricks
    • Functions
    • get_site_option($key, $default)
    • update_site_option($key, $value)
  • 19. Tricks
    • Functions
    • get_site_option($key, $default)
    • update_site_option($key, $value)
    • Tables
    • make it global
    • add blog_id field to table
  • 20. Remember Code is poetry