admin
5 years ago
register-hooks
7 years ago
class-wpel-front-ignore.php
7 years ago
class-wpel-front.php
5 years ago
class-wpel-link.php
7 years ago
class-wpel-linkhero.php
5 years ago
class-wpel-plugin.php
5 years ago
class-wpel-register-scripts.php
5 years ago
class-wpel-template-tags.php
7 years ago
class-wpel-update.php
5 years ago
index.php
6 years ago
class-wpel-plugin.php
57 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class WPEL_Plugin |
| 5 | * |
| 6 | * @package WPEL |
| 7 | * @category WordPress Plugin |
| 8 | * @version 2.3 |
| 9 | * @link https://www.webfactoryltd.com/ |
| 10 | * @license Dual licensed under the MIT and GPLv2+ licenses |
| 11 | */ |
| 12 | final class WPEL_Plugin extends FWP_Plugin_Base_1x0x0 |
| 13 | { |
| 14 | |
| 15 | /** |
| 16 | * Initialize plugin |
| 17 | * @param string $plugin_file |
| 18 | * @param string $plugin_dir |
| 19 | */ |
| 20 | protected function init($plugin_file, $plugin_dir) |
| 21 | { |
| 22 | parent::init($plugin_file, $plugin_dir); |
| 23 | $this->create_components(); |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Create components |
| 28 | */ |
| 29 | protected function create_components() |
| 30 | { |
| 31 | WPEL_Register_Scripts::create(); |
| 32 | |
| 33 | // network admin page |
| 34 | $network_page = WPEL_Network_Page::create(array( |
| 35 | 'network-settings' => WPEL_Network_Fields::create(), |
| 36 | 'network-admin-settings' => WPEL_Network_Admin_Fields::create(), |
| 37 | )); |
| 38 | |
| 39 | // admin settings page |
| 40 | $settings_page = WPEL_Settings_Page::create($network_page, array( |
| 41 | 'external-links' => WPEL_External_Link_Fields::create(), |
| 42 | 'internal-links' => WPEL_Internal_Link_Fields::create(), |
| 43 | 'excluded-links' => WPEL_Excluded_Link_Fields::create(), |
| 44 | 'admin' => WPEL_Admin_Fields::create(), |
| 45 | 'exceptions' => WPEL_Exceptions_Fields::create(), |
| 46 | )); |
| 47 | |
| 48 | // front site |
| 49 | if (!is_admin()) { |
| 50 | WPEL_Front::create($settings_page); |
| 51 | } |
| 52 | |
| 53 | // update procedures |
| 54 | WPEL_Update::create(); |
| 55 | } |
| 56 | } |
| 57 |