'; printf( esc_html__( 'WP-Matomo requires at least PHP 5.3. You are using the deprecated version %s. Please update PHP to use WP-Matomo.', 'wp-piwik' ), PHP_VERSION ); echo '

'; } function wp_piwik_load_textdomain() { load_plugin_textdomain( 'wp-piwik', false, plugin_basename( __DIR__ ) . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR ); } add_action( 'plugins_loaded', 'wp_piwik_load_textdomain' ); if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) { add_action( 'admin_notices', 'wp_piwik_phperror' ); } else { define( 'WP_PIWIK_FILE', __FILE__ ); define( 'WP_PIWIK_PATH', __DIR__ . DIRECTORY_SEPARATOR ); require_once WP_PIWIK_PATH . 'config.php'; require_once WP_PIWIK_PATH . 'classes' . DIRECTORY_SEPARATOR . 'WP_Piwik.php'; spl_autoload_register( 'wp_piwik_autoloader' ); // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['wp-piwik_debug'] = false; if ( class_exists( 'WP_Piwik' ) ) { add_action( 'setup_theme', 'wp_piwik_loader' ); } } function wp_piwik_loader() { // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['wp-piwik'] = new WP_Piwik(); }