/dn_google_analytics.php

  1. <?php 
  2.  
  3. /** 
  4. * Plugin Name: Google Analytics by DN 
  5. * Plugin URI: https://wordpress.org/plugins/google-analytics-by-dn/ 
  6. * Description: Add Google Analytics to your website easily and quickly 
  7. * Version: 1.1 
  8. * Author: Daryl Ng (DN) 
  9. * License: GPL2 or later 
  10.   
  11. Copyright 2015 Daryl Ng (email : daryl.n.w.k@gmail.com) 
  12.   
  13. This program is free software; you can redistribute it and/or modify 
  14. it under the terms of the GNU General Public License, version 2, as  
  15. published by the Free Software Foundation. 
  16.   
  17. This program is distributed in the hope that it will be useful,  
  18. but WITHOUT ANY WARRANTY; without even the implied warranty of 
  19. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
  20. GNU General Public License for more details. 
  21.   
  22. You should have received a copy of the GNU General Public License 
  23. along with this program; if not, write to the Free Software 
  24. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 
  25. */ 
  26.  
  27. if ( ! defined( 'WPINC' ) ) { 
  28. die; 
  29.  
  30. define( 'DN_GOOGLE_ANALYTICS_VERSION', '1.0' ); 
  31. define( 'DN_GOOGLE_ANALYTICS__PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 
  32. define( 'DN_GOOGLE_ANALYTICS__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 
  33.  
  34. require_once( DN_GOOGLE_ANALYTICS__PLUGIN_DIR . 'class.dn_google_analytics.php' ); 
  35. $dn_google_analytics = new DN_Google_Analytics(); 
  36.  
  37. if ( is_admin() ) { 
  38. require_once( DN_GOOGLE_ANALYTICS__PLUGIN_DIR . 'class.dn_google_analytics_admin.php' ); 
  39. $dn_google_analytics_admin = new DN_Google_Analytics_Admin(); 
  40.  
  41. ?> 
.