SunnyJohal / easy-custom-sidebars

Replace any sidebar/widget area in any WordPress theme (no coding required).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Easy Custom Sidebars

Welcome to the Easy Custom Sidebars development repository.

What is Easy Custom Sidebars?

Easy Custom Sidebars is a WordPress Plugin. It's a simple and easy way to replace any sidebar/widget area in your WordPress theme without coding. This plugin integrates with the WordPress Customizer, so you can preview your custom widget areas on your site in realtime. It’s compatible with any theme and you can even replace more than one widget area on the same page!

Looking to install this plugin on your site?

DO NOT USE IN PRODUCTION

This repository is for development of a complete rewrite of this plugin. If you are looking to install and use this plugin on your WordPress website then please visit the official Plugin Download Page, where the latest stable version is available to download.

Getting Up and Running

Prerequisites

We've made it easy to setup local development with a simple command. We assume that you have already downloaded and installed Docker and Yarn package manager, if you don't have it already. After that, there are a few commands to run:

Setup

We've made it easy to setup local development with a simple command to run once you have cloned the repo:

$ yarn setup

NOTE: Please be patient this command can take some time to execute.

This command will:

  • Install all node and composer dependancies.
  • Run the wp-env plugin to spin up the relevant docker containers for local development.

Once complete you should be able to visit http://localhost:3000/ in your browser to see the local test site.

Development

$ yarn start

This command will:

  • Clean the src/dist directory if it exists.
  • Rebuild the js files and put them in the src/dist directory.
  • Watch the project files and rebuild the compiled code in src/dist.

Testing

PHPUnit Testing

All tests are located in the phpunit/tests directory in the project. Any new tests need to be in this directory in order to run properly. phpUnit will automatically run any tests for php files when the filename has the following structure: test-{NAME}.php

To run the phpUnit tests run the command:

$ yarn test-unit-php

This command will:

  • Spin up a temporary container to execute the phpUnit tests.
  • Run all unit tests.
  • Show the test results.
  • Shutdown the temporary container.

NOTE: We plan to add phpunit-watcher to the container in the future to be able to start phpUnit in watch mode.

Jest Unit Testing

To run the unit tests for js files run the command:

$ yarn test

This command will:

  • Start up jest and run any tests in the test directory.
  • Watch the project files and re-run the tests when they change (or new tests are added).

About

Replace any sidebar/widget area in any WordPress theme (no coding required).


Languages

Language:PHP 48.5%Language:JavaScript 46.0%Language:CSS 5.6%