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


PHP fs_request_get函数代码示例

本文整理汇总了PHP中fs_request_get函数的典型用法代码示例。如果您正苦于以下问题:PHP fs_request_get函数的具体用法?PHP fs_request_get怎么用?PHP fs_request_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _pricing_page_render

 /**
  * Render pricing page.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.0
  */
 function _pricing_page_render()
 {
     $this->_logger->entrance();
     $vars = array('slug' => $this->_slug);
     if ('true' === fs_request_get('checkout', false)) {
         fs_require_once_template('checkout.php', $vars);
     } else {
         fs_require_once_template('pricing.php', $vars);
     }
 }
开发者ID:freemius,项目名称:wordpress-sdk,代码行数:16,代码来源:class-freemius.php

示例2: freemius

/**
 * @package     Freemius
 * @copyright   Copyright (c) 2015, Freemius, Inc.
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       1.0.3
 */
if (!defined('ABSPATH')) {
    exit;
}
$slug = $VARS['slug'];
/**
 * @var Freemius
 */
$fs = freemius($slug);
$open_addon_slug = fs_request_get('slug');
$open_addon = false;
/**
 * @var FS_Plugin[]
 */
$addons = $fs->get_addons();
?>
	<div id="fs_addons" class="wrap">
		<h2><?php 
printf(__fs('add-ons-for-x', $slug), $fs->get_plugin_name());
?>
</h2>

		<div id="poststuff">
			<?php 
if (!is_array($addons) || 0 == count($addons)) {
开发者ID:idies,项目名称:escience-2016-wp,代码行数:30,代码来源:add-ons.php

示例3: _handle_account_edits

 private function _handle_account_edits()
 {
     $properties = array('site_secret_key', 'site_id', 'site_public_key');
     foreach ($properties as $p) {
         if (fs_request_is_action('update_' . $p)) {
             check_admin_referer('update_' . $p);
             $this->_logger->log('update_' . $p);
             $site_property = substr($p, strlen('site_'));
             $site_property_value = fs_request_get('fs_' . $p . '_' . $this->_slug, '');
             $this->get_site()->{$site_property} = $site_property_value;
             // Store account after modification.
             $this->_store_site();
             do_action('fs_account_property_edit_' . $this->_slug, 'site', $site_property, $site_property_value);
             // Anonymous functions are only available since PHP 5.3
             add_action('all_admin_notices', array('Freemius', '_account_details_updated_message'));
             break;
         }
     }
 }
开发者ID:AlexOreshkevich,项目名称:velomode.by,代码行数:19,代码来源:class-freemius.php

示例4: fs_enqueue_local_script

fs_enqueue_local_script('fs-postmessage', 'postmessage.js');
/**
 * @var array $VARS
 */
$slug = $VARS['slug'];
$fs = freemius($slug);
$timestamp = time();
$context_params = array('plugin_id' => $fs->get_id(), 'plugin_public_key' => $fs->get_public_key(), 'plugin_version' => $fs->get_plugin_version());
// Get site context secure params.
if ($fs->is_registered()) {
    $context_params = array_merge($context_params, FS_Security::instance()->get_context_params($fs->get_site(), $timestamp, 'upgrade'));
}
if ($fs->is_payments_sandbox()) {
    $context_params['sandbox'] = FS_Security::instance()->get_secure_token($fs->get_plugin(), $timestamp, 'checkout');
}
$query_params = array_merge($context_params, $_GET, array('next' => $fs->_get_sync_license_url(false, false), 'plugin_version' => $fs->get_plugin_version(), 'billing_cycle' => fs_request_get('billing_cycle', WP_FS__PERIOD_ANNUALLY)));
?>

	<div id="fs_pricing" class="wrap" style="margin: 0 0 -65px -20px;">
		<div id="iframe"></div>
		<form action="" method="POST">
			<input type="hidden" name="user_id"/>
			<input type="hidden" name="user_email"/>
			<input type="hidden" name="site_id"/>
			<input type="hidden" name="public_key"/>
			<input type="hidden" name="secret_key"/>
			<input type="hidden" name="action" value="account"/>
		</form>

		<script type="text/javascript">
			(function ($, undef) {
开发者ID:RatingWidget,项目名称:wordpress-plugin,代码行数:31,代码来源:pricing.php

示例5: wp_enqueue_script

wp_enqueue_script('jquery');
wp_enqueue_script('json2');
fs_enqueue_local_script('postmessage', 'nojquery.ba-postmessage.min.js');
fs_enqueue_local_script('fs-postmessage', 'postmessage.js');
$slug = $VARS['slug'];
$fs = freemius($slug);
$timestamp = time();
$context_params = array('plugin_id' => $fs->get_id(), 'plugin_public_key' => $fs->get_public_key(), 'plugin_version' => $fs->get_plugin_version());
// Get site context secure params.
if ($fs->is_registered()) {
    $context_params = array_merge($context_params, FS_Security::instance()->get_context_params($fs->get_site(), $timestamp, 'upgrade'));
}
if ($fs->is_payments_sandbox()) {
    $context_params['sandbox'] = FS_Security::instance()->get_secure_token($fs->get_plugin(), $timestamp, 'checkout');
}
$query_params = array_merge($context_params, $_GET, array('next' => $fs->_get_admin_page_url('account', array('fs_action' => $slug . '_sync_license')), 'plugin_version' => $fs->get_plugin_version(), 'billing_cycle' => fs_request_get('billing_cycle', WP_FS__PERIOD_ANNUALLY)));
?>

	<div id="fs_pricing" class="wrap" style="margin: 0 0 -65px -20px;">
		<div id="iframe"></div>
		<form action="" method="POST">
			<input type="hidden" name="user_id"/>
			<input type="hidden" name="user_email"/>
			<input type="hidden" name="site_id"/>
			<input type="hidden" name="public_key"/>
			<input type="hidden" name="secret_key"/>
			<input type="hidden" name="action" value="account"/>
		</form>

		<script type="text/javascript">
			(function ($, undef) {
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:31,代码来源:pricing.php

示例6: get_bloginfo

?>
',
							charset          : '<?php 
echo get_bloginfo('charset');
?>
',
							return_url       : '<?php 
echo $return_url;
?>
',
							account_url      : '<?php 
echo fs_nonce_url($fs->_get_admin_page_url('account', array('fs_action' => 'sync_user')), 'sync_user');
?>
',
							activation_url   : '<?php 
echo fs_nonce_url($fs->_get_admin_page_url('', array('fs_action' => $slug . '_activate_new', 'plugin_id' => fs_request_get('plugin_id', $fs->get_id()))), $slug . '_activate_new');
?>
'
						}, iframe[0]);
					});

					FS.PostMessage.receiveOnce('get_dimensions', function (data) {
						console.debug('receiveOnce', 'get_dimensions');

						FS.PostMessage.post('dimensions', {
							height   : $(document.body).height(),
							scrollTop: $(document).scrollTop()
						}, iframe[0]);
					});
				});
			})(jQuery);
开发者ID:ksan5835,项目名称:maadithottam,代码行数:31,代码来源:checkout.php

示例7: _update_account

 public function _update_account()
 {
     if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') {
         return;
     }
     $properties = array('user_id', 'site_secret_key', 'site_id', 'site_public_key');
     foreach ($properties as $p) {
         if (rw_request_is_action('update_' . $p)) {
             check_admin_referer('update_' . $p);
             $value = fs_request_get('rw_' . $p);
             switch ($p) {
                 case 'site_id':
                     $this->account->update_site_id($value);
                     break;
                 case 'site_public_key':
                     $this->account->update_site_public_key($value);
                     break;
                 case 'site_secret_key':
                     $this->account->update_site_secret_key($value);
                     break;
                 case 'user_id':
                     $this->account->update_site_secret_key($value);
                     break;
                 default:
                     return;
             }
             break;
         }
     }
 }
开发者ID:robertoAg,项目名称:wordpress_humor,代码行数:30,代码来源:rating-widget.php

示例8: _get_addon_info_filter

 /**
  * Generate add-on plugin information.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.6
  *
  * @param array       $data
  * @param string      $action
  * @param object|null $args
  *
  * @return array|null
  */
 function _get_addon_info_filter($data, $action = '', $args = null)
 {
     $this->_logger->entrance();
     $parent_plugin_id = fs_request_get('parent_plugin_id', false);
     if ($this->_fs->get_id() != $parent_plugin_id || 'plugin_information' !== $action || !isset($args->slug)) {
         return $data;
     }
     // Find add-on by slug.
     $selected_addon = $this->_fs->get_addon_by_slug($args->slug);
     if (false === $selected_addon) {
         return $data;
     }
     if (!isset($selected_addon->info)) {
         // Setup some default info.
         $selected_addon->info = new stdClass();
         $selected_addon->info->selling_point_0 = 'Selling Point 1';
         $selected_addon->info->selling_point_1 = 'Selling Point 2';
         $selected_addon->info->selling_point_2 = 'Selling Point 3';
         $selected_addon->info->description = '<p>Tell your users all about your add-on</p>';
     }
     fs_enqueue_local_style('fs_addons', '/admin/add-ons.css');
     $data = $args;
     $is_free = true;
     // Load add-on pricing.
     $has_pricing = false;
     $has_features = false;
     $plans = false;
     $plans_result = $this->_fs->get_api_site_or_plugin_scope()->get("/addons/{$selected_addon->id}/plans.json");
     if (!isset($plans_result->error)) {
         $plans = $plans_result->plans;
         if (is_array($plans)) {
             for ($i = 0, $len = count($plans); $i < $len; $i++) {
                 $plans[$i] = new FS_Plugin_Plan($plans[$i]);
                 $plan = $plans[$i];
                 $pricing_result = $this->_fs->get_api_site_or_plugin_scope()->get("/addons/{$selected_addon->id}/plans/{$plan->id}/pricing.json");
                 if (!isset($pricing_result->error)) {
                     // Update plan's pricing.
                     $plan->pricing = $pricing_result->pricing;
                     if (is_array($plan->pricing) && !empty($plan->pricing)) {
                         $is_free = false;
                         foreach ($plan->pricing as &$pricing) {
                             $pricing = new FS_Pricing($pricing);
                         }
                     }
                     $has_pricing = true;
                 }
                 $features_result = $this->_fs->get_api_site_or_plugin_scope()->get("/addons/{$selected_addon->id}/plans/{$plan->id}/features.json");
                 if (!isset($features_result->error) && is_array($features_result->features) && 0 < count($features_result->features)) {
                     // Update plan's pricing.
                     $plan->features = $features_result->features;
                     $has_features = true;
                 }
             }
         }
     }
     // Fetch latest version from Freemius.
     $latest = $this->_fs->_fetch_latest_version($selected_addon->id);
     if (!$is_free) {
         // If paid add-on, then it's not on wordpress.org
         $is_wordpress_org = false;
     } else {
         // If no versions found, then assume it's a .org plugin.
         $is_wordpress_org = false === $latest;
     }
     if ($is_wordpress_org) {
         $repo_data = FS_Plugin_Updater::_fetch_plugin_info_from_repository('plugin_information', (object) array('slug' => $selected_addon->slug, 'is_ssl' => is_ssl(), 'fields' => array('banners' => true, 'reviews' => true, 'downloaded' => false, 'active_installs' => true)));
         if (!empty($repo_data)) {
             $data = $repo_data;
             $data->wp_org_missing = false;
         } else {
             // Couldn't find plugin on .org.
             $is_wordpress_org = false;
             // Plugin is missing, not on Freemius nor WP.org.
             $data->wp_org_missing = true;
         }
     }
     if (!$is_wordpress_org) {
         $data->checkout_link = $this->_fs->checkout_url();
         $data->fs_missing = false === $latest;
         if ($is_free) {
             $data->download_link = $this->_fs->_get_latest_download_local_url($selected_addon->id);
         }
     }
     if (!$is_wordpress_org) {
         // Fetch as much as possible info from local files.
         $plugin_local_data = $this->_fs->get_plugin_data();
         $data->name = $selected_addon->title;
         $data->author = $plugin_local_data['Author'];
//.........这里部分代码省略.........
开发者ID:RatingWidget,项目名称:wordpress-plugin,代码行数:101,代码来源:fs-plugin-info-dialog.php

示例9: http_build_query

	</form>

	<script type="text/javascript">
		(function($){
			$(function(){
				var
				// Keep track of the iframe height.
					iframe_height = 800,
					base_url = '<?php 
echo WP_FS__ADDRESS;
?>
',
				// Pass the parent page URL into the Iframe in a meaningful way (this URL could be
				// passed via query string or hard coded into the child page, it depends on your needs).
					src = base_url + '/signup/?<?php 
echo http_build_query(array('plugin_slug' => $fs->get_slug(), 'plugin_id' => $fs->get_id(), 'plugin_public_key' => $fs->get_public_key(), 'plugin_version' => $fs->get_plugin_version(), 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons", 'password_reset' => fs_request_get('password_reset', '')));
?>
#' + encodeURIComponent(document.location.href);

				FS.PostMessage.init(base_url);

				// Append the Iframe into the DOM.
				var iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>')
					.load(function(){
						var
							address = document.location.href,
							pos = address.indexOf('/wp-admin');

						address = address.substring(0, pos);
						FS.PostMessage.post('wp_account', {
							users: [<?php 
开发者ID:robertoAg,项目名称:wordpress_humor,代码行数:31,代码来源:activation.php

示例10: get_site_url

$is_freemium = $fs->is_freemium();
$fs->_enqueue_connect_essentials();
$current_user = Freemius::_get_current_wp_user();
$first_name = $current_user->user_firstname;
if (empty($first_name)) {
    $first_name = $current_user->nickname;
}
$site_url = get_site_url();
$protocol_pos = strpos($site_url, '://');
if (false !== $protocol_pos) {
    $site_url = substr($site_url, $protocol_pos + 3);
}
$freemius_site_url = $fs->has_paid_plan() ? 'https://freemius.com/wordpress/' : 'https://freemius.com/wordpress/usage-tracking/';
$freemius_site_url .= '?' . http_build_query(array('id' => $fs->get_id(), 'slug' => $slug));
$freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="1">freemius.com</a>';
$error = fs_request_get('error');
$require_license_key = $is_premium_only || $is_freemium && $is_premium_code && fs_request_get_bool('require_license', true);
if ($is_pending_activation) {
    $require_license_key = false;
}
if ($require_license_key) {
    $fs->_require_license_activation_dialog();
}
?>
<div id="fs_connect"
     class="wrap<?php 
if (!$fs->is_enable_anonymous() || $is_pending_activation || $require_license_key) {
    echo ' fs-anonymous-disabled';
}
?>
">
开发者ID:RatingWidget,项目名称:wordpress-plugin,代码行数:31,代码来源:connect.php


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