/**
  * Definition the constructor function, which is called
  * at the time of the creation of an instance of this class
  */
 function __construct()
 {
     // Add the filter of user contacts to change array
     // containing the default fields of wordpress on profile
     add_filter('user_contactmethods', array($this, 'AddContactMethods'), 90, 1);
     // Calling the function of the parent class to process
     // variables containing the configuration values ​​section
     parent::__construct();
 }
 /**
  * Definizione della funzione costruttore che viene richiamata
  * nel momento della creazione di un'istanza con questa classe
  */
 function __construct()
 {
     // Richiamo la funzione della classe padre per elaborare le
     // variabili contenenti i valori di configurazione sezione
     parent::__construct();
     // Aggiungo il link di setting nella descrizione di plugin presente
     // sul pannello di amministrazione dopo attivazione e disattivazione
     if (is_admin()) {
         add_filter("plugin_action_links_" . plugin_basename(SZ_PLUGIN_GOOGLE_MAIN), array($this, 'AddPluginSetting'));
     }
     // Aggiungere il foglio stile e gli script javsscript nelle
     // pagine di amministrazione che servono al plugin stesso
     add_action('admin_enqueue_scripts', array($this, 'moduleAdminAddStyles'));
     add_action('admin_enqueue_scripts', array($this, 'moduleAdminAddScripts'));
     // Controllo le opzioni dei moduli da caricare e richiamo
     // il file di amministrazione necessario se risulta attivo
     $object = new SZGoogleModule();
     $options = $object->getOptionsSet('sz_google_options_base');
     if ($options['plus'] == '1') {
         new SZGoogleAdminPlus();
     }
     if ($options['analytics'] == '1') {
         new SZGoogleAdminAnalytics();
     }
     if ($options['authenticator'] == '1') {
         new SZGoogleAdminAuthenticator();
     }
     if ($options['calendar'] == '1') {
         new SZGoogleAdminCalendar();
     }
     if ($options['drive'] == '1') {
         new SZGoogleAdminDrive();
     }
     if ($options['fonts'] == '1') {
         new SZGoogleAdminFonts();
     }
     if ($options['groups'] == '1') {
         new SZGoogleAdminGroups();
     }
     if ($options['hangouts'] == '1') {
         new SZGoogleAdminHangouts();
     }
     if ($options['panoramio'] == '1') {
         new SZGoogleAdminPanoramio();
     }
     if ($options['translate'] == '1') {
         new SZGoogleAdminTranslate();
     }
     if ($options['youtube'] == '1') {
         new SZGoogleAdminYoutube();
     }
     if ($options['documentation'] == '1') {
         new SZGoogleAdminDocumentation();
     }
 }
 /**
  * Definition the constructor function, which is called
  * at the time of the creation of an instance of this class
  */
 function __construct()
 {
     // Checking if I have to insert the tracking code
     // for google analytics in wordpress admin panel
     $SZ_ANALYTICS_OBJECT_ADMIN = new SZGoogleModuleAnalytics();
     $SZ_ANALYTICS_OPTION_ADMIN = $SZ_ANALYTICS_OBJECT_ADMIN->getOptions();
     // If you are the admin panel I need to check the activation
     // of the option to enable the module on administration
     if (is_admin() and $SZ_ANALYTICS_OPTION_ADMIN['ga_enable_admin'] == '1') {
         if ($SZ_ANALYTICS_OPTION_ADMIN['ga_position'] == 'H') {
             add_action('admin_head', array(new SZGoogleActionAnalytics($this), 'action'));
         }
         if ($SZ_ANALYTICS_OPTION_ADMIN['ga_position'] == 'F') {
             add_action('admin_footer', array(new SZGoogleActionAnalytics($this), 'action'));
         }
     }
     // Calling up the function of the parent class to process
     // variables containing the values ​​of configuration section
     parent::__construct();
 }
 /**
  * Definizione della funzione costruttore che viene richiamata
  * nel momento della creazione di un'istanza con questa classe
  */
 function __construct()
 {
     // Controllo se devo inserire il codice di monitoraggio
     // di google analytics nel pannello di amministrazione
     $SZ_ANALYTICS_OBJECT_ADMIN = new SZGoogleModuleAnalytics();
     $SZ_ANALYTICS_OPTION_ADMIN = $SZ_ANALYTICS_OBJECT_ADMIN->getOptions();
     // Se sono sul pannello di amministrazione devo controllare se è stata
     // attivata l'opzione per abilitare il modulo su amministrazione
     if (is_admin() and $SZ_ANALYTICS_OPTION_ADMIN['ga_enable_admin'] == '1') {
         if ($SZ_ANALYTICS_OPTION_ADMIN['ga_position'] == 'H') {
             add_action('admin_head', array(new SZGoogleActionAnalytics($this), 'action'));
         }
         if ($SZ_ANALYTICS_OPTION_ADMIN['ga_position'] == 'F') {
             add_action('admin_footer', array(new SZGoogleActionAnalytics($this), 'action'));
         }
     }
     // Richiamo la funzione della classe padre per elaborare le
     // variabili contenenti i valori di configurazione sezione
     parent::__construct();
 }
 /**
  * Definizione della funzione costruttore che viene richiamata
  * nel momento della creazione di un'istanza con questa classe
  */
 function __construct()
 {
     // Controllo le opzioni del modulo che riguardano i campi
     // da aggiungere sul profilo utente standard di wordpress
     if ($options = $this->getOptions()) {
         if ($options['plus_usercontact_page'] == '1') {
             $contacts = true;
         }
         if ($options['plus_usercontact_community'] == '1') {
             $contacts = true;
         }
         if ($options['plus_usercontact_bestpost'] == '1') {
             $contacts = true;
         }
     }
     // Aggiungo il filtro su user contacts per modificare array
     // contenente i campi predefiniti di wordpress presenti sul profilo
     if (isset($contacts) && $contacts == true) {
         add_filter('user_contactmethods', array($this, 'AddContactMethods'), 90, 1);
     }
     // Richiamo la funzione della classe padre per elaborare le
     // variabili contenenti i valori di configurazione sezione
     parent::__construct();
 }
 /**
  * Definition the constructor function, which is called
  * at the time of the creation of an instance of this class
  */
 function __construct()
 {
     $this->moduleSetClassName(__CLASS__);
     $this->moduleSetOptionSet('sz_google_options_base');
     // Checking if I have to perform operations that affect
     // the configuration and allocation of Google API
     $this->moduleCheckRequestAPI();
     // Calling up the function of the parent class to process the
     // variables that contain the values ​​of configuration section
     parent::__construct();
     // Add the link of settings below the title of the plugin
     // In the administration panel after activation and deactivation
     if (is_admin()) {
         add_filter("plugin_action_links_" . plugin_basename(SZ_PLUGIN_GOOGLE_MAIN), array($this, 'AddPluginSetting'));
     }
     // Add the style sheet and javascript in the
     // administration pages that use the same plugin
     add_action('admin_enqueue_scripts', array($this, 'moduleAdminAddStyles'));
     add_action('admin_enqueue_scripts', array($this, 'moduleAdminAddScripts'));
     // Control options of modules to load and recall
     // the file administration is necessary if active
     $options = $this->getOptions();
     if ($options->plus == '1') {
         new SZGoogleAdminPlus();
     }
     if ($options->analytics == '1') {
         new SZGoogleAdminAnalytics();
     }
     if ($options->authenticator == '1') {
         new SZGoogleAdminAuthenticator();
     }
     if ($options->calendar == '1') {
         new SZGoogleAdminCalendar();
     }
     if ($options->drive == '1') {
         new SZGoogleAdminDrive();
     }
     if ($options->fonts == '1') {
         new SZGoogleAdminFonts();
     }
     if ($options->groups == '1') {
         new SZGoogleAdminGroups();
     }
     if ($options->hangouts == '1') {
         new SZGoogleAdminHangouts();
     }
     if ($options->maps == '1') {
         new SZGoogleAdminMaps();
     }
     if ($options->panoramio == '1') {
         new SZGoogleAdminPanoramio();
     }
     if ($options->translate == '1') {
         new SZGoogleAdminTranslate();
     }
     if ($options->recaptcha == '1') {
         new SZGoogleAdminRecaptcha();
     }
     if ($options->youtube == '1') {
         new SZGoogleAdminYoutube();
     }
     if ($options->documentation == '1') {
         new SZGoogleAdminDocumentation();
     }
     if ($options->tinymce == '1') {
         new SZGoogleAdminTinyMCE();
     }
 }