| @@ 145-154 (lines=10) @@ | ||
| 142 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 143 | } |
|
| 144 | ||
| 145 | private function get_where_sql( $config ) { |
|
| 146 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
| 147 | ||
| 148 | // config is a list of post IDs to sync |
|
| 149 | if ( is_array( $config ) ) { |
|
| 150 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 151 | } |
|
| 152 | ||
| 153 | return $where_sql; |
|
| 154 | } |
|
| 155 | ||
| 156 | function get_full_sync_actions() { |
|
| 157 | return array( 'jetpack_full_sync_posts' ); |
|
| @@ 316-327 (lines=12) @@ | ||
| 313 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
| 314 | } |
|
| 315 | ||
| 316 | private function get_where_sql( $config ) { |
|
| 317 | global $wpdb; |
|
| 318 | ||
| 319 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
| 320 | ||
| 321 | // config is a list of user IDs to sync |
|
| 322 | if ( is_array( $config ) ) { |
|
| 323 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
| 324 | } |
|
| 325 | ||
| 326 | return $query; |
|
| 327 | } |
|
| 328 | ||
| 329 | function get_full_sync_actions() { |
|
| 330 | return array( 'jetpack_full_sync_users' ); |
|