本文整理汇总了PHP中freemius函数的典型用法代码示例。如果您正苦于以下问题:PHP freemius函数的具体用法?PHP freemius怎么用?PHP freemius使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了freemius函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: freemius
<?php
/**
* @package Freemius
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.1.2
*/
if (!defined('ABSPATH')) {
exit;
}
$slug = $VARS['slug'];
$fs = freemius($slug);
$confirmation_message = $fs->apply_filters('uninstall_confirmation_message', '');
$reasons = $VARS['reasons'];
$reasons_list_items_html = '';
foreach ($reasons as $reason) {
$list_item_classes = 'reason' . (!empty($reason['input_type']) ? ' has-input' : '');
$reasons_list_items_html .= '<li class="' . $list_item_classes . '" data-input-type="' . $reason['input_type'] . '" data-input-placeholder="' . $reason['input_placeholder'] . '"><label><span><input type="radio" name="selected-reason" value="' . $reason['id'] . '"/></span><span>' . $reason['text'] . '</span></label></li>';
}
?>
<script type="text/javascript">
(function ($) {
var reasonsHtml = <?php
echo json_encode($reasons_list_items_html);
?>
,
modalHtml =
'<div class="fs-modal<?php
echo empty($confirmation_message) ? ' no-confirmation-message' : '';
?>
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:31,代码来源:deactivation-feedback-modal.php
示例2: foreach
<th></th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
$odd = true;
foreach ($addons_to_show as $addon_id) {
?>
<?php
$addon = $fs->get_addon($addon_id);
$is_addon_activated = $fs->is_addon_activated($addon->slug);
$is_addon_connected = $fs->is_addon_connected($addon->slug);
$fs_addon = $is_addon_connected ? freemius($addon->slug) : false;
if (is_object($fs_addon)) {
$is_paying = $fs_addon->is_paying();
$user = $fs_addon->get_user();
$site = $fs_addon->get_site();
$license = $fs_addon->_get_license();
$subscription = $fs_addon->_get_subscription();
$plan = $fs_addon->get_plan();
$is_active_subscription = is_object($subscription) && $subscription->is_active();
$is_paid_trial = $fs_addon->is_paid_trial();
$show_upgrade = !$is_paying && !$is_paid_trial && !$fs_addon->_has_premium_license();
$is_current_license_expired = is_object($license) && $license->is_expired();
}
// var_dump( $is_paid_trial, $license, $site, $subscription );
?>
<tr<?php
开发者ID:RatingWidget,项目名称:wordpress-plugin,代码行数:31,代码来源:account.php
示例3: _efs
</th>
<th><?php
_efs('public-key');
?>
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($plugins as $slug => $data) {
?>
<?php
$is_active = is_plugin_active($data->file);
?>
<?php
$fs = $is_active ? freemius($slug) : null;
?>
<tr<?php
if ($is_active) {
echo ' style="background: #E6FFE6; font-weight: bold"';
}
?>
>
<td><?php
echo $data->id;
?>
</td>
<td><?php
echo $slug;
?>
</td>
开发者ID:idies,项目名称:escience-2016-wp,代码行数:31,代码来源:debug.php
示例4: foreach
if (defined('WP_FS__DEV_MODE') && WP_FS__DEV_MODE) {
?>
<th></th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
foreach ($addons_to_show as $addon_id) {
?>
<?php
$addon = $fs->get_addon($addon_id);
$is_addon_activated = $fs->is_addon_activated($addon->slug);
$fs_addon = $is_addon_activated ? freemius($addon->slug) : false;
?>
<tr>
<td>
<?php
echo $addon->title;
?>
</td>
<?php
if ($is_addon_activated) {
?>
<?php
// Add-on Installed
?>
<?php
$addon_site = $fs_addon->get_site();
开发者ID:mmarj,项目名称:CF7Customizer,代码行数:31,代码来源:account.php
示例5: fs_ui_action_link
function fs_ui_action_link($slug, $page, $action, $title, $params = array())
{
?>
<a class=""
href="<?php
echo wp_nonce_url(freemius($slug)->_get_admin_page_url($page, array_merge($params, array('fs_action' => $action))), $action);
?>
"><?php
echo $title;
?>
</a><?php
}
开发者ID:idies,项目名称:escience-2016-wp,代码行数:12,代码来源:fs-core-functions.php
注:本文中的freemius函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论