예제 #1
0
파일: index.php 프로젝트: jeanzum/prueba
    $request_product_id = isset($_GET['id']) ? $_GET['id'] : '';
    if ($request_product_id !== '') {
        if (isset($_GET['bundled']) && $_GET['bundled'] !== '') {
            $bundled = $_GET['bundled'];
        } else {
            $bundled = false;
        }
        ?>
            	<div class="clear"></div>
				<div class="wrap bsf-sp-screen">
                	<h2><?php 
        echo __('Upgrading Extension', 'bsf');
        ?>
</h2>
					<?php 
        $response = upgrade_bsf_product($request_product_id, $bundled);
        ?>
                    <?php 
        if (isset($response['status']) && $response['status']) {
            $url = $response['type'] === 'theme' ? 'themes.php' : 'plugins.php';
            $txt = $response['type'] === 'theme' ? 'theme' : 'plugin';
            $name = isset($response['name']) ? $response['name'] : '';
            if ($name !== '') {
                $hashname = preg_replace("![^a-z0-9]+!i", "-", $name);
                $url .= '#' . $hashname;
            }
            if (is_multisite()) {
                $reg_url = network_admin_url('index.php?page=bsf-registration');
            } else {
                if (defined('BSF_REG_MENU_TO_SETTINGS') && (BSF_REG_MENU_TO_SETTINGS == true || BSF_REG_MENU_TO_SETTINGS == 'true')) {
                    $reg_url = admin_url('options-general.php?page=bsf-registration');
예제 #2
0
 function bsf_upgrade_callback()
 {
     $product_id = $_POST['product_id'];
     $bundled = $_POST['bundled'];
     $bundled = isset($bundled) && $bundled ? $_POST['bundled_id'] : false;
     $response = upgrade_bsf_product($product_id, $bundled);
     if (isset($response['status']) && $response['status']) {
         echo '|bsf-product-upgraded|';
     }
     die;
 }
예제 #3
0
 function bsf_upgrade_callback()
 {
     $product_id = $_POST['product_id'];
     $bundled = $_POST['bundled'];
     $bundled = isset($bundled) && $bundled ? $_POST['bundled_id'] : false;
     global $ULT_UPGRADE_AJAX;
     $ULT_UPGRADE_AJAX = true;
     $response = upgrade_bsf_product($product_id, $bundled);
     if (isset($response['status']) && $response['status']) {
         echo '|bsf-product-upgraded|';
     } else {
         echo $response;
     }
     $ULT_UPGRADE_AJAX = false;
     die;
 }