Changeset 1980919
- Timestamp:
- 11/26/2018 10:52:13 PM (7 years ago)
- Location:
- audience-analytics-by-quantcast
- Files:
-
- 2 edited
-
tags/1.0.1/trunk/audience-analytics.php (modified) (8 diffs)
-
trunk/audience-analytics.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
audience-analytics-by-quantcast/tags/1.0.1/trunk/audience-analytics.php
r1552930 r1980919 4 4 Plugin URI: https://www.quantcast.com/ 5 5 Description: Quantcast Measure provides free, powerful audience measurement for your site. Please go to Settings - Quantcast to get started. 6 Version: 1.0. 06 Version: 1.0.1 7 7 Author: Quantcast 8 8 Author URI: https://www.quantcast.com/ 9 9 Requires at least: 4.0 10 Tested up to: 4. 710 Tested up to: 4.9.8 11 11 License: GPL2 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 20 20 21 21 class WP_Quantcast { 22 22 23 23 protected static $_instance = null; 24 24 protected $plugin_name; 25 25 protected $version; 26 26 27 27 public static function instance() { 28 28 if ( is_null( self::$_instance ) ) { … … 31 31 return self::$_instance; 32 32 } 33 33 34 34 public function __construct() { 35 35 36 36 $this->plugin_name = 'wp-quantcast'; 37 $this->version = '1.0. 0';38 37 $this->version = '1.0.1'; 38 39 39 add_action( 'init' , array( $this, 'init' ) ); 40 40 } 41 41 42 42 public function init() { 43 43 44 44 add_action( 'admin_menu', array( $this, 'qc_add_admin_menu' ) ); 45 45 add_action( 'admin_init', array( $this, 'qc_admin_menu_init' ) ); 46 46 add_action( 'wp_footer', array( $this, 'qc_footer_scripts' ) ); 47 47 add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'qc_settings_link' ) ); 48 add_action( 'admin_notices', array( $this, 'qc_admin_notice_pcode' ) ); 48 add_action( 'admin_notices', array( $this, 'qc_admin_notice_pcode' ) ); 49 49 } 50 50 … … 59 59 public function qc_settings_link( $links ) { 60 60 $links[] = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=wp-quantcast' ), __( 'Settings', 'wp-quantcast' ) ); 61 61 62 62 return $links; 63 63 } 64 64 65 65 public function qc_admin_menu_init() { 66 66 register_setting( 'wp-quantcast', 'wp-quantcast_settings' ); 67 67 68 68 add_settings_section( 69 'qc_section', 70 '', 71 array( $this, 'qc_settings_section_callback' ), 69 'qc_section', 70 '', 71 array( $this, 'qc_settings_section_callback' ), 72 72 'wp-quantcast' 73 73 ); 74 74 75 75 add_settings_field( 76 76 'qc-pcode', 77 __( 'Your Tracking ID (P-code)', 'wp-quantcast' ), 78 array( $this, 'qc_p_code_callback' ), 79 'wp-quantcast', 80 'qc_section' 77 __( 'Your Tracking ID (P-code)', 'wp-quantcast' ), 78 array( $this, 'qc_p_code_callback' ), 79 'wp-quantcast', 80 'qc_section' 81 81 ); 82 82 83 83 } 84 84 85 85 public function qc_admin_notice_pcode() { 86 86 87 87 $setting = get_option( 'wp-quantcast_settings' ); 88 88 89 89 if( ! $setting['qc-pcode'] ) { 90 90 $error = sprintf( '%s<a href="%s">%s</a>', __( 'Audience Analytics – by Quantcast requires Your Tracking ID (P-code) for data collection. ', 'wp-quantcast' ) , admin_url( 'options-general.php?page=wp-quantcast' ), __( 'Settings', 'wp-quantcast' ) ); … … 96 96 } 97 97 } 98 98 99 99 public function qc_settings_section_callback() { 100 100 ?> … … 104 104 <?php 105 105 } 106 106 107 107 public function qc_p_code_callback() { 108 108 … … 112 112 <?php 113 113 } 114 114 115 115 public function qc_add_admin_menu() { 116 116 add_options_page( __( 'Quantcast', 'wp-quantcast' ), __( 'Quantcast', 'wp-quantcast' ), 'manage_options', 'wp-quantcast', array( $this, 'quantcast_admin_page' ) ); 117 117 } 118 118 119 119 public function quantcast_admin_page() { 120 120 $setting = get_option( 'wp-quantcast_settings' ); … … 136 136 </form> 137 137 </div> 138 <?php 138 <?php 139 139 } 140 140 141 141 public function qc_footer_scripts() { 142 142 $setting = get_option( 'wp-quantcast_settings' ); -
audience-analytics-by-quantcast/trunk/audience-analytics.php
r1552930 r1980919 4 4 Plugin URI: https://www.quantcast.com/ 5 5 Description: Quantcast Measure provides free, powerful audience measurement for your site. Please go to Settings - Quantcast to get started. 6 Version: 1.0. 06 Version: 1.0.1 7 7 Author: Quantcast 8 8 Author URI: https://www.quantcast.com/ 9 9 Requires at least: 4.0 10 Tested up to: 4. 710 Tested up to: 4.9.8 11 11 License: GPL2 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 20 20 21 21 class WP_Quantcast { 22 22 23 23 protected static $_instance = null; 24 24 protected $plugin_name; 25 25 protected $version; 26 26 27 27 public static function instance() { 28 28 if ( is_null( self::$_instance ) ) { … … 31 31 return self::$_instance; 32 32 } 33 33 34 34 public function __construct() { 35 35 36 36 $this->plugin_name = 'wp-quantcast'; 37 $this->version = '1.0. 0';38 37 $this->version = '1.0.1'; 38 39 39 add_action( 'init' , array( $this, 'init' ) ); 40 40 } 41 41 42 42 public function init() { 43 43 44 44 add_action( 'admin_menu', array( $this, 'qc_add_admin_menu' ) ); 45 45 add_action( 'admin_init', array( $this, 'qc_admin_menu_init' ) ); 46 46 add_action( 'wp_footer', array( $this, 'qc_footer_scripts' ) ); 47 47 add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'qc_settings_link' ) ); 48 add_action( 'admin_notices', array( $this, 'qc_admin_notice_pcode' ) ); 48 add_action( 'admin_notices', array( $this, 'qc_admin_notice_pcode' ) ); 49 49 } 50 50 … … 59 59 public function qc_settings_link( $links ) { 60 60 $links[] = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=wp-quantcast' ), __( 'Settings', 'wp-quantcast' ) ); 61 61 62 62 return $links; 63 63 } 64 64 65 65 public function qc_admin_menu_init() { 66 66 register_setting( 'wp-quantcast', 'wp-quantcast_settings' ); 67 67 68 68 add_settings_section( 69 'qc_section', 70 '', 71 array( $this, 'qc_settings_section_callback' ), 69 'qc_section', 70 '', 71 array( $this, 'qc_settings_section_callback' ), 72 72 'wp-quantcast' 73 73 ); 74 74 75 75 add_settings_field( 76 76 'qc-pcode', 77 __( 'Your Tracking ID (P-code)', 'wp-quantcast' ), 78 array( $this, 'qc_p_code_callback' ), 79 'wp-quantcast', 80 'qc_section' 77 __( 'Your Tracking ID (P-code)', 'wp-quantcast' ), 78 array( $this, 'qc_p_code_callback' ), 79 'wp-quantcast', 80 'qc_section' 81 81 ); 82 82 83 83 } 84 84 85 85 public function qc_admin_notice_pcode() { 86 86 87 87 $setting = get_option( 'wp-quantcast_settings' ); 88 88 89 89 if( ! $setting['qc-pcode'] ) { 90 90 $error = sprintf( '%s<a href="%s">%s</a>', __( 'Audience Analytics – by Quantcast requires Your Tracking ID (P-code) for data collection. ', 'wp-quantcast' ) , admin_url( 'options-general.php?page=wp-quantcast' ), __( 'Settings', 'wp-quantcast' ) ); … … 96 96 } 97 97 } 98 98 99 99 public function qc_settings_section_callback() { 100 100 ?> … … 104 104 <?php 105 105 } 106 106 107 107 public function qc_p_code_callback() { 108 108 … … 112 112 <?php 113 113 } 114 114 115 115 public function qc_add_admin_menu() { 116 116 add_options_page( __( 'Quantcast', 'wp-quantcast' ), __( 'Quantcast', 'wp-quantcast' ), 'manage_options', 'wp-quantcast', array( $this, 'quantcast_admin_page' ) ); 117 117 } 118 118 119 119 public function quantcast_admin_page() { 120 120 $setting = get_option( 'wp-quantcast_settings' ); … … 136 136 </form> 137 137 </div> 138 <?php 138 <?php 139 139 } 140 140 141 141 public function qc_footer_scripts() { 142 142 $setting = get_option( 'wp-quantcast_settings' );
Note: See TracChangeset
for help on using the changeset viewer.