Ejemplo n.º 1
0
 /**
  * Constructor
  */
 private function __construct()
 {
     // init checkboxes
     $this->checkbox_manager = new MC4WP_Checkbox_Manager();
     // forms
     add_action('init', array($this, 'init_form_listener'));
     add_action('init', array($this, 'init_form_manager'));
     // init logger, only if it's not disabled
     $disable_logging = apply_filters('mc4wp_disable_logging', false);
     if (false === $disable_logging) {
         // initialize logging class
         $this->log = new MC4WP_Logger();
         $this->log->add_hooks();
     }
     // init widget
     add_action('widgets_init', array($this, 'register_widget'));
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  */
 private function __construct()
 {
     // store global `$_REQUEST` array locally, to prevent other plugins from messing with it (yes it happens....)
     // todo: fix this properly (move to more specific $_POST?)
     $this->untinkered_request_global = $_REQUEST;
     // init checkboxes
     $this->checkbox_manager = new MC4WP_Checkbox_Manager();
     // forms
     add_action('init', array($this, 'init_form_listener'));
     add_action('init', array($this, 'init_form_manager'));
     // init logger, only if it's not disabled
     $disable_logging = apply_filters('mc4wp_disable_logging', false);
     if (false === $disable_logging) {
         // initialize logging class
         $this->log = new MC4WP_Logger();
         $this->log->add_hooks();
     }
     // init widget
     add_action('widgets_init', array($this, 'register_widget'));
 }
Ejemplo n.º 3
0
<?php

defined('ABSPATH') or exit;
$plugin = new MC4WP_Plugin(__FILE__, MC4WP_PREMIUM_VERSION);
if (is_admin()) {
    $logging_admin = new MC4WP_Logging_Admin($plugin);
    $logging_admin->add_hooks();
}
$logger = new MC4WP_Logger();
$logger->add_hooks();