updated plugin Connect Matomo version 1.1.5
This commit is contained in:
@ -1,13 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package wp-piwik
|
||||
* phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
|
||||
*/
|
||||
|
||||
// Re-write Piwik Pro configuration to default http configuration
|
||||
if ($this->isConfigured() && self::$settings->getGlobalOption ( 'piwik_mode' ) == 'pro') {
|
||||
self::$settings->setGlobalOption ( 'piwik_url', 'https://' . self::$settings->getGlobalOption ( 'piwik_user' ) . '.piwik.pro/');
|
||||
self::$settings->setGlobalOption ( 'piwik_mode', 'http' );
|
||||
if ( $this->is_configured() && 'pro' === self::$settings->get_global_option( 'piwik_mode' ) ) {
|
||||
self::$settings->set_global_option( 'piwik_url', 'https://' . self::$settings->get_global_option( 'piwik_user' ) . '.piwik.pro/' );
|
||||
self::$settings->set_global_option( 'piwik_mode', 'http' );
|
||||
}
|
||||
|
||||
// If post annotations are already enabled, choose all existing post types
|
||||
if (self::$settings->getGlobalOption('add_post_annotations'))
|
||||
self::$settings->setGlobalOption('add_post_annotations', get_post_types());
|
||||
if ( self::$settings->get_global_option( 'add_post_annotations' ) ) {
|
||||
self::$settings->set_global_option( 'add_post_annotations', get_post_types() );
|
||||
}
|
||||
|
||||
self::$settings->save ();
|
||||
self::$settings->save();
|
||||
|
||||
Reference in New Issue
Block a user