| @@ 232-243 (lines=12) @@ | ||
| 229 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 230 | } |
|
| 231 | ||
| 232 | private function get_where_sql( $config ) { |
|
| 233 | global $wpdb; |
|
| 234 | ||
| 235 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
| 236 | ||
| 237 | // config is a list of user IDs to sync |
|
| 238 | if ( is_array( $config ) ) { |
|
| 239 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 240 | } |
|
| 241 | ||
| 242 | return $query; |
|
| 243 | } |
|
| 244 | ||
| 245 | function get_full_sync_actions() { |
|
| 246 | return array( 'jetpack_full_sync_users' ); |
|
| @@ 70-79 (lines=10) @@ | ||
| 67 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 68 | } |
|
| 69 | ||
| 70 | private function get_where_sql( $config ) { |
|
| 71 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
| 72 | ||
| 73 | // config is a list of post IDs to sync |
|
| 74 | if ( is_array( $config ) ) { |
|
| 75 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 76 | } |
|
| 77 | ||
| 78 | return $where_sql; |
|
| 79 | } |
|
| 80 | ||
| 81 | function get_full_sync_actions() { |
|
| 82 | return array( 'jetpack_full_sync_posts' ); |
|