<?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' : '';
?>
				<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 
Beispiel #3
0
</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>
Beispiel #4
0
    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();
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 
}