| @@ 55-64 (lines=10) @@ | ||
| 52 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 53 | } |
|
| 54 | ||
| 55 | private function get_where_sql( $config ) { |
|
| 56 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
| 57 | ||
| 58 | // config is a list of post IDs to sync |
|
| 59 | if ( is_array( $config ) ) { |
|
| 60 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 61 | } |
|
| 62 | ||
| 63 | return $where_sql; |
|
| 64 | } |
|
| 65 | ||
| 66 | function get_full_sync_actions() { |
|
| 67 | return array( 'jetpack_full_sync_posts' ); |
|
| @@ 192-203 (lines=12) @@ | ||
| 189 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 190 | } |
|
| 191 | ||
| 192 | private function get_where_sql( $config ) { |
|
| 193 | global $wpdb; |
|
| 194 | ||
| 195 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
| 196 | ||
| 197 | // config is a list of user IDs to sync |
|
| 198 | if ( is_array( $config ) ) { |
|
| 199 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 200 | } |
|
| 201 | ||
| 202 | return $query; |
|
| 203 | } |
|
| 204 | ||
| 205 | function get_full_sync_actions() { |
|
| 206 | return array( 'jetpack_full_sync_users' ); |
|