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
                
                
                    
                                                
                                                    
                                |  | @@ 665-676 (lines=12) @@ | 
                                                            
                                    | 662 |  | 	 * @param array $config Full sync configuration for this sync module. | 
                                                            
                                    | 663 |  | 	 * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. | 
                                                            
                                    | 664 |  | 	 */ | 
                                                            
                                    | 665 |  | 	public function get_where_sql( $config ) { | 
                                                            
                                    | 666 |  | 		global $wpdb; | 
                                                            
                                    | 667 |  |  | 
                                                            
                                    | 668 |  | 		$query = "meta_key = '{$wpdb->prefix}capabilities'"; | 
                                                            
                                    | 669 |  |  | 
                                                            
                                    | 670 |  | 		// The $config variable is a list of user IDs to sync. | 
                                                            
                                    | 671 |  | 		if ( is_array( $config ) ) { | 
                                                            
                                    | 672 |  | 			$query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; | 
                                                            
                                    | 673 |  | 		} | 
                                                            
                                    | 674 |  |  | 
                                                            
                                    | 675 |  | 		return $query; | 
                                                            
                                    | 676 |  | 	} | 
                                                            
                                    | 677 |  |  | 
                                                            
                                    | 678 |  | 	/** | 
                                                            
                                    | 679 |  | 	 * Retrieve the actions that will be sent for this module during a full sync. |