My Plugin Manager is a drop-in script for your WordPress theme or plugin, which gives your users an interface to manage plugins you suggest be used with your product.
Please do not copy the files from this repository directly into your WordPress project. Make sure to use one of the methods below to generate the script for your specific project.
Our goal is to provide you with a drop-in script that complies as closely to WordPress coding standards and best practices, as possible. So by generating a custom build for your project, the following will happen:
- Prefix all PHP class names to match your theme or plugin name.
- Name all class files to correctly correspond to the name of those PHP classes.
- Insert your unique namespacing key for anything submitted to the database.
- Insert the localization text domain that matches your theme or plugin.
- If the "plugin" usage type is selected,
add_theme_page()
will be substituted foradd_submenu_page()
(not allowed in themes). - Give you an example code snippet to get started, which is customized to your project.
The easiest way to incorporate your new plugin manager into your WordPress theme or plugin is to generate a custom instance for your project at:
http://mypluginmanager.com#download
After you've submitted the form, your plugin manager download will start and you'll be shown instructions specific to your project to get started.
Note: Curious how mypluginmanager.com is built? It's an open source PHP web app. Check it out here.
For using this repository to generate a custom build, you'll need to have NodeJS and NPM installed on your computer.
- Clone this repository to your local computer.
- Edit the variables in
build-config.js
to match your project. - Within the cloned repo, run
npm install
to install all of dependencies from your terminal. - Then run
npm run build
to generate a custom build specific to your project, using data from thebuild-config.js
you edited. - Within the
/dist
directory, find theplugin-manager
directory that was generated and copy it to the root of your WordPress theme or plugin. - Also within the
/dist
directory you'll see anexample.php
file. You can copy the contents of this file into your theme or plugin's PHP code as a starting point to implement the script.
Code and documentation copyright 2011-2017 Jason Bobich and Theme Blvd. Code released under the GPLv2 or later license.