pryley /
blackbar
| 1 | <?php |
||
|
1 ignored issue
–
show
|
|||
| 2 | /** |
||
| 3 | * ╔═╗╔═╗╔╦╗╦╔╗╔╦ ╦ ╔═╗╔╗ ╔═╗ |
||
| 4 | * ║ ╦║╣ ║║║║║║║║ ║ ╠═╣╠╩╗╚═╗ |
||
| 5 | * ╚═╝╚═╝╩ ╩╩╝╚╝╩ ╩═╝╩ ╩╚═╝╚═╝ |
||
| 6 | * |
||
| 7 | * Plugin Name: Black Bar |
||
| 8 | * Plugin URI: https://wordpress.org/plugins/blackbar |
||
| 9 | * Description: Black Bar is a Debug Bar for WordPress developers. |
||
| 10 | * Version: 1.1.0 |
||
| 11 | * Author: Paul Ryley |
||
| 12 | * Author URI: https://profiles.wordpress.org/pryley#content-plugins |
||
| 13 | * License: GPL3 |
||
| 14 | * License URI: https://www.gnu.org/licenses/gpl-3.0.html |
||
| 15 | * Text Domain: blackbar |
||
| 16 | * Domain Path: languages |
||
| 17 | */ |
||
| 18 | |||
| 19 | defined( 'WPINC' ) || die; |
||
| 20 | |||
| 21 | if( !class_exists( 'GL_Plugin_Check' )) { |
||
| 22 | require_once __DIR__.'/activate.php'; |
||
| 23 | } |
||
| 24 | require_once __DIR__.'/autoload.php'; |
||
| 25 | |||
| 26 | if( !GL_Plugin_Check::shouldDeactivate( __FILE__, array( 'php' => '5.4', 'wordpress' => '4.0.0' ))) { |
||
| 27 | if( !defined( 'SAVEQUERIES' )) { |
||
| 28 | define( 'SAVEQUERIES', 1 ); |
||
| 29 | } |
||
| 30 | (new GeminiLabs\BlackBar\Application)->init(); |
||
| 31 | } |
||
| 32 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.