1
|
|
|
<?php |
|
|
|
|
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* FooGallery PRO includes |
5
|
|
|
*/ |
6
|
|
|
require_once( FOOGALLERY_PATH . 'pro/functions.php' ); |
7
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-presets.php' ); |
8
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-loaded-effects.php' ); |
9
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-paging.php' ); |
10
|
|
|
require_once( FOOGALLERY_PATH . 'pro/extensions/default-templates/class-foogallery-pro-default-templates.php' ); |
11
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-bulk-copy.php' ); |
12
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-gallery-override.php' ); |
13
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-filtering.php' ); |
14
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-attachment-taxonomies.php' ); |
15
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/video/class-foogallery-pro-video.php' ); |
16
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/video/class-foogallery-pro-video-legacy.php' ); |
17
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/video/class-foogallery-pro-video-migration-helper.php' ); |
18
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-advanced-gallery-settings.php' ); |
19
|
|
|
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-instagram-filters.php' ); |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* FooGallery PRO Main Class |
23
|
|
|
*/ |
24
|
|
|
if ( ! class_exists( 'FooGallery_Pro' ) ) { |
25
|
|
|
|
26
|
|
|
define( 'FOOGALLERY_PRO_PATH', plugin_dir_path( __FILE__ ) ); |
27
|
|
|
define( 'FOOGALLERY_PRO_URL', plugin_dir_url( __FILE__ ) ); |
28
|
|
|
|
29
|
|
|
class FooGallery_Pro { |
|
|
|
|
30
|
|
|
|
31
|
|
|
function __construct() { |
|
|
|
|
32
|
|
|
new FooGallery_Pro_Hover_Presets(); |
33
|
|
|
new FooGallery_Pro_Loaded_Effects(); |
34
|
|
|
new FooGallery_Pro_Paging(); |
35
|
|
|
new FooGallery_Pro_Default_Templates(); |
36
|
|
|
new FooGallery_Pro_Bulk_Copy(); |
37
|
|
|
new FooGallery_Pro_Gallery_Shortcode_Override(); |
38
|
|
|
new FooGallery_Pro_Attachment_Taxonomies(); |
39
|
|
|
new FooGallery_Pro_Filtering(); |
40
|
|
|
new FooGallery_Pro_Video(); |
41
|
|
|
new FooGallery_Pro_Advanced_Gallery_Settings(); |
42
|
|
|
new FooGallery_Pro_Video_Legacy(); |
43
|
|
|
new FooGallery_Pro_Instagram_Filters(); |
44
|
|
|
} |
45
|
|
|
} |
46
|
|
|
} |
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.