Skip to content
Tonya Mork edited this page Nov 16, 2017 · 11 revisions

Beans 1.x is based upon PHP 5.2.

We are working to upgrade the codebase to be WordPress Coding Standard (WPCS) compliant. We follow the [WordPress Handbook](https://make.wordpress.org/core/handbook/best-practices/coding-standards/], except for noted below.

Naming Conventions

Files

Classes

Functions and Methods

Follow WordPress' naming standards, meaning:

  1. lowercase letters
  2. underscores render_view() and run()

The exposed functions, i.e. those the child theme and plugins will use, will be prefixed and not namespaced. Naming follows this convention:

beans_verb_description()

Functions do work, such as render, run, check, do, process, etc. Work means they are action-based, i.e. verbs.

The description tells you what the expected behavior is when you call this function. It's clear and expressive. Remember the intent: tells you the expected behavior.

The benefit to that naming convention is: you can read the function's name and know what will happen when you call it.

File DocBlock Header

... coming

Function and Method DocBlock

..... more to come.....

Clone this wiki locally