Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Object Oriented Plugin Template Solution

A well engineered template for creating plugins using object-oriented programming practices. Uses Settings API, multisite, i18n, PHPUnit tests.

  1. Download the zip file from WordPress' plugin site: http://wordpress.org/extend/plugins/oop-plugin-template-solution/

  2. Unzip the file

  3. Here are some semi-automated steps to copy this plugin and rename the files, class names, and identifiers. The commands are in Bash, adjust them as needed for your environment. Replace the three mentions of "My Plugin" in the settings section with the name of your plugin.

    # Settings -----
    # Plugin identifier / directory (hyphen separated).
    # Class name (underscore separated).
    # Plugin Name (space separated).
    old_name="Object Oriented Plugin Template Solution"
    new_name="My Plugin"
    # --------------
    # Copy and rename the files.
    cp -R $old_id $new_id
    cd $new_id
    mv $old_id.php $new_id.php
    # Replace strings in the files.
    find . -type f -exec sed "s/$old_id/$new_id/g" -i {} \;
    find . -type f -exec sed "s/$old_class/$new_class/g" -i {} \;
    find . -type f -exec sed "s/$old_name/$new_name/g" -i {} \;
    find . -type f -exec sed -E "s/^ \* (Author:|Author URI:|@author|@copyright) (.*)$/ * \1/g" -i {} \;
    find . -type f -exec sed "s@REPLACE_PLUGIN_URI@http://wordpress.org/extend/plugins/oop-plugin-template-solution/@g" -i {} \;
    sed -E "s/^(Contributors|Donate link|Tags): (.*)$/\1:/g" -i readme.txt
  4. Now get down to making the plugin do what you want. See the FAQ for instructions about particular aspects.

  5. Upload your plugin directory to your server's /wp-content/plugins/ directory

  6. Activate the plugin using WordPress' admin interface:

    • Regular sites: Plugins
    • Sites using multisite networks: My Sites | Network Admin | Plugins


  1. This plugin offers the ability to remove all of this plugin's settings from your database. Go to WordPress' "Plugins" admin interface and click the "Settings" link for this plugin. In the "Deactivate" entry, click the "Yes, delete the damn data" button and save the form.

  2. Use WordPress' "Plugins" admin interface to click the "Deactivate" link

  3. Remove the plugins directory from the server

Requires: 3.3 or higher
Compatible up to: 4.4.6
Last Updated: 5 months ago
Active Installs: Less than 10


5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1 100,1,1