WordPress Must-Use Plugins (Quick Overview)

1,491 views

Published on

A very quick overview of what WordPress Must-Use plugins are.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,491
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • WordPress Must-Use Plugins (Quick Overview)

    1. 1. WORDPRESS MUST-USE PLUGINS by Ronald Huereca Presented at WordCamp Norway January 14th, 2012
    2. 2. WHAT IS A MUST-USE PLUGIN?It’s a plugin that cannot be disabled.
    3. 3. WHY USE MU-PLUGINS?• Forcritical functionality that must not be disabled (Custom Post Types, taxonomies)• For network-wide functionality in Multisite networks that even Network Admins can’t disable• Snippetsof code you can re-use independent of regular plugins and themes
    4. 4. BENEFITS OF MU-PLUGINS• Cannot be disabled. Ever. Nunca. Aldri.• Cannot be edited.• Easy to drop in.
    5. 5. DRAWBACKS OF MU-PLUGINS• Cannot be disabled. Ever.• Thereare no automatic updates, so the code must be maintained by you.• No activation hooks are run.• MU-Pluginsdo not have the regular folder structure as a regular WordPress plugin does.• You can bring an entire network down with one PHP error.
    6. 6. wordpress WHERE TOINSTALL AN wp-contentMU-PLUGIN plugins inside wp-content uploads themes
    7. 7. wordpressIF THE MU-PLUGIN FOLDER wp-contentDOESN’T EXIST,CREATE IT plugins mu-plugins
    8. 8. ADD A .PHP FILE mu-pluginsAND HAVESOME FUN run-me-always.php
    9. 9. INSIDE AN MU-PLUGIN <?php //Uhm, just place some code here. ?>
    10. 10. YOU COULD GO A LITTLE MORE COMPLICATED <?php /* Plugin Name: Metronet Tasks Plugin URI: http://www.metronet.no Description: A task manager for WordPress Author: Metronet Version: 1.0 Requires at least: 3.3 Author URI: http://www.metronet.no */ require_once( metronet_tasks/metronet_tasks.php ); ?>
    11. 11. THE LAST mu-pluginsEXAMPLEASSUMES A run-me-always.phpDIRECTORY metronet_tasksSTRUCTURELIKE THIS: metronet_tasks.php
    12. 12. WHAT I’VE USED MU-PLUGINS FOR• Initializing Custom Post Types and taxonomies• Handling redirects• Removing admin menus• Removing dashboard widgets• Disabling the admin-bar on the front-end for all users
    13. 13. ALL OF THESE PLUGINS CAN BE WRITTEN AS REGULAR PLUGINS...
    14. 14. ...BUT IF THE FUNCTIONALITY IS CRITICAL TO THE PROJECT, DON’T EVEN ALLOW THE OPTION TO DISABLE.
    15. 15. FURTHER READING• http://codex.wordpress.org/Must_Use_Plugins• http://wpmututorials.com/basics/what-is-the-mu-plugins-folder/
    16. 16. Ronald HuerecaTwitter: @ronalfyFacebook: http://www.facebook.com/ronalfySkype: ronalfySlideshare: http://slideshare.net/ronalfyhttp://www.wpajax.com (WordPress and Ajax - free e-book)http://www.ronalfy.com (Personal website - rants and musings )

    ×