function icl_wpmuadminedit()
{
    switch ($_REQUEST['action']) {
        case 'resetwpml':
            icl_reset_wpml();
            break;
        case 'deactivatewpml':
            icl_network_deactivate_wpml();
            break;
        case 'activatewpml':
            icl_network_activate_wpml();
            break;
    }
}
Example #2
0
function icl_wpmuadminedit()
{
    if (!isset($_REQUEST['action'])) {
        return;
    }
    $filtered_action = filter_input(INPUT_POST, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE);
    $filtered_action = $filtered_action ? $filtered_action : filter_input(INPUT_GET, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE);
    switch ($filtered_action) {
        case 'resetwpml':
            icl_reset_wpml();
            break;
        case 'deactivatewpml':
            icl_network_deactivate_wpml();
            break;
        case 'activatewpml':
            icl_network_activate_wpml();
            break;
    }
}
function icl_wpmuadminedit()
{
    if (!isset($_REQUEST['action'])) {
        return;
    }
    $filtered_action = filter_input(INPUT_POST, 'action');
    $filtered_action = $filtered_action ? $filtered_action : filter_input(INPUT_GET, 'action');
    switch ($filtered_action) {
        case 'resetwpml':
            icl_reset_wpml();
            break;
        case 'deactivatewpml':
            icl_network_deactivate_wpml();
            break;
        case 'activatewpml':
            icl_network_activate_wpml();
            break;
    }
}
Example #4
0
                if ($terms_objects) {
                    $term_taxonomy_ids = array_map('get_term_taxonomy_id_from_term_object', $terms_objects);
                    wp_update_term_count($term_taxonomy_ids, $taxonomy, true);
                }
            }
            add_filter('terms_clauses', array($sitepress, 'terms_clauses'));
            add_filter('get_term', array($sitepress, 'get_term_adjust_id'));
            add_filter('get_terms_args', array($sitepress, 'get_terms_args_filter'), 10, 2);
            exit;
    }
}
/* DEBUG ACTION */
global $sitepress;
if (wp_verify_nonce((string) filter_input(INPUT_POST, 'icl_reset_allnonce'), 'icl_reset_all')) {
    if ($_POST['icl-reset-all'] == 'on') {
        icl_reset_wpml();
        echo '<script type="text/javascript">location.href=\'' . admin_url('plugins.php?deactivate=true') . '\'</script>';
        exit;
    }
}
?>
<div class="wrap">
<div id="icon-wpml" class="icon32"><br/></div>
<h2><?php 
echo __('Troubleshooting', 'sitepress');
?>
</h2>
<?php 
if (isset($_GET['message'])) {
    ?>
	<div class="updated message fade"><p>
function icl_network_reset_wpml()
{
    icl_reset_wpml();
    wp_redirect(network_admin_url('admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/network.php&updated=true&action=resetwpml'));
}