Skip to content
scribu edited this page Feb 10, 2012 · 31 revisions

scbFramework is a collection of classes that speed up WordPress development.

To get a quick start on using the framework, see the example plugin on WordPress.org.

The framework contains the following classes:

There are two "official" ways to load the scbFramework files:

Loading from a plugin

<?php
// Plugin Name: My plugin

require dirname( __FILE__ ) . '/scb/load.php';

# $option = new scbOption( 'my_plugin' );  // Error: scbOption class does not exist

function my_plugin_init() {
  $option = new scbOption( 'my_plugin' );  // OK

  ...
}

scb_init( 'my_plugin_init' );

Loading from a "must-use" plugin

This method is recommended when you plan to use scbFramework on a site that you control. It will be loaded before any other plugin.

  1. Create a scb directory inside wp-content/mu-plugins.
  2. Copy all the files into wp-content/mu-plugins/scb.
  3. Copy the scb-load.php file into wp-content/mu-plugins/.
Clone this wiki locally