@@ 94-103 (lines=10) @@ | ||
91 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
92 | } |
|
93 | ||
94 | private function get_where_sql( $config ) { |
|
95 | $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
|
96 | ||
97 | // config is a list of post IDs to sync |
|
98 | if ( is_array( $config ) ) { |
|
99 | $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
100 | } |
|
101 | ||
102 | return $where_sql; |
|
103 | } |
|
104 | ||
105 | function get_full_sync_actions() { |
|
106 | return array( 'jetpack_full_sync_posts' ); |
@@ 402-413 (lines=12) @@ | ||
399 | return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
|
400 | } |
|
401 | ||
402 | private function get_where_sql( $config ) { |
|
403 | global $wpdb; |
|
404 | ||
405 | $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
|
406 | ||
407 | // config is a list of user IDs to sync |
|
408 | if ( is_array( $config ) ) { |
|
409 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
|
410 | } |
|
411 | ||
412 | return $query; |
|
413 | } |
|
414 | ||
415 | function get_full_sync_actions() { |
|
416 | return array( 'jetpack_full_sync_users' ); |