Ejemplo n.º 1
0
        $do200 = stripslashes($_POST['do200']);
    } else {
        $do200 = 'N';
    }
    if ($do200 != 'Y') {
        $do200 = 'N';
    }
    $options['do200'] = $do200;
    if (function_exists('is_multisite') && is_multisite() && function_exists('kpg_pf_global_unsetup') && function_exists('kpg_pf_global_setup')) {
        if ($kpg_pf_mu == 'N') {
            kpg_pf_global_unsetup();
            switch_to_blog(1);
            update_option('kpg_permalinfinder_options', $options);
            restore_current_blog();
        } else {
            kpg_pf_global_setup();
        }
    }
    update_option('kpg_permalinfinder_options', $options);
    echo "<h2>Options Updated</h2>";
    $options = kpg_pf_get_options();
    extract($options);
}
?>
<div class="wrap">
  <h2>Permalink-Finder Options</h2>
  <h3>Version 2.3</h3>
  <h4><?php 
echo $totredir;
?>
 Permalinks redirected</h4>
Ejemplo n.º 2
0
function load_pf_mu()
{
    // check to see if this is an MU installation
    // called from the get option screen so it does not load unless there is a 404 or this is needed.
    if (!function_exists('is_multisite') || !is_multisite()) {
        return;
    }
    if (function_exists('kpg_pf_global_setup')) {
        return;
    }
    // been there done that
    // install the global hooks to globalize the options
    $kpg_pf_mu = 'N';
    global $blog_id;
    // check blog 1 for the main copy of options
    switch_to_blog(1);
    $ansa = get_option('kpg_permalinfinder_options');
    restore_current_blog();
    if (empty($ansa)) {
        $ansa = array();
    }
    if (!is_array($ansa)) {
        $ansa = array();
    }
    if (array_key_exists('kpg_pf_mu', $ansa)) {
        $kpg_pf_mu = $ansa['kpg_pf_mu'];
    }
    if ($kpg_pf_mu != 'N') {
        $kpg_pf_mu = 'Y';
    }
    if ($kpg_pf_mu == 'Y') {
        // if it is true then the global options need to be installed.\
        load_pf_mu_options_file();
        kpg_pf_global_setup();
    }
}