GithubHelp home page GithubHelp logo

isabella232 / edd-extension-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awesomemotive/edd-extension-boilerplate

0.0 0.0 0.0 277 KB

A foundation for EDD extension development that aims to provide a standardized guide for building extensions.

PHP 100.00%

edd-extension-boilerplate's Introduction

EDD Extension Boilerplate

The EDD Extension Boilerplate serves as a foundation and aims to provide a standardized guide for building extensions. Just download, tweak a few things, and you'll be able to get to the real code in no time!

Features

  • The Plugin Boilerplate is fully-based on the WordPress Plugin API.
  • Uses PHPDoc conventions to document the code.
  • Example values are given, so you can see what needs to be changed.
  • Uses a strict file organization scheme to make sure the assets are easily maintainable.

Contents

The EDD Extension Boilerplate includes the following files:

  • This README, a CHANGELOG, and a gitignore file.
  • A subdirectory called plugin-name that represents the core plugin file.

Installation

  1. Copy the plugin-name directory into your wp-content/plugins directory
  2. Navigate to the Plugins dashboard page
  3. Locate the menu item that reads TODO
  4. Click on Activate

This will activate the EDD Extension Boilerplate. Because the Boilerplate has no real functionality, nothing will be added to WordPress; however, this demonstrates exactly how your plugin should behave while you're working with the Boilerplate.

Configuration

  • Replace all instances of plugin-name with the name of your plugin. By WordPress coding standards, the folder name, plugin file name, and text domain should all match. For the purposes of standardization, the folder name, plugin file name, and text domain are all the lowercase form of the actual plugin name, replacing spaces with hyphens.
  • Replace all instances of Plugin_Name with the name of your plugin. For the purposes of standardization, the camel case form of the plugin name, replacing spaces with underscores, is used to define classes in your extension.
  • Replace all instances of PLUGINNAME with the name of your plugin. For the purposes of standardization, the uppercase form of the plugin name, removing spaces, is used to define plugin constants.
  • Replace all instances of Plugin Name with the actual name of your plugin. This really doesn't need to be anywhere other than in the EDD Licensing call in the hooks method.
  • Find all instances of @todo in the plugin and update the relevant areas as necessary.
  • All functions that are not class methods MUST be prefixed with the plugin name, replacing spaces with underscores. NOT PREFIXING YOUR FUNCTIONS CAN CAUSE PLUGIN CONFLICTS!

File Structure

  • The plugin-name.php file should only be used for core functionality necessary to bootstrap the plugin itself.
  • All other code should be in includes or a folder therein.
  • The libraries folder is provided for reference. If your plugin requires and external libraries, put them here. Otherwise, remove the folder.
  • The admin folder is provided for reference. Any code that is explicit to the dashboard belongs here.
  • The assets folder contains subfolders for css, img, and js files. Common sense applies.

License

The EDD Extension Boilerplate is licensed under the GPL v2 or later.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

edd-extension-boilerplate's People

Contributors

pippinsplugins avatar davekiss avatar nikv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.