Download the PHP package greenpeace/planet4-plugin-gutenberg-engagingnetworks without Composer

On this page you can find all versions of the php package greenpeace/planet4-plugin-gutenberg-engagingnetworks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package planet4-plugin-gutenberg-engagingnetworks

Greenpeace Planet4 Gutenberg Blocks Plugin

Contents

Introduction

This WordPress plugin provides the necessary blocks to be used with Shortcake UI plugin.

Overide default twig templates of blocks

You can overide the default block twig templates by including in your child theme a file with the same name in the subdirectory /templates/plugins/planet4-plugin-gutenberg-blocks/includes/

How to develop a new block you ask?

  1. Create a new controller class that extends Controller inside directory classes/controller/blocks. The class name should follow naming convention, for example Blockname_Controller and its file name should be class-blockname-controller.php.

  2. Implement its parent's class two abstract methods. In method prepare_fields() you need to define the blocks fields and in method prepare_data() you need to prepare the data which will be used for rendering.

  3. Create the template file that will be used to render your block inside directory includes/blocks. If the name of the file is blockname.twig then you need to set the BLOCK_NAME constant as 'blockname' It also works with html templates. Just add 'php' as the 3rd argument of the block() method.

  4. Add your new class name to the array that the Loader function takes as an argument in the plugin's main file.

  5. Finally, before committing do composer update --no-dev and composer dump-autoload --optimize in order to add your new class to composer's autoload.

Task automation

We use gulp as automation tools for local development.

Available tasks

Composer

We use composer as dependency manager for the this plugin. To install dependencies run

$ composer install

Code standards

We follow the WordPress Coding Standards

We use a custom php codesniffer ruleset which adds some rules over WordPress-Core, WordPress-Docs and WordPress-Extra rulesets.

WordPress Coding Standards Rulesets

WordPress Coding Standards Wiki

To run the php codesniffer

$ vendor/bin/phpcs or $ composer sniffs

To run the php code beautifier and fixer

$ vendor/bin/phpcbf or $ composer fixes

Contribute

Please read the Contribution Guidelines for Planet4.


All versions of planet4-plugin-gutenberg-engagingnetworks with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package greenpeace/planet4-plugin-gutenberg-engagingnetworks contains the following files

Loading the files please wait ....