packages/sync/src/modules/class-posts.php 1 location
|
@@ 236-245 (lines=10) @@
|
233 |
|
* @param array $config Full sync configuration for this sync module. |
234 |
|
* @return string WHERE SQL clause, or `null` if no comments are specified in the module config. |
235 |
|
*/ |
236 |
|
public function get_where_sql( $config ) { |
237 |
|
$where_sql = Settings::get_blacklisted_post_types_sql(); |
238 |
|
|
239 |
|
// Config is a list of post IDs to sync. |
240 |
|
if ( is_array( $config ) ) { |
241 |
|
$where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
242 |
|
} |
243 |
|
|
244 |
|
return $where_sql; |
245 |
|
} |
246 |
|
|
247 |
|
/** |
248 |
|
* Retrieve the actions that will be sent for this module during a full sync. |
packages/sync/src/modules/class-terms.php 1 location
|
@@ 155-163 (lines=9) @@
|
152 |
|
* @param array $config Full sync configuration for this sync module. |
153 |
|
* @return string WHERE SQL clause, or `null` if no comments are specified in the module config. |
154 |
|
*/ |
155 |
|
public function get_where_sql( $config ) { |
156 |
|
$where_sql = Settings::get_blacklisted_taxonomies_sql(); |
157 |
|
|
158 |
|
if ( is_array( $config ) ) { |
159 |
|
$where_sql .= ' AND term_taxonomy_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
160 |
|
} |
161 |
|
|
162 |
|
return $where_sql; |
163 |
|
} |
164 |
|
|
165 |
|
/** |
166 |
|
* Retrieve an estimated number of actions that will be enqueued. |
packages/sync/src/modules/class-users.php 1 location
|
@@ 679-690 (lines=12) @@
|
676 |
|
* @param array $config Full sync configuration for this sync module. |
677 |
|
* @return string WHERE SQL clause, or `null` if no comments are specified in the module config. |
678 |
|
*/ |
679 |
|
public function get_where_sql( $config ) { |
680 |
|
global $wpdb; |
681 |
|
|
682 |
|
$query = "meta_key = '{$wpdb->prefix}capabilities'"; |
683 |
|
|
684 |
|
// The $config variable is a list of user IDs to sync. |
685 |
|
if ( is_array( $config ) ) { |
686 |
|
$query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
687 |
|
} |
688 |
|
|
689 |
|
return $query; |
690 |
|
} |
691 |
|
|
692 |
|
/** |
693 |
|
* Retrieve the actions that will be sent for this module during a full sync. |