| @@ -1,6 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | + exit; // Exit if accessed directly. | |
| 5 | +} | |
| 6 | + | |
| 3 | 7 | /** |
| 4 | 8 | * The file that defines the core plugin class |
| 5 | 9 | * |
| 6 | 10 | * A class definition that includes attributes and functions used across both the |
| @@ -66,10 +70,11 @@ | ||
| 66 | 70 | * |
| 67 | 71 | * @since 1.0.0 |
| 68 | 72 | */ |
| 69 | 73 | public function __construct() { |
| 70 | - $this->version = '1.1'; | |
| 71 | 74 | |
| 75 | + $this->version = ESSENTIAL_WIDGETS_VERSION; | |
| 76 | + | |
| 72 | 77 | $this->plugin_name = 'essential-widgets'; |
| 73 | 78 | |
| 74 | 79 | $this->load_dependencies(); |
| 75 | 80 | $this->set_locale(); |
| @@ -156,9 +161,15 @@ | ||
| 156 | 161 | |
| 157 | 162 | $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
| 158 | 163 | $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); |
| 159 | 164 | |
| 165 | + $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_plugin_settings_menu' ); | |
| 166 | + | |
| 160 | 167 | $this->loader->add_action( 'admin_init', $plugin_admin, 'register_settings' ); |
| 168 | + $this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'action_links', 10, 2 ); | |
| 169 | + $this->loader->add_action( 'wp_ajax_ew_switch', $plugin_admin, 'ew_switch' ); | |
| 170 | + $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'add_plugin_meta_links', 10, 2 ); | |
| 171 | + | |
| 161 | 172 | } |
| 162 | 173 | |
| 163 | 174 | /** |
| 164 | 175 | * Register all of the hooks related to the public-facing functionality |