1 | <?php |
||
19 | class GravityView_Theme_Hooks_Church_Themes extends GravityView_Plugin_and_Theme_Hooks { |
||
20 | |||
21 | /** |
||
22 | * Church Themes framework version number |
||
23 | * |
||
24 | * @inheritDoc |
||
25 | * @since 1.17 |
||
26 | */ |
||
27 | protected $constant_name = 'CTFW_VERSION'; |
||
28 | |||
29 | /** |
||
30 | * Add filters |
||
31 | * |
||
32 | * @since 1.17 |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | protected function add_hooks() { |
||
41 | |||
42 | /** |
||
43 | * Tell Church Themes that GravityView has content if the current page is a GV post type or has shortcode |
||
44 | * |
||
45 | * @since 1.17 |
||
46 | * |
||
47 | * @param bool $has_content Does the post have content? |
||
48 | * |
||
49 | * @return bool True: It is GV post type, or has shortcode, or $has_content was true. |
||
50 | */ |
||
51 | public function if_gravityview_return_true( $has_content = false ) { |
||
61 | } |
||
62 | |||
63 | new GravityView_Theme_Hooks_Church_Themes; |
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.