| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Google Analytics Head |
| 4 |
Plugin URI: https://wordpress.org/plugins/analytics-head/ |
| 5 |
Description: This plugin adds tracking code for <strong>Google Analytics</strong> to your WordPress site. Unlike other plugins, code is added to the <i><head></i> section, so you can authorize your site in <strong>Google Webmaster Tools</strong>. Of course you can also move your tracking code into footer. |
| 6 |
Author: Lukasz Nowicki |
| 7 |
Author URI: http://lukasznowicki.info/ |
| 8 |
Version: 0.6 |
| 9 |
License: GNU General Public License v2 |
| 10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
*/ |
| 12 |
|
| 13 |
namespace Phylax\Plugin; |
| 14 |
|
| 15 |
/** |
| 16 |
* This software need WP to run, outside it is useless. |
| 17 |
*/ |
| 18 |
defined('ABSPATH') or die('Run me within WordPress environment.'); |
| 19 |
|
| 20 |
|
| 21 |
define( __NAMESPACE__ . '\PLUGIN_DIR', dirname( __FILE__ ) . DIRECTORY_SEPARATOR ); |
| 22 |
define( __NAMESPACE__ . '\PLUGIN_FILE', __FILE__ ); |
| 23 |
define( __NAMESPACE__ . '\PLUGIN_BASE', dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); |
| 24 |
|
| 25 |
/** |
| 26 |
* Include configuration file and installer |
| 27 |
*/ |
| 28 |
require_once( PLUGIN_DIR . 'inc' . DIRECTORY_SEPARATOR . 'config.php' ); |
| 29 |
require_once( PLUGIN_DIR . 'inc' . DIRECTORY_SEPARATOR . 'installer.php' ); |
| 30 |
|
| 31 |
/** |
| 32 |
* If user is in the admin area, add options view |
| 33 |
*/ |
| 34 |
if ( is_admin() ) { |
| 35 |
require_once( PLUGIN_DIR . 'inc' . DIRECTORY_SEPARATOR . 'options.php' ); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Include and run the plugin! |
| 40 |
*/ |
| 41 |
require_once( PLUGIN_DIR . 'inc' . DIRECTORY_SEPARATOR . 'plugin.php' ); |
| 42 |
|
| 43 |
#die('<br />Klik'); |
| 44 |
# EOF |