Simple WordPress plugin starter framework.

Overview

WordPress Plugin Starter

This is the official WordPress plugin starter framework for Highfivery. The purpose behind it is to improve the quality of the experiences we build as well as to standardize in order to facilitate more effective collaboration.

Support Level MIT License

Contributions

We don't know everything! We welcome pull requests and spirited debates :)

Creating a New Plugin

./setup.sh

Register Plugin Settings

/**
 * Register settings
 *
 * @param array $settings Registered settings.
 */
function register_sections( $settings ) {
  $sections['reference_key'] = array(
    'option_group' => 'option_group_name',
    'option_name'  => 'db_key',
  );

  return $settings;
}

add_filter( 'FUNCTION_PREFIX_settings', 'register_sections', 10, 1 );

Adding a Setting Sections

/**
 * Register sections
 *
 * @param array $sections Registered sections.
 */
function register_sections( $sections ) {
  $sections['new_section'] = array(
    'title' => __( 'Section Name', 'PLUGIN_TEXT_DOMAIN' ),
    'page'  => 'page_slug',
  );

  return $sections;
}

add_filter( 'FUNCTION_PREFIX_setting_sections', 'register_sections', 10, 1 );

Adding a Setting Field

function register_setting_fields( $settings_fields ) {
  $settings_fields['setting_key'] = array(
    'title'       => __( 'Setting Title', 'PLUGIN_TEXT_DOMAIN' ),
    'desc'        => sprintf(
      wp_kses(
        __( 'Setting description', 'PLUGIN_TEXT_DOMAIN' ),
        array()
      )
    ),
    'page'        => 'page_slude',
    'section'     => 'new_section',
    'option_name' => 'db_key',
    'type'        => 'text', // text, url, number, textarea.
    'field_class' => 'large-text', // large-text, medium-text, small-text, regular-text, code.
    'placeholder' => __( 'Placeholder text', 'PLUGIN_TEXT_DOMAIN' ),
    'value'       => ! empty( $options['setting_key'] ) ? $options['setting_key'] : false,
  );

  return $settings_fields;
}

add_filter( 'FUNCTION_PREFIX_settings_fields', 'register_setting_fields', 10, 1 );

Support Level

Active: Highfivery is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent WordPress versions. Bug reports, feature requests, questions, and pull requests are welcome.

You might also like...
Beauty and simple Wordpress video player plugin. Powerfull and lite in use.
Beauty and simple Wordpress video player plugin. Powerfull and lite in use.

Sonic Spectre Video Player Beauty and simple Wordpress video player plugin. Powerfull and lite in use. Quick Start: Download plugin from this repo and

A simple platform information plugin for WordPress. Shows you environment variables, PHP settings and more.

A simple platform information plugin for WordPress. Shows you environment variables, PHP settings and more.

A simple scaffold used for what's needed to spin up a Composer-based WordPress plugin.

A simple scaffold used for what's needed to spin up a Composer-based WordPress plugin.

Divi Migration Tools - A simple plugin to assist in the conversion of Divi to WordPress.

Divi Migration Tools Different criteria to migrate the Divi shortcodes. Migrate the following Divi shortcodes to Gutenberg blocks 🙌 [et_pb_video] It

A simple framework for running WordPress unit and integration tests.

Touchstone A modern wrapper around the official WordPress testsuite. It can be used to run both Unit and Integration tests. Installation Run the follo

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.

Twenty Twenty-Two Welcome to the development repository for the default theme that will launch with WordPress 5.9. About Twenty Twenty-Two is designed

Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer.

Description Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer. Support [audio] tag, compatible with AMP. Requirement WordPr

A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API

Wordpress XML-RPC PHP Client A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API Created by Hieu Le MIT licensed. Cur

Owner
Highfivery LLC
We help brands create digital solutions to make them more engaging and profitable.
Highfivery LLC
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.

Suspend WP A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings. ?? Demo (coming so

Waren Gonzaga 3 Nov 15, 2021
Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library.

Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library. Import Jamendo playlists with tracks in WordPress posts.

Pierre Saikali 3 Dec 7, 2022
Automattic 10.7k Jan 2, 2023
The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone.

Pronamic WordPress Basecone The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone. Table of contents Au

Pronamic 1 Oct 19, 2021
WordPress plugin that lets you use Discourse as the community engine for a WordPress blog

WP Discourse Note: the wp-discourse plugin requires >= PHP-5.4.0. The WP Discourse plugin acts as an interface between your WordPress site and your Di

Discourse 497 Dec 10, 2022
A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities.

Awesome WordPress A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities. Inspired by bayand

Dropndot Limited 91 Dec 26, 2022
This WordPress Plugin Boilerplate is meant for you to develop your own plugin on.

WordPress Plugin Boilerplate This plugin boilerplate is meant for you to develop your own plugin on. Support & collaboration Features OOP plugin core

richardev 2 May 10, 2022
Simple Wordpress plugin that adds social share buttons

Super Fast Social Share Simple Wordpress plugin that adds social share buttons to Wordpress posts. ?? Screenshots You can either load the default css

Matthew Kiggen 2 Nov 8, 2021
Simple WordPress plugin demonstrating how one can sort posts within a taxonomy.

Simple WordPress plugin to demonstrate how to sort posts in a taxonomy. How to test Download the project and install it as a plugin in your WordPress

David Aguilera 3 Aug 16, 2022
Surge is a very simple and fast page caching plugin for WordPress.

=== Surge === Contributors: kovshenin Donate link: https://github.com/kovshenin/surge Tags: cache, performance, caching Requires at least: 5.7 Tested

Konstantin Kovshenin 122 Oct 24, 2022