GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dmhendricks/wordpress-base-plugin: A starter template for WordPress plugins, with autoloading, namespaces and object caching (where available).

BranchesTags
Open more actions menu

Latest commit

 

History

271 Commits
271 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
assets
assets
 
 
languages
languages
 
 
src
src
 
 
.bowerrc
.bowerrc
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bower.json
bower.json
 
 
composer.json
composer.json
 
 
gulpfile.js
gulpfile.js
 
 
package.json
package.json
 
 
plugin.json
plugin.json
 
 
readme.txt
readme.txt
 
 
wordpress-base-plugin.php
wordpress-base-plugin.php
 
 

Repository files navigation

Author Latest Version GitHub License Flywheel Donate Analytics Twitter

WordPress Base Plugin

  • Documentation
  • Features
  • Requirements
  • Installation
  • Future Goals
  • Change Log

Description

This is a boilerplate WordPress plugin featuring namespace autoloading and Carbon Fields examples. It is intended to be used as a starting point for creating WordPress plugins. It contains several examples and dependencies to get you started.

It may also be used as the means of separating custom code from the theme or extending a child theme.

Contributing

Here are some ways that you can contribute:

  • Suggest improvements and/or code them.
  • Report bugs and/or incompatibilities.
  • Host your sites with Flywheel, use KeyCDN for speedy delivery of assets.

Features

  • Namespaces & dependency autoloading
  • Dependency checking via Requirements
  • Powered by Composer, Gulp and Bower
  • Object caching (where available; usage examples)
  • Easy installable ZIP file generation: npm run zip
  • Automatic translation file (.pot) creation. See Translation.
  • Network Admin (multisite) options, shortcodes, widgets (via Carbon Fields) and custom post types (via PostTypes) examples
  • Configuration registry (docs) and optional wp-config.php constants
  • Customizer examples using WP Customizer Framework
  • Define environmental variables via .env files (reference)
  • More to come...

Requirements

  • WordPress 4.8 or higher
  • PHP 7 or higher
  • Carbon Fields 2.2 or higher. See the wiki section Carbon Fields for more info.
    • Carbon Fields is only required for the demo. You're welcome to strip out references if you do not wish to use it.

Installation

If you need tips on installing Node.js, Composer, Gulp & Bower, see Installing Dependencies.

The short version:

  1. Clone repository to your plugins directory
  2. Change the four variables in package.json. Modify plugin.json as necessary.
  3. Run npm install; gulp rename; composer install
  4. (optional) For some of the included examples to work, you'll also want to run: bower install; gulp;

You'll want to delete features that you don't like (such as references to TGMPA if you don't need it).

Clone Repository

  1. At command prompt, change to your wp-content/plugins directory.
  2. Clone the repository: git clone https://github.com/dmhendricks/wordpress-base-plugin.git
  3. Renamed the newly created wordpress-base-plugin directory to your own plugin slug.

Next Steps

See the Getting Started documentation for further steps.

Future Goals

  • Add plugin uninstall.php
  • Switch to webpack for frontend dependency management
  • Remove or replace wordpress-settings-api-class example with something actively developed
  • Clean up Carbon Fields custom CSS classes
  • Add automatic GitHub update example
  • Add Gutenberg block examples

Screenshot

Settings Page

About

A starter template for WordPress plugins, with autoloading, namespaces and object caching (where available).

Topics

carbon-fieldsmultisitewordpresswordpress-base-pluginwordpress-boilerplatewordpress-networkwordpress-pluginwordpress-plugin-boilerplatewordpress-plugin-development

Resources

Readme
GPL-2.0 license
Activity

Stars

86 stars

Watchers

11 watching

Forks

21 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.