(Hard) Fork of WordPress Plugin Boilerplate, actively taking PRs and actively maintained. Following WordPress Coding Standards. With more features than the original.

Overview

GitHub contributors GitHub commit activity GitHub last commit GitHub closed pull requests

Better WordPress Plugin Boilerplate

This is a Hard Fork of the original WordPress Plugin Boilerplate. The Better WordPress Plugin Boilerplate actively takes PRs and is maintained and under active development, as well has more features than the original. The goal is still a standardized, organized, object-oriented foundation for building high-quality WordPress Plugins, however actively accepting cooperations, and also considering ClassicPress Compatibility.

In the case ClassicPress and WordPress diverge too much in future we will consider creating a new, standalone repo just for ClassicPress. However as it stands of today, 2021-07-9 (9th July 2021) the Codebase of both CMS are still compliant.

A Generator Plugin to generate new Plugins by filling out a form is available here and acts like a WordPress Plugin. It can be used to generate a Plugin based on any boilerplate source really, but uses by default the Better WordPress Plugin Boilerplate.

The generator form will soon be online on a standalone website as well.

Features

  • The Boilerplate is based on the Plugin API, Coding Standards, and Documentation Standards.
  • The plugin is 100% WPCS (WordPress Code Sniffer) Compliant.
  • All classes, functions, and variables are documented so that you know what you need to change.
  • The Boilerplate uses a strict file organization scheme that corresponds both to the WordPress Plugin Repository structure, and that makes it easy to organize the files that compose the plugin.
  • The project includes a .pot file as a starting point for internationalization.

How to Create a Plugin

The Better WordPress Plugin Boilerplate (everything inside and inclusive the folder plugin-name of this repo) can be installed directly into your plugins folder "as-is".

You will want to rename it and the classes and methods inside of it to fit your needs. Some comments inside the Boilerplate may need to be rewritten as well, and adapted to your code/use case.

For example, if your plugin is named 'example-me' then:

  • rename files from plugin-name to example-me
  • change plugin_name to example_me
  • change plugin-name to example-me
  • change Plugin_Name to Example_Me
  • change PLUGIN_NAME_ to EXAMPLE_ME_

It's safe to activate the plugin at this point. Because the Boilerplate has no real functionality there will be no menu items, meta boxes, or custom post types added until you write the code, of course.

For simplicity, you can just use the TukuToi Boilerplate Generator Plugin, or the Webform (coming soon), to generate a starter plate using your file-, class-, method- names (and prefixes, authorname, etc etc).

Submit a Plugin to WordPress.org

[Comin soon] instructions and example folder boilerplate to use when submitting a plugin to WordPress.

What About Contributing?

Submit your idea to the Discussions for the community to approve. Each Idea needs at least 2 distinct thumbs up (additional to the OP) to be considered for implemenation.

Additionally to the Discussions Post, if you have working code to implement your Idea, please add a PR to the develop branch. PR'd ideas still need at least 2 additional thumbs up in the Discussion post to be merged.

Note that in special cases (security, quality, yada yada) we may or may not merge the code and may or may not add or remove features discussed at our own will, independent from the amoung of thumbsup.

The Better WordPress Plugin Boilerplate follows PHP, WP Coding standards and has the Git Actions for it incorporated. We also follow Keep A Changelog for changelogs and SemVer for Versioning.

Documentation, FAQs, and More

If you’re interested in writing any documentation or creating tutorials please let's discuss in the Discussions section of this Repo.

Credits

The WordPress Plugin Boilerplate was started in 2011 by Tom McFarlin and has since included a number of great contributions. In March of 2015 the project was handed over by Tom to Devin Vinson.

The version of which the the Better WordPress Plugin Boilerplate hard-fork was taken was developed in conjunction with Josh Eaton, Ulrich Pogson, and Brad Vincent.

From 2021-07-5 (July 05th 2021) onwards , the Better WordPress Plugin Boilerplate is maintained by TukuToi and the active community. We hard-forked the project (which means GitHub has detached the fork and made it a standalone project) because the current development on the existing Boilerplate Repo is stalling since several years, and things started to get oudated (and that won't get any better with time to go by).

We saw an opportunity here to continue a great project and develop it further, also with great ideas of the community itself.

Comments
  • 4.0.0

    4.0.0

    2022-02-19

    Changed

    • Removed uninstall hook with class again in favour of uninstall.php file. Peformance issues with uninstall hook never resolved in Core are the reason.
    • Updated Header tags to be more dynamic for Generate Plugin features, does not affect functionality.
    • Updated prefixes of global functions for better replacement with Generate Plugin Features. Does not affect functionality.

    Fixed

    • Issue where activation and deactivation could have thrown notices due to undefined indexes.

    2022-02-20

    • Add pfx_ in readme
    opened by smileBeda 2
  • 2021-09-15

    2021-09-15

    2021-09-15

    Changed

    • Removed uninstall.php file and added uninstall hook with class instead. Allows for dynamic plugin name retrieval during unistall
    • Added SonarCloud Scanning for code quality
    opened by smileBeda 1
  • 09-08-2021

    09-08-2021

    2021-08-09

    Fixed

    • Fixed problem where plugin couldn't be activated in bulk
    • Fixed problem where plugin couldn't be deactivated in bulk

    Added

    • Proper PHP Headings (Requires at least: and Tested up to:)
    opened by smileBeda 0
  • Introduce autoloader

    Introduce autoloader

    This is an inspirational PR related to #25

    I work in complete and comfy PHP environment. Currently I'm missing essentials.

    • namespaces (available in ancient PHP 5)
    • static analysis

    Source: https://github.com/szepeviktor/debian-server-tools/blob/master/webserver/wp-install/wordpress-autoloader.php

    opened by szepeviktor 4
  • Implement an autoloader.

    Implement an autoloader.

    I've done this in the boilerplate-based plugin https://github.com/TukuToi/tukutoi-cp-directory-integration/blob/f91ec328109c6f4b6948cd9414b4567fc77deed1/includes/class-cp-plgn-drctry-loader.php#L191

    Should become standard.

    enhancement help wanted good first issue 
    opened by smileBeda 2
  • Add a license with GitHub

    Add a license with GitHub

    With it, also update readme.

    It is time to move forwards and while keep mentioning the cheers and credits, this is not anymore the same (unmaintained) plugin it was once forked from, and can have a nice, standalone and self-oriented intro.

    documentation enhancement 
    opened by smileBeda 0
  • Add Translation instructions (and if any needed, translation POT)

    Add Translation instructions (and if any needed, translation POT)

    It is easy enough to run [wp i18n make-pot <target-dir>](https://developer.wordpress.org/cli/commands/i18n/make-pot/) in terminal to generate the POT of a plugin, but not many know it.

    We should add at least a description to the readme about this (it can also be done with GNU's native gettext utility xgettext --add-comments *.php, but that isn't as nice for Plugins as the WP CLI command is)

    More complicated setups can be seen here for example, however that is really not needed given WP CLI exists.

    opened by smileBeda 0
Releases(4.0.0)
  • 4.0.0(Feb 20, 2022)

    2022-02-19

    Changed

    • Removed uninstall hook with class again in favour of uninstall.php file. Peformance issues with uninstall hook never resolved in Core are the reason.
    • Updated Header tags to be more dynamic for Generate Plugin features, does not affect functionality.
    • Updated prefixes of global functions for better replacement with Generate Plugin Features. Does not affect functionality.

    Fixed

    • Issue where activation and deactivation could have thrown notices due to undefined indexes.

    2022-02-20

    • Add pfx_ in readme
    Source code(tar.gz)
    Source code(zip)
    plugin-name.zip(33.52 KB)
Owner
Beda Schmid
WordPress Nerd, World Citizen and definitely Human.
Beda Schmid
Fork is an easy to use open source CMS using Symfony Components.

Installation Make sure you have composer installed. Run composer create-project forkcms/forkcms . in your document root. Browse to your website Follow

Fork CMS 1.1k Dec 8, 2022
Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required.

Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required. Simply activate Subtitles and you're ready to go.

We Cobble 117 Dec 31, 2022
Standards either proposed or approved by the Framework Interop Group

PHP Framework Interoperability Group The idea behind the group is for project representatives to talk about the commonalities between our projects and

PHP-FIG 12.4k Jan 8, 2023
A minimal boilerplate theme for WordPress using TailwindCSS, with PostCSS and Laravel Mix.

A minimal boilerplate theme for WordPress using TailwindCSS, with PostCSS and Laravel Mix.

Pixel Devs 74 Nov 25, 2022
Boilerplate used to build nearly-headless WordPress themes

Boilerplate for Nearly Headless WordPress Themes This is a plugin boilerplate built using Underpin ,Nicholas, and AlpineJS. It will allow you to build

Nicholas 103 Dec 22, 2022
Modern CMS with shop features based on fullstack symfony and sylius components

The enhavo CMS is a open source PHP project on top of the fullstack Symfony framework and uses awesome Sylius components to serve a very flexible soft

enhavo 80 Dec 14, 2022
Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.

Grafite CMS Grafite has archived this project and no longer supports or develops this code. We recommend using only as a source of ideas for your own

Grafite Inc 494 Nov 25, 2022
BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website for more information.

BaiCloud-cms About BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the

null 5 Aug 15, 2022
YesWiki is a wiki system written in PHP, including extensions making collaboration more simple (databases, maps, easy editing, bootstrap themes,...).

YesWiki YesWiki is a Free Software under the AGPL licence, made for creating and managing your website, in a collaborative way. YesWiki allows any web

YesWiki 84 Dec 26, 2022
Wordpress plugin to allow websites to sell and distribute NFTs through the Enjin platform

MyMeta Basket is the world's first plug-and-play Wordpress/Enjin/Ethereum integration that allows you to start selling blockchain assets through your website within minutes. All you need is Wordpress, MyMeta Basket, and an Enjin subscription.

MyMetaverse 6 Oct 3, 2022
An example starter theme and block-type plugin that use @wordpress/scripts for JS & CSS

Brad’s Boilerplate This repo contains one folder that is an example theme, and another folder that is an example block-type plugin. Both folders use t

Brad Schiff 185 Dec 26, 2022
Botble plugin comment is a comment plugin for Botble CMS

Botble plugin comment This is a plugin for Botble CMS so you have to purchase Botble CMS first to use this plugin.

Bảo Bối 27 Nov 25, 2021
Zero-Config plugin to disable FLoC in your WordPress Website.

Disable FLoC by WP Munich A simple zero-config plugin to opt-out of Google FLoC. This plugin is made with love and brought to you by the folks of WP M

Luehrsen // Heinrich 9 Jun 1, 2022
Sensei LMS WordPress Plugin

Sensei LMS A learning management plugin for WordPress, which provides the smoothest platform for helping you teach anything. Sensei LMS is a commercia

Automattic 449 Jan 4, 2023
🎨️ A WordPress plugin to disable admin color schemes

Colors A WordPress plugin to disable admin color schemes. Description Disable the admin color schemes for all users. Availiable filters colors_should_

Brad Parbs 4 Oct 6, 2021
Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.

Jetpack Monorepo This is the Jetpack Monorepo. It contains source code for the Jetpack plugin, the Jetpack composer packages, and other things. How to

Automattic 1.4k Jan 7, 2023
A Simple and Lightweight WordPress Option Framework for Themes and Plugins

A Simple and Lightweight WordPress Option Framework for Themes and Plugins. Built in Object Oriented Programming paradigm with high number of custom fields and tons of options. Allows you to bring custom admin, metabox, taxonomy and customize settings to all of your pages, posts and categories. It's highly modern and advanced framework.

Codestar 241 Dec 23, 2022
Plugin Vite is the conduit between Craft CMS plugins and Vite, with manifest.json & HMR support

Plugin Vite Related Articles: Vite.js Next Generation Frontend Tooling + Craft CMS A Vite Buildchain for Craft CMS Plugins Requirements Craft CMS 3.0.

nystudio107 8 Dec 30, 2022
Plugin for Craft CMS that makes it easy to interact with the Instagram Basic Display API and Instagram oEmbed.

Instagram Basic Display plugin for Craft CMS 3.x This plugin creates endpoints in your Craft install for you to consume the Instagram Basic Display AP

Jonathan Melville 5 Dec 20, 2022