@@ 626-636 (lines=11) @@ | ||
623 | function checksum_histogram( $object_type, $buckets, $start_id = null, $end_id = null, $fields = null ) { |
|
624 | // divide all IDs into the number of buckets |
|
625 | switch ( $object_type ) { |
|
626 | case 'posts': |
|
627 | $posts = $this->get_posts( null, $start_id, $end_id ); |
|
628 | $all_ids = array_map( array( $this, 'object_id' ), $posts ); |
|
629 | $id_field = 'ID'; |
|
630 | $get_function = 'get_post'; |
|
631 | ||
632 | if ( empty( $fields ) ) { |
|
633 | $fields = Defaults::$default_post_checksum_columns; |
|
634 | } |
|
635 | ||
636 | break; |
|
637 | case 'post_meta': |
|
638 | $post_meta = array_filter( $this->meta[ get_current_blog_id() ]['post'], array( $this, 'is_post' ) ); |
|
639 | $all_ids = array_values( array_map( array( $this, 'meta_id' ), $post_meta ) ); |
|
@@ 647-656 (lines=10) @@ | ||
644 | $fields = Defaults::$default_post_meta_checksum_columns; |
|
645 | } |
|
646 | break; |
|
647 | case 'comments': |
|
648 | $comments = $this->get_comments( null, $start_id, $end_id ); |
|
649 | $all_ids = array_map( array( $this, 'comment_id' ), $comments ); |
|
650 | $id_field = 'comment_ID'; |
|
651 | $get_function = 'get_comment'; |
|
652 | ||
653 | if ( empty( $fields ) ) { |
|
654 | $fields = Defaults::$default_comment_checksum_columns; |
|
655 | } |
|
656 | break; |
|
657 | case 'comment_meta': |
|
658 | $comment_meta = array_filter( $this->meta[ get_current_blog_id() ]['comment'], array( $this, 'is_comment' ) ); |
|
659 | $all_ids = array_values( array_map( array( $this, 'meta_id' ), $comment_meta ) ); |