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


PHP GFCommon::get_key方法代码示例

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


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

示例1: get_key

 private static function get_key()
 {
     if (self::is_gravityforms_supported()) {
         return GFCommon::get_key();
     } else {
         return "";
     }
 }
开发者ID:bryanmonzon,项目名称:jenjonesdirect,代码行数:8,代码来源:paypal.php

示例2: get_addon_info

 public static function get_addon_info($api, $action, $args)
 {
     if ($action == 'plugin_information' && empty($api) && (!rgempty('rg', $_GET) || $args->slug == 'gravityforms')) {
         $key = GFCommon::get_key();
         $raw_response = GFCommon::post_to_manager('api.php', "op=get_plugin&slug={$args->slug}&key={$key}", array());
         if (is_wp_error($raw_response) || $raw_response['response']['code'] != 200) {
             return false;
         }
         $plugin = unserialize($raw_response['body']);
         $api = new stdClass();
         $api->name = $plugin['title'];
         $api->version = $plugin['version'];
         $api->download_link = $plugin['download_url'];
         $api->tested = '10.0';
     }
     return $api;
 }
开发者ID:kidaak,项目名称:gravityforms,代码行数:17,代码来源:gravityforms.php

示例3: addons_page

 public static function addons_page()
 {
     wp_print_scripts("thickbox");
     wp_print_styles(array("thickbox"));
     $plugins = get_plugins();
     $installed_plugins = array();
     foreach ($plugins as $key => $plugin) {
         $is_active = is_plugin_active($key);
         $installed_plugin = array("plugin" => $key, "name" => $plugin["Name"], "is_active" => $is_active);
         $installed_plugin["activation_url"] = $is_active ? "" : wp_nonce_url("plugins.php?action=activate&plugin={$key}", "activate-plugin_{$key}");
         $installed_plugin["deactivation_url"] = !$is_active ? "" : wp_nonce_url("plugins.php?action=deactivate&plugin={$key}", "deactivate-plugin_{$key}");
         $installed_plugins[] = $installed_plugin;
     }
     $nonces = self::get_addon_nonces();
     $body = array("plugins" => urlencode(serialize($installed_plugins)), "nonces" => urlencode(serialize($nonces)), "key" => GFCommon::get_key());
     $options = array('body' => $body, 'headers' => array('Referer' => get_bloginfo("url")));
     $request_url = GRAVITY_MANAGER_URL . "/api.php?op=plugin_browser&{$_SERVER["QUERY_STRING"]}";
     $raw_response = wp_remote_post($request_url, $options);
     if (is_wp_error($raw_response) || $raw_response['response']['code'] != 200) {
         echo "<div class='error' style='margin-top:50px; padding:20px;'>" . __("Add-On brower is currently unavailable. Please try again later.", "gravityforms") . "</div>";
     } else {
         echo GFCommon::get_remote_message();
         echo $raw_response["body"];
     }
 }
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:25,代码来源:gravityforms.php

示例4: addons_page

 public static function addons_page()
 {
     wp_print_styles(array('thickbox'));
     $plugins = get_plugins();
     $installed_plugins = array();
     foreach ($plugins as $key => $plugin) {
         $is_active = is_plugin_active($key);
         $installed_plugin = array('plugin' => $key, 'name' => $plugin['Name'], 'is_active' => $is_active);
         $installed_plugin['activation_url'] = $is_active ? '' : wp_nonce_url("plugins.php?action=activate&plugin={$key}", "activate-plugin_{$key}");
         $installed_plugin['deactivation_url'] = !$is_active ? '' : wp_nonce_url("plugins.php?action=deactivate&plugin={$key}", "deactivate-plugin_{$key}");
         $installed_plugins[] = $installed_plugin;
     }
     $nonces = self::get_addon_nonces();
     $body = array('plugins' => urlencode(serialize($installed_plugins)), 'nonces' => urlencode(serialize($nonces)), 'key' => GFCommon::get_key());
     $options = array('body' => $body, 'headers' => array('Referer' => get_bloginfo('url')), 'timeout' => 15);
     $raw_response = GFCommon::post_to_manager('api.php', "op=plugin_browser&{$_SERVER['QUERY_STRING']}", $options);
     if (is_wp_error($raw_response) || $raw_response['response']['code'] != 200) {
         echo "<div class='error' style='margin-top:50px; padding:20px;'>" . __('Add-On browser is currently unavailable. Please try again later.', 'gravityforms') . '</div>';
     } else {
         echo GFCommon::get_remote_message();
         echo $raw_response['body'];
     }
 }
开发者ID:healthcommcore,项目名称:osnap,代码行数:23,代码来源:gravityforms.php

示例5: ensure_site_registered

 public function ensure_site_registered()
 {
     if (!$this->is_site_registered()) {
         $license_key_md5 = GFCommon::get_key();
         if (empty($license_key_md5)) {
             return false;
         }
         $result = $this->add_site($license_key_md5, true);
         if (!$result || is_wp_error($result)) {
             return false;
         }
     }
     return array('site_key' => $this->get_site_key(), 'site_secret' => $this->get_site_secret());
 }
开发者ID:slavic18,项目名称:cats,代码行数:14,代码来源:class-gravity-api.php

示例6: cache_remote_message

 public static function cache_remote_message()
 {
     //Getting version number
     $key = GFCommon::get_key();
     $body = "key={$key}";
     $options = array('method' => 'POST', 'timeout' => 3, 'body' => $body);
     $options['headers'] = array('Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), 'Content-Length' => strlen($body), 'User-Agent' => 'WordPress/' . get_bloginfo("version"), 'Referer' => get_bloginfo("url"));
     $request_url = GRAVITY_MANAGER_URL . "/message.php?" . GFCommon::get_remote_request_params();
     $raw_response = wp_remote_request($request_url, $options);
     if (is_wp_error($raw_response) || 200 != $raw_response['response']['code']) {
         $message = "";
     } else {
         $message = $raw_response['body'];
     }
     //validating that message is a valid Gravity Form message. If message is invalid, don't display anything
     if (substr($message, 0, 10) != "<!--GFM-->") {
         $message = "";
     }
     update_option("rg_gforms_message", $message);
 }
开发者ID:ipman3,项目名称:Mediassociates-wp,代码行数:20,代码来源:common.php

示例7: upgrade_license

 public static function upgrade_license()
 {
     $key = GFCommon::get_key();
     $body = "key={$key}";
     $options = array('method' => 'POST', 'timeout' => 3, 'body' => $body);
     $options['headers'] = array('Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), 'Content-Length' => strlen($body), 'User-Agent' => 'WordPress/' . get_bloginfo('version'), 'Referer' => get_bloginfo('url'));
     $raw_response = GFCommon::post_to_manager('api.php', 'op=upgrade_message&key=' . GFCommon::get_key(), $options);
     if (is_wp_error($raw_response) || 200 != $raw_response['response']['code']) {
         $message = '';
     } else {
         $message = $raw_response['body'];
     }
     //validating that message is a valid Gravity Form message. If message is invalid, don't display anything
     if (substr($message, 0, 10) != '<!--GFM-->') {
         $message = '';
     }
     echo $message;
     exit;
 }
开发者ID:jordanmaslyn,项目名称:vvv-starter,代码行数:19,代码来源:settings.php

示例8: upgrade_license

 public static function upgrade_license()
 {
     check_ajax_referer('gf_upgrade_license', 'gf_upgrade_license');
     $key = GFCommon::get_key();
     $body = "key={$key}";
     $options = array('method' => 'POST', 'timeout' => 3, 'body' => $body);
     $options['headers'] = array('Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), 'Content-Length' => strlen($body), 'User-Agent' => 'WordPress/' . get_bloginfo("version"), 'Referer' => get_bloginfo("url"));
     $request_url = GRAVITY_MANAGER_URL . "/api.php?op=upgrade_message&key=" . GFCommon::get_key();
     $raw_response = wp_remote_request($request_url, $options);
     if (is_wp_error($raw_response) || 200 != $raw_response['response']['code']) {
         $message = "";
     } else {
         $message = $raw_response['body'];
     }
     //validating that message is a valid Gravity Form message. If message is invalid, don't display anything
     if (substr($message, 0, 10) != "<!--GFM-->") {
         $message = "";
     }
     echo $message;
     exit;
 }
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:21,代码来源:settings.php

示例9: get_key

 private function get_key()
 {
     if ($this->_is_gravityforms_supported) {
         return GFCommon::get_key();
     } else {
         return "";
     }
 }
开发者ID:aiga-chicago,项目名称:chicago.aiga.org,代码行数:8,代码来源:class-gf-auto-upgrade.php

示例10: get_key

 private function get_key()
 {
     if (GFAddOn::is_gravityforms_supported($this->_min_gravityforms_version)) {
         return GFCommon::get_key();
     } else {
         return "";
     }
 }
开发者ID:kmzdn,项目名称:bootstrap,代码行数:8,代码来源:class-gf-auto-upgrade.php

示例11: display_changelog

 public static function display_changelog()
 {
     if ($_REQUEST["plugin"] != "gravityforms") {
         return;
     }
     $key = GFCommon::get_key();
     $body = "key={$key}";
     $options = array('method' => 'POST', 'timeout' => 3, 'body' => $body);
     $options['headers'] = array('Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset'), 'Content-Length' => strlen($body), 'User-Agent' => 'WordPress/' . get_bloginfo("version"), 'Referer' => get_bloginfo("url"));
     $raw_response = wp_remote_request(GRAVITY_MANAGER_URL . "/changelog.php?" . GFCommon::get_remote_request_params(), $options);
     if (is_wp_error($raw_response) || 200 != $raw_response['response']['code']) {
         $page_text = __("Oops!! Something went wrong.<br/>Please try again or <a href='http://www.gravityforms.com'>contact us</a>.", 'gravityforms');
     } else {
         $page_text = $raw_response['body'];
         if (substr($page_text, 0, 10) != "<!--GFM-->") {
             $page_text = "";
         }
     }
     echo stripslashes($page_text);
     exit;
 }
开发者ID:812studio,项目名称:812studio,代码行数:21,代码来源:gravityforms.php


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