예제 #1
0
<?php

$action = isset($_GET['action']) && $_GET['action'] === 'install' ? $_GET['action'] : '';
if ($action === 'install') {
    $request_product_id = isset($_GET['id']) ? $_GET['id'] : '';
    if ($request_product_id !== '') {
        ?>
                <div class="clear"></div>
                <div class="wrap">
                <h2><?php 
        echo __('Installing Extension', 'bsf');
        ?>
</h2>
                <?php 
        $installed = install_bsf_product($request_product_id);
        ?>
                <?php 
        if (isset($installed['status']) && $installed['status'] === true) {
            ?>
                    <?php 
            $current_name = strtolower(bsf_get_current_name($installed['init'], $installed['type']));
            ?>
                    <?php 
            $current_name = preg_replace("![^a-z0-9]+!i", "-", $current_name);
            ?>
                    <a href="<?php 
            echo is_multisite() ? network_admin_url('plugins.php#' . $current_name) : admin_url('plugins.php#' . $current_name);
            ?>
"><?php 
            echo __('Manage plugin here', 'bsf');
            ?>
예제 #2
0
 function bsf_install_callback()
 {
     $product_id = $_POST['product_id'];
     $bundled = $_POST['bundled'];
     $response = install_bsf_product($product_id);
     echo json_encode($response);
     die;
 }