.gitignore file for WordPress development

Posted on 09/09/2019

For some reason there is no standardized WordPress .gitignore file that can be kept in the project root. After going back to my own boilerplates for 100th time, I figured I might as well post that here and on Github.

The code is below and Github repo is github.com/aramboyajyan/wordpress-gitignore. Rules work on the principle that they first exclude all plugins and themes, and then declare the directories with custom code that you want to keep under version control.

Custom permissions in Drupal 8

Posted on 17/09/2016

Drupal's permissions system is at the same time easy to use and very powerful. It covers most of the cases where your module provides different functionality for various roles on the site.

In both versions of Drupal this is fairly straightforward to implement through code. There are two parts to this article: defining custom permissions (both static and dynamic), and performing checks to see if the current user has access to them.