| @@ 337-348 (lines=12) @@ | ||
| 334 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 335 | } |
|
| 336 | ||
| 337 | private function get_where_sql( $config ) { |
|
| 338 | global $wpdb; |
|
| 339 | ||
| 340 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
| 341 | ||
| 342 | // config is a list of user IDs to sync |
|
| 343 | if ( is_array( $config ) ) { |
|
| 344 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 345 | } |
|
| 346 | ||
| 347 | return $query; |
|
| 348 | } |
|
| 349 | ||
| 350 | function get_full_sync_actions() { |
|
| 351 | return array( 'jetpack_full_sync_users' ); |
|
| @@ 98-107 (lines=10) @@ | ||
| 95 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 96 | } |
|
| 97 | ||
| 98 | private function get_where_sql( $config ) { |
|
| 99 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
| 100 | ||
| 101 | // config is a list of post IDs to sync |
|
| 102 | if ( is_array( $config ) ) { |
|
| 103 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 104 | } |
|
| 105 | ||
| 106 | return $where_sql; |
|
| 107 | } |
|
| 108 | ||
| 109 | function get_full_sync_actions() { |
|
| 110 | return array( 'jetpack_full_sync_posts' ); |
|