| @@ 147-156 (lines=10) @@ | ||
| 144 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 145 | } |
|
| 146 | ||
| 147 | private function get_where_sql( $config ) { |
|
| 148 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
| 149 | ||
| 150 | // config is a list of post IDs to sync |
|
| 151 | if ( is_array( $config ) ) { |
|
| 152 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 153 | } |
|
| 154 | ||
| 155 | return $where_sql; |
|
| 156 | } |
|
| 157 | ||
| 158 | function get_full_sync_actions() { |
|
| 159 | return array( 'jetpack_full_sync_posts' ); |
|
| @@ 334-345 (lines=12) @@ | ||
| 331 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 332 | } |
|
| 333 | ||
| 334 | private function get_where_sql( $config ) { |
|
| 335 | global $wpdb; |
|
| 336 | ||
| 337 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
| 338 | ||
| 339 | // config is a list of user IDs to sync |
|
| 340 | if ( is_array( $config ) ) { |
|
| 341 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 342 | } |
|
| 343 | ||
| 344 | return $query; |
|
| 345 | } |
|
| 346 | ||
| 347 | function get_full_sync_actions() { |
|
| 348 | return array( 'jetpack_full_sync_users' ); |
|