| @@ 64-73 (lines=10) @@ | ||
| 61 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 62 | } |
|
| 63 | ||
| 64 | private function get_where_sql( $config ) { |
|
| 65 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
| 66 | ||
| 67 | // config is a list of post IDs to sync |
|
| 68 | if ( is_array( $config ) ) { |
|
| 69 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 70 | } |
|
| 71 | ||
| 72 | return $where_sql; |
|
| 73 | } |
|
| 74 | ||
| 75 | function get_full_sync_actions() { |
|
| 76 | return array( 'jetpack_full_sync_posts' ); |
|
| @@ 198-209 (lines=12) @@ | ||
| 195 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 196 | } |
|
| 197 | ||
| 198 | private function get_where_sql( $config ) { |
|
| 199 | global $wpdb; |
|
| 200 | ||
| 201 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
| 202 | ||
| 203 | // config is a list of user IDs to sync |
|
| 204 | if ( is_array( $config ) ) { |
|
| 205 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 206 | } |
|
| 207 | ||
| 208 | return $query; |
|
| 209 | } |
|
| 210 | ||
| 211 | function get_full_sync_actions() { |
|
| 212 | return array( 'jetpack_full_sync_users' ); |
|