| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | private function enqueue_all_posts() { |
||
| 19 | global $wpdb; |
||
| 20 | |||
| 21 | // I hope this is never bigger than RAM... |
||
| 22 | $post_ids = $wpdb->get_col( "SELECT id FROM $wpdb->posts"); |
||
| 23 | |||
| 24 | // Request posts in groups of N for efficiency |
||
| 25 | $chunked_post_ids = array_chunk( $post_ids, self::$array_chunk_size ); |
||
| 26 | |||
| 27 | foreach ( $chunked_post_ids as $chunk ) { |
||
| 28 | $posts = get_posts( array( 'post__in' => $chunk, 'post_status' => 'any' ) ); |
||
| 29 | |||
| 30 | error_log(print_r($posts, 1)); |
||
| 31 | |||
| 32 | do_action( 'jp_full_sync_posts', $posts ); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 48 | } |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.