laipower/wp-content/upgrade-temp-backup/plugins/wp-piwik/update/2017080701.php
2023-10-22 22:21:48 +00:00

13 lines
606 B
PHP

<?php
// 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 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());
self::$settings->save ();