function wpv_ct_update_posts_callback()
{
    if (!isset($_GET["wpnonce"]) || !wp_verify_nonce($_GET["wpnonce"], 'work_view_template')) {
        die("Undefined Nonce.");
    }
    global $WP_Views;
    $options = $WP_Views->get_options();
    if (isset($_GET['type']) && isset($_GET['tid'])) {
        $type = $_GET['type'];
        $tid = $options['views_template_for_' . $type];
    } else {
        return;
    }
    wpv_count_dissident_posts_from_template($tid, $type);
    die;
}
Пример #2
0
function wpv_ct_update_posts_callback()
{
    if (!current_user_can('manage_options')) {
        die("Untrusted user");
    }
    if (!isset($_GET["wpnonce"]) || !wp_verify_nonce($_GET["wpnonce"], 'work_view_template')) {
        die("Undefined Nonce");
    }
    global $WPV_settings;
    if (isset($_GET['type']) && isset($_GET['tid'])) {
        $type = $_GET['type'];
        $tid = $WPV_settings['views_template_for_' . $type];
    } else {
        die;
    }
    wpv_count_dissident_posts_from_template($tid, $type);
    die;
}