GetCountPstWritePanel() public static method

public static GetCountPstWritePanel ( $write_panel_id )
Ejemplo n.º 1
0
function change_number_manage($where)
{
    global $wpdb, $parent_file;
    if (isset($_SESSION['change_number_manage'])) {
        return $where;
    }
    $types = array('edit.php', 'edit-pages.php', 'edit.php?post_type=page');
    if (!in_array($parent_file, $types)) {
        return $where;
    }
    if (isset($_GET['custom-write-panel-id'])) {
        if (is_wp30()) {
            $ver = '30';
            $post_type = 'post';
            if (isset($_GET['post_type'])) {
                $post_type = $_GET['post_type'];
            }
        } else {
            $ver = '29';
            $post_type = $parent_file;
        }
        $num_posts_mf = RCCWP_CustomWritePanel::GetCountPstWritePanel($_GET['custom-write-panel-id']);
        printf("\n      <script type=\"text/javascript\">\n      //<![CDATA[\n        jQuery().ready(function() {\n          change_number_manage_wp%s('(%s)','(%s)','(%s)','(%s)','(%s)','(%s)','(%s)','%s','filter-posts=1&custom-write-panel-id=%s');\n        });\n      //]]>\n      </script>", $ver, array_sum((array) $num_posts_mf) - $num_posts_mf->trash, $num_posts_mf->publish, $num_posts_mf->pending, $num_posts_mf->draft, $num_posts_mf->private, $num_posts_mf->trash, $num_posts_mf->future, $post_type, $_GET['custom-write-panel-id']);
        $_SESSION['change_number_manage'] = "1";
    }
    return $where;
}