当前位置: 首页>>代码示例>>PHP>>正文


PHP GADWP_Tools::unset_cookie方法代码示例

本文整理汇总了PHP中GADWP_Tools::unset_cookie方法的典型用法代码示例。如果您正苦于以下问题:PHP GADWP_Tools::unset_cookie方法的具体用法?PHP GADWP_Tools::unset_cookie怎么用?PHP GADWP_Tools::unset_cookie使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GADWP_Tools的用法示例。


在下文中一共展示了GADWP_Tools::unset_cookie方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uninstall

 public static function uninstall()
 {
     global $wpdb;
     if (is_multisite()) {
         // Cleanup Network install
         foreach (wp_get_sites(array('limit' => apply_filters('gadwp_sites_limit', 100))) as $blog) {
             switch_to_blog($blog['blog_id']);
             $sqlquery = $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'gadwp_cache_%%'");
             delete_option('gadash_options');
             restore_current_blog();
         }
         delete_site_option('gadash_network_options');
     } else {
         // Cleanup Single install
         $sqlquery = $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'gadwp_cache_%%'");
         delete_option('gadash_options');
     }
     GADWP_Tools::unset_cookie('default_metric');
     GADWP_Tools::unset_cookie('default_dimension');
     GADWP_Tools::unset_cookie('default_view');
 }
开发者ID:lilweirdward,项目名称:blofishwordpress,代码行数:21,代码来源:uninstall.php

示例2: maintain_compatibility

 private function maintain_compatibility()
 {
     $flag = false;
     if (GADWP_CURRENT_VERSION != get_option('gadwp_version')) {
         $rebuild_token = json_decode($this->options['ga_dash_token']);
         // v4.8.2
         if (is_object($rebuild_token) && !isset($rebuild_token->token_type)) {
             if (isset($this->options['ga_dash_refresh_token'])) {
                 $rebuild_token->refresh_token = $this->options['ga_dash_refresh_token'];
             }
             $rebuild_token->token_type = "Bearer";
             $this->options['ga_dash_token'] = json_encode($rebuild_token);
             unset($this->options['ga_dash_refresh_token']);
             $this->set_plugin_options(true);
         } else {
             unset($this->options['ga_dash_refresh_token']);
         }
         GADWP_Tools::clear_cache();
         GADWP_Tools::clear_transients();
         // 4.8.3 to be removed after a few months
         $flag = true;
         GADWP_Tools::delete_cache('last_error');
         update_option('gadwp_version', GADWP_CURRENT_VERSION);
         update_option('gadwp_got_updated', true);
         if (is_multisite()) {
             // Cleanup errors and cookies on the entire network
             foreach (wp_get_sites(array('limit' => apply_filters('gadwp_sites_limit', 100))) as $blog) {
                 switch_to_blog($blog['blog_id']);
                 GADWP_Tools::delete_cache('gapi_errors');
                 restore_current_blog();
             }
         } else {
             GADWP_Tools::delete_cache('gapi_errors');
         }
         GADWP_Tools::unset_cookie('default_metric');
         GADWP_Tools::unset_cookie('default_dimension');
     }
     if (!isset($this->options['ga_enhanced_links'])) {
         $this->options['ga_enhanced_links'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_dash_network'])) {
         $this->options['ga_dash_network'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_enhanced_excludesa'])) {
         $this->options['ga_dash_excludesa'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_dash_remarketing'])) {
         $this->options['ga_dash_remarketing'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_dash_adsense'])) {
         $this->options['ga_dash_adsense'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_speed_samplerate'])) {
         $this->options['ga_speed_samplerate'] = 1;
         $flag = true;
     }
     if (!isset($this->options['automatic_updates_minorversion'])) {
         $this->options['automatic_updates_minorversion'] = 1;
         $flag = true;
     }
     if (!isset($this->options['ga_event_bouncerate'])) {
         $this->options['ga_event_bouncerate'] = 0;
         $flag = true;
     }
     if (!is_array($this->options['ga_dash_access_front']) || empty($this->options['ga_dash_access_front'])) {
         $this->options['ga_dash_access_front'] = array();
         $this->options['ga_dash_access_front'][] = 'administrator';
         $flag = true;
     }
     if (!is_array($this->options['ga_dash_profile_list'])) {
         $this->options['ga_dash_profile_list'] = array();
         $flag = true;
     }
     if (!is_array($this->options['ga_dash_access_back']) || empty($this->options['ga_dash_access_back'])) {
         $this->options['ga_dash_access_back'] = array();
         $this->options['ga_dash_access_back'][] = 'administrator';
         $flag = true;
     }
     if (!is_array($this->options['ga_track_exclude'])) {
         $this->options['ga_track_exclude'] = array();
         $flag = true;
     }
     if (!isset($this->options['ga_crossdomain_tracking'])) {
         $this->options['ga_crossdomain_tracking'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_crossdomain_list'])) {
         $this->options['ga_crossdomain_list'] = '';
         $flag = true;
     }
     if (!isset($this->options['ga_author_dimindex'])) {
         $this->options['ga_author_dimindex'] = 0;
         $flag = true;
     }
     if (!isset($this->options['ga_category_dimindex'])) {
//.........这里部分代码省略.........
开发者ID:linniepinski,项目名称:perssistant,代码行数:101,代码来源:config.php

示例3: reset_token

 /**
  * Handles the token reset process
  *
  * @param
  *            $all
  */
 public function reset_token($all = true)
 {
     $this->gadwp->config->options['ga_dash_token'] = "";
     if ($all) {
         $this->gadwp->config->options['ga_dash_tableid_jail'] = "";
         $this->gadwp->config->options['ga_dash_profile_list'] = array();
         try {
             $this->client->revokeToken();
         } catch (Exception $e) {
             if (is_multisite() && $this->gadwp->config->options['ga_dash_network']) {
                 $this->gadwp->config->set_plugin_options(true);
             } else {
                 $this->gadwp->config->set_plugin_options();
             }
         }
     }
     if (is_multisite() && $this->gadwp->config->options['ga_dash_network']) {
         $this->gadwp->config->set_plugin_options(true);
     } else {
         $this->gadwp->config->set_plugin_options();
     }
     GADWP_Tools::unset_cookie('default_metric');
     GADWP_Tools::unset_cookie('default_dimension');
     GADWP_Tools::unset_cookie('default_view');
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:31,代码来源:gapi.php

示例4: clear_cache

 public static function clear_cache()
 {
     global $wpdb;
     $sqlquery = $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'gadwp_cache_qr%%'");
     GADWP_Tools::unset_cookie('default_metric');
     GADWP_Tools::unset_cookie('default_dimension');
     GADWP_Tools::unset_cookie('default_view');
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:8,代码来源:tools.php


注:本文中的GADWP_Tools::unset_cookie方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。