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


PHP __fs函数代码示例

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


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

示例1: fs_custom_status_init

function fs_custom_status_init($statuses)
{
    if (class_exists('Debug_Bar_Panel')) {
        if (FS_API__LOGGER_ON) {
            require_once dirname(__FILE__) . '/class-fs-debug-bar-panel.php';
            $statuses[] = array('fs_api_requests', __fs('Freemius API'), Freemius_Debug_Bar_Panel::requests_count() . ' ' . __fs('Requests') . ' (' . Freemius_Debug_Bar_Panel::total_time() . ')');
        }
    }
    return $statuses;
}
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:10,代码来源:debug-bar-start.php

示例2: total_time

 static function total_time()
 {
     if (class_exists('Freemius_Api')) {
         $logger = Freemius_Api::GetLogger();
     } else {
         $logger = array();
     }
     $total_time = 0.0;
     foreach ($logger as $l) {
         $total_time += $l['total'];
     }
     return number_format(100 * $total_time, 2) . ' ' . __fs('ms');
 }
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:13,代码来源:class-fs-debug-bar-panel.php

示例3: fs_message

 function fs_message($message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link)
 {
     return sprintf(__fs('hey-x') . '<br>' . __('Never miss an important update - Opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with freemius.com', 'pootle-page-builder'), $user_first_name, '<b>' . $plugin_title . '</b>', '<b>' . $user_login . '</b>', $site_link, $freemius_link);
 }
开发者ID:pootlepress,项目名称:pootle-page-builder,代码行数:4,代码来源:class-admin.php

示例4: showPanel

	function showPanel(panelType) {
		$modal.find('.fs-modal-panel').removeClass('active ');
		$modal.find('[data-panel-id="' + panelType + '"]').addClass('active');

		updateButtonLabels();
	}

	function updateButtonLabels() {
		var $deactivateButton = $modal.find('.button-deactivate');

		// Reset the deactivate button's text.
		if ('confirm' === getCurrentPanel()) {
			$deactivateButton.text('<?php 
printf(__fs('deactivation-modal-button-confirm', $slug));
?>
');
		} else {
			$deactivateButton.text('<?php 
printf(__fs('skip-deactivate', $slug));
?>
');
		}
	}

	function getCurrentPanel() {
		return $modal.find('.fs-modal-panel.active').attr('data-panel-id');
	}
})(jQuery);
</script>
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:29,代码来源:deactivation-feedback-modal.php

示例5: plugins_api_filter

 /**
  * Updates information on the "View version x.x details" page with custom data.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.4
  *
  * @uses   FS_Api
  *
  * @param object $data
  * @param string $action
  * @param mixed  $args
  *
  * @return object
  */
 function plugins_api_filter($data, $action = '', $args = null)
 {
     $this->_logger->entrance();
     if ('plugin_information' !== $action || !isset($args->slug)) {
         return $data;
     }
     $addon = false;
     $is_addon = false;
     if ($this->_fs->get_slug() !== $args->slug) {
         $addon = $this->_fs->get_addon_by_slug($args->slug);
         if (!is_object($addon)) {
             return $data;
         }
         $is_addon = true;
     }
     $plugin_in_repo = false;
     if (!$is_addon) {
         // Try to fetch info from .org repository.
         $data = self::_fetch_plugin_info_from_repository($action, $args);
         $plugin_in_repo = false !== $data;
     }
     if (!$plugin_in_repo) {
         $data = $args;
         // Fetch as much as possible info from local files.
         $plugin_local_data = $this->_fs->get_plugin_data();
         $data->name = $plugin_local_data['Name'];
         $data->author = $plugin_local_data['Author'];
         $data->sections = array('description' => 'Upgrade ' . $plugin_local_data['Name'] . ' to latest.');
         // @todo Store extra plugin info on Freemius or parse readme.txt markup.
         /*$info = $this->_fs->get_api_site_scope()->call('/information.json');
         
         if ( !isset($info->error) ) {
         	$data = $info;
         }*/
     }
     // Get plugin's newest update.
     $new_version = $this->_fs->_fetch_latest_version($is_addon ? $addon->id : false);
     if ($is_addon) {
         $data->name = $addon->title . ' ' . __fs('addon', $this->_fs->get_slug());
         $data->slug = $addon->slug;
         $data->url = WP_FS__ADDRESS;
         $data->package = $new_version->url;
     }
     if (!$plugin_in_repo) {
         $data->last_updated = !is_null($new_version->updated) ? $new_version->updated : $new_version->created;
         $data->requires = $new_version->requires_platform_version;
         $data->tested = $new_version->tested_up_to_version;
     }
     $data->version = $new_version->version;
     $data->download_link = $new_version->url;
     return $data;
 }
开发者ID:idies,项目名称:escience-2016-wp,代码行数:66,代码来源:class-fs-plugin-updater.php

示例6: _efs

    ?>
				<button class="button button-primary" tabindex="1"
				        type="submit"><?php 
    _efs($is_pending_activation ? 'resend-activation-email' : 'opt-in-connect', $slug);
    ?>
</button>
			</form>
		<?php 
}
?>
	</div><?php 
// Set core permission list items.
$permissions = array('profile' => array('icon-class' => 'dashicons dashicons-admin-users', 'label' => __fs('permissions-profile'), 'desc' => __fs('permissions-profile_desc'), 'priority' => 5), 'site' => array('icon-class' => 'dashicons dashicons-wordpress', 'label' => __fs('permissions-site'), 'desc' => __fs('permissions-site_desc'), 'priority' => 10), 'events' => array('icon-class' => 'dashicons dashicons-admin-plugins', 'label' => __fs('permissions-events'), 'desc' => __fs('permissions-events_desc'), 'priority' => 20));
// Add newsletter permissions if enabled.
if ($fs->is_permission_requested('newsletter')) {
    $permissions['newsletter'] = array('icon-class' => 'dashicons dashicons-email-alt', 'label' => __fs('permissions-newsletter'), 'desc' => __fs('permissions-newsletter_desc'), 'priority' => 15);
}
// Allow filtering of the permissions list.
$permissions = $fs->apply_filters('permission_list', $permissions);
// Sort by priority.
uasort($permissions, 'fs_sort_by_priority');
if (!empty($permissions)) {
    ?>
			<div class="fs-permissions">
				<a class="fs-trigger" href="#"><?php 
    _efs('what-permissions', $slug);
    ?>
</a>
				<ul><?php 
    foreach ($permissions as $id => $permission) {
        ?>
开发者ID:Phalconline,项目名称:dreamFactory,代码行数:31,代码来源:connect.php

示例7: _add_upgrade_action_link

 /**
  * Adds Upgrade and Add-Ons links to the main Plugins page link actions collection.
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.0.0
  */
 function _add_upgrade_action_link()
 {
     $this->_logger->entrance();
     if ($this->is_registered()) {
         if (!$this->is_paying() && $this->has_paid_plan()) {
             $this->add_plugin_action_link(__fs('upgrade', $this->_slug), $this->get_upgrade_url(), false, 20, 'upgrade');
         }
         if ($this->_has_addons()) {
             $this->add_plugin_action_link(__fs('add-ons', $this->_slug), $this->_get_admin_page_url('addons'), false, WP_FS__DEFAULT_PRIORITY, 'addons');
         }
     }
 }
开发者ID:acutedeveloper,项目名称:havering-content-preview,代码行数:18,代码来源:class-freemius.php

示例8: foreach

        echo $site->secret_key;
        ?>
</td>
			</tr>
		<?php 
    }
    ?>
		</tbody>
	</table>
<?php 
}
$addons = $VARS['addons'];
foreach ($addons as $plugin_id => $plugin_addons) {
    ?>
	<h2><?php 
    printf(__fs('addons-of-x'), $plugin_id);
    ?>
</h2>
	<table id="fs_addons" class="widefat">
		<thead>
		<tr>
			<th><?php 
    _efs('id');
    ?>
</th>
			<th><?php 
    _efs('title');
    ?>
</th>
			<th><?php 
    _efs('slug');
开发者ID:idies,项目名称:escience-2016-wp,代码行数:31,代码来源:debug.php

示例9: fs_install_plugin_information

/**
 * Display plugin information in dialog box form.
 *
 * @since 2.7.0
 */
function fs_install_plugin_information()
{
    global $tab;
    if (empty($_REQUEST['plugin'])) {
        return;
    }
    $args = array('slug' => wp_unslash($_REQUEST['plugin']), 'is_ssl' => is_ssl(), 'fields' => array('banners' => true, 'reviews' => true));
    if (is_array($args)) {
        $args = (object) $args;
    }
    if (!isset($args->per_page)) {
        $args->per_page = 24;
    }
    if (!isset($args->locale)) {
        $args->locale = get_locale();
    }
    $api = apply_filters('fs_plugins_api', false, 'plugin_information', $args);
    if (is_wp_error($api)) {
        wp_die($api);
    }
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array(), 'class' => array()), 'style' => array(), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), 'div' => array('class' => array()), 'span' => array('class' => array()), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array('class' => array()), 'i' => array('class' => array()), 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 'img' => array('src' => array(), 'class' => array(), 'alt' => array()));
    $plugins_section_titles = array('description' => _x('Description', 'Plugin installer section title'), 'installation' => _x('Installation', 'Plugin installer section title'), 'faq' => _x('FAQ', 'Plugin installer section title'), 'screenshots' => _x('Screenshots', 'Plugin installer section title'), 'changelog' => _x('Changelog', 'Plugin installer section title'), 'reviews' => _x('Reviews', 'Plugin installer section title'), 'other_notes' => _x('Other Notes', 'Plugin installer section title'));
    // Sanitize HTML
    //		foreach ( (array) $api->sections as $section_name => $content ) {
    //			$api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags );
    //		}
    foreach (array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key) {
        if (isset($api->{$key})) {
            $api->{$key} = wp_kses($api->{$key}, $plugins_allowedtags);
        }
    }
    // Add after $api->slug is ready.
    $plugins_section_titles['features'] = __fs('features-and-pricing', $api->slug);
    $_tab = esc_attr($tab);
    $section = isset($_REQUEST['section']) ? wp_unslash($_REQUEST['section']) : 'description';
    // Default to the Description tab, Do not translate, API returns English.
    if (empty($section) || !isset($api->sections[$section])) {
        $section_titles = array_keys((array) $api->sections);
        $section = array_shift($section_titles);
    }
    iframe_header(__('Plugin Install'));
    $_with_banner = '';
    //	var_dump($api->banners);
    if (!empty($api->banners) && (!empty($api->banners['low']) || !empty($api->banners['high']))) {
        $_with_banner = 'with-banner';
        $low = empty($api->banners['low']) ? $api->banners['high'] : $api->banners['low'];
        $high = empty($api->banners['high']) ? $api->banners['low'] : $api->banners['high'];
        ?>
			<style type="text/css">
				#plugin-information-title.with-banner
				{
					background-image: url( <?php 
        echo esc_url($low);
        ?>
 );
				}

				@media only screen and ( -webkit-min-device-pixel-ratio: 1.5 )
				{
					#plugin-information-title.with-banner
					{
						background-image: url( <?php 
        echo esc_url($high);
        ?>
 );
					}
				}
			</style>
		<?php 
    }
    echo '<div id="plugin-information-scrollable">';
    echo "<div id='{$_tab}-title' class='{$_with_banner}'><div class='vignette'></div><h2>{$api->name}</h2></div>";
    echo "<div id='{$_tab}-tabs' class='{$_with_banner}'>\n";
    foreach ((array) $api->sections as $section_name => $content) {
        if ('reviews' === $section_name && (empty($api->ratings) || 0 === array_sum((array) $api->ratings))) {
            continue;
        }
        if (isset($plugins_section_titles[$section_name])) {
            $title = $plugins_section_titles[$section_name];
        } else {
            $title = ucwords(str_replace('_', ' ', $section_name));
        }
        $class = $section_name === $section ? ' class="current"' : '';
        $href = add_query_arg(array('tab' => $tab, 'section' => $section_name));
        $href = esc_url($href);
        $san_section = esc_attr($section_name);
        echo "\t<a name='{$san_section}' href='{$href}' {$class}>{$title}</a>\n";
    }
    echo "</div>\n";
    ?>
	<div id="<?php 
    echo $_tab;
    ?>
-content" class='<?php 
    echo $_with_banner;
//.........这里部分代码省略.........
开发者ID:majick777,项目名称:wordpress-sdk,代码行数:101,代码来源:fs-plugin-functions.php

示例10: sprintf

echo $slug;
?>
/assets/icon-256x256.jpg"
						        type="image/png">
							<img src="//wimg.freemius.com/plugin-icon.png"/>
						</object>
					</object>
				</object>
			</object>
		</div>
		<i class="dashicons dashicons-plus fs-second"></i>
		<img class="fs-connect-logo" width="80" height="80" src="//img.freemius.com/connect-logo.png"/>
	</div>
	<div class="fs-content">
		<p><?php 
echo $fs->apply_filters('pending_activation_message', sprintf(__fs('thanks-x', $slug) . '<br>' . __fs('pending-activation-message', $slug), $first_name, '<b>' . $fs->get_plugin_name() . '</b>', '<b>' . $current_user->user_email . '</b>'));
?>
</p>
	</div>
	<div class="fs-actions">
		<?php 
$fs_user = Freemius::_get_user_by_email($current_user->user_email);
?>
		<form method="post" action="<?php 
echo WP_FS__ADDRESS;
?>
/action/service/user/install/">
			<?php 
$params = array('user_firstname' => $current_user->user_firstname, 'user_lastname' => $current_user->user_lastname, 'user_nickname' => $current_user->user_nicename, 'user_email' => $current_user->user_email, 'plugin_slug' => $slug, 'plugin_id' => $fs->get_id(), 'plugin_public_key' => $fs->get_public_key(), 'plugin_version' => $fs->get_plugin_version(), 'return_url' => wp_nonce_url($fs->_get_admin_page_url('', array('fs_action' => $slug . '_activate_new')), $slug . '_activate_new'), 'account_url' => wp_nonce_url($fs->_get_admin_page_url('account', array('fs_action' => 'sync_user')), 'sync_user'), 'site_url' => get_site_url(), 'site_name' => get_bloginfo('name'), 'platform_version' => get_bloginfo('version'), 'language' => get_bloginfo('language'), 'charset' => get_bloginfo('charset'));
?>
			<?php 
开发者ID:majick777,项目名称:wordpress-sdk,代码行数:31,代码来源:pending-activation.php

示例11: sprintf

	<div class="fs-content">
		<p><?php 
$filter = 'connect_message';
$default_optin_message = 'connect-message';
if ($fs->is_plugin_update()) {
    // If Freemius was added on a plugin update, set different
    // opt-in message.
    $default_optin_message = 'connect-message_on-update';
    // If user customized the opt-in message on update, use
    // that message. Otherwise, fallback to regular opt-in
    // custom message if exist.
    if ($fs->has_filter('connect_message_on_update')) {
        $filter = 'connect_message_on_update';
    }
}
echo $fs->apply_filters($filter, sprintf(__fs('hey-x', $slug) . '<br>' . __fs($default_optin_message, $slug), $first_name, '<b>' . $fs->get_plugin_name() . '</b>', '<b>' . $current_user->user_login . '</b>', '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>', '<a href="' . $freemius_site_url . '" target="_blank">freemius.com</a>'), $first_name, $fs->get_plugin_name(), $current_user->user_login, '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>', '<a href="' . $freemius_site_url . '" target="_blank">freemius.com</a>');
?>
</p>
	</div>
	<div class="fs-actions">
		<?php 
if ($fs->enable_anonymous()) {
    ?>
			<a href="<?php 
    echo wp_nonce_url($fs->_get_admin_page_url('', array('fs_action' => $slug . '_skip_activation')), $slug . '_skip_activation');
    ?>
"
			   class="button button-secondary" tabindex="2"><?php 
    _efs('skip', $slug);
    ?>
</a>
开发者ID:majick777,项目名称:wordpress-sdk,代码行数:31,代码来源:connect.php

示例12: stdClass

    if (!empty($plan->support_email) || !empty($plan->support_skype) || !empty($plan->support_phone) || true === $plan->is_success_manager) {
        if (!isset($features_plan_map['support'])) {
            $support_feature = new stdClass();
            $support_feature->id = 'support';
            $support_feature->title = __fs('Support', $plugin->slug);
            $features_plan_map[$support_feature->id] = array('feature' => $support_feature, 'plans' => array());
        } else {
            $support_feature = $features_plan_map['support'];
        }
        $features_plan_map[$support_feature->id]['plans'][$plan->id] = $support_feature;
    }
}
// Add updates as a feature for all plans.
$updates_feature = new stdClass();
$updates_feature->id = 'updates';
$updates_feature->title = __fs('unlimited-updates', $plugin->slug);
$features_plan_map[$updates_feature->id] = array('feature' => $updates_feature, 'plans' => array());
foreach ($plans as $plan) {
    $features_plan_map[$updates_feature->id]['plans'][$plan->id] = $updates_feature;
}
?>
<div class="fs-features">
	<table>
		<thead>
		<tr>
			<th></th>
			<?php 
foreach ($plans as $plan) {
    ?>
				<th>
					<?php 
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:31,代码来源:features.php

示例13: showPanel

		function showPanel(panelType) {
			$modal.find('.fs-modal-panel').removeClass('active ');
			$modal.find('[data-panel-id="' + panelType + '"]').addClass('active');

			updateButtonLabels();
		}

		function updateButtonLabels() {
			var $deactivateButton = $modal.find('.button-deactivate');

			// Reset the deactivate button's text.
			if ('confirm' === getCurrentPanel()) {
				$deactivateButton.text('<?php 
printf(__fs('deactivation-modal-button-confirm', $slug));
?>
');
			} else {
				$deactivateButton.text('<?php 
printf(__fs('deactivate', $slug));
?>
');
			}
		}

		function getCurrentPanel() {
			return $modal.find('.fs-modal-panel.active').attr('data-panel-id');
		}
	})(jQuery);
</script>
开发者ID:WPTie,项目名称:CF7Customizer,代码行数:29,代码来源:deactivation-feedback-modal.php

示例14: array

// Add newsletter permissions if enabled.
if ($fs->is_permission_requested('newsletter')) {
    $permissions['newsletter'] = array('icon-class' => 'dashicons dashicons-email-alt', 'label' => __fs('permissions-newsletter'), 'desc' => __fs('permissions-newsletter_desc'), 'priority' => 15);
}
// Allow filtering of the permissions list.
$permissions = $fs->apply_filters('permission_list', $permissions);
// Sort by priority.
uasort($permissions, 'fs_sort_by_priority');
if (!empty($permissions)) {
    ?>
			<div class="fs-permissions">
				<?php 
    if ($require_license_key) {
        ?>
					<p class="fs-license-sync-disclaimer"><?php 
        printf(__fs('license-sync-disclaimer', $slug), $freemius_link);
        ?>
</p>
				<?php 
    }
    ?>
				<a class="fs-trigger" href="#" tabindex="1"><?php 
    _efs('what-permissions', $slug);
    ?>
</a>
				<ul><?php 
    foreach ($permissions as $id => $permission) {
        ?>
							<li id="fs-permission-<?php 
        esc_attr_e($id);
        ?>
开发者ID:RatingWidget,项目名称:wordpress-plugin,代码行数:31,代码来源:connect.php

示例15: foreach

$screenshots = $VARS['screenshots'];
?>
<ol>
	<?php 
$i = 0;
foreach ($screenshots as $s => $url) {
    ?>
			<?php 
    // Relative URLs are replaced with WordPress.org base URL
    // therefore we need to set absolute URLs.
    $url = 'http' . (WP_FS__IS_HTTPS ? 's' : '') . ':' . $url;
    ?>
			<li>
				<a href="<?php 
    echo $url;
    ?>
" title="<?php 
    printf(__fs('view-full-size-x'), $i);
    ?>
"><img
						src="<?php 
    echo $url;
    ?>
"></a>
			</li>
			<?php 
    $i++;
}
?>
</ol>
开发者ID:mmarj,项目名称:CF7Customizer,代码行数:30,代码来源:screenshots.php


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