@@ 71-84 (lines=14) @@ | ||
68 | } |
|
69 | } |
|
70 | ||
71 | private function enqueue_all_posts() { |
|
72 | global $wpdb; |
|
73 | ||
74 | // I hope this is never bigger than RAM... |
|
75 | $post_ids = $wpdb->get_col( "SELECT id FROM $wpdb->posts"); |
|
76 | ||
77 | // Request posts in groups of N for efficiency |
|
78 | $chunked_post_ids = array_chunk( $post_ids, self::$array_chunk_size ); |
|
79 | ||
80 | // Send each chunk as an array of objects |
|
81 | foreach ( $chunked_post_ids as $chunk ) { |
|
82 | do_action( 'jetpack_full_sync_posts', $chunk ); |
|
83 | } |
|
84 | } |
|
85 | ||
86 | private function enqueue_all_comments() { |
|
87 | global $wpdb; |
|
@@ 86-95 (lines=10) @@ | ||
83 | } |
|
84 | } |
|
85 | ||
86 | private function enqueue_all_comments() { |
|
87 | global $wpdb; |
|
88 | ||
89 | $comment_ids = $wpdb->get_col( "SELECT comment_id FROM $wpdb->comments"); |
|
90 | $chunked_comment_ids = array_chunk( $comment_ids, self::$array_chunk_size ); |
|
91 | ||
92 | foreach ( $chunked_comment_ids as $chunk ) { |
|
93 | do_action( 'jetpack_full_sync_comments', $chunk); |
|
94 | } |
|
95 | } |
|
96 | ||
97 | // TODO: |
|
98 | private function enqueue_all_theme_info() { |