Jetpack_Sync_Settings::get_blacklisted_post_types_sql PHP Method

get_blacklisted_post_types_sql() static public method

returns escapted SQL that can be injected into a WHERE clause
static public get_blacklisted_post_types_sql ( )
    static function get_blacklisted_post_types_sql()
    {
        return 'post_type NOT IN (\'' . join('\', \'', array_map('esc_sql', self::get_setting('post_types_blacklist'))) . '\')';
    }

Usage Example

 private function get_where_sql($config)
 {
     $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql();
     // config is a list of post IDs to sync
     if (is_array($config)) {
         $where_sql .= ' AND ID IN (' . implode(',', array_map('intval', $config)) . ')';
     }
     return $where_sql;
 }
All Usage Examples Of Jetpack_Sync_Settings::get_blacklisted_post_types_sql