Changeset 44546 for trunk/src/wp-includes/bookmark.php
- Timestamp:
- 01/10/2019 09:05:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/bookmark.php
r42343 r44546 172 172 $r['category'] = ''; 173 173 $r['category_name'] = ''; 174 $inclinks = preg_split( '/[\s,]+/',$r['include'] );174 $inclinks = wp_parse_id_list( $r['include'] ); 175 175 if ( count( $inclinks ) ) { 176 176 foreach ( $inclinks as $inclink ) { 177 177 if ( empty( $inclusions ) ) { 178 $inclusions = ' AND ( link_id = ' . intval( $inclink ). ' ';178 $inclusions = ' AND ( link_id = ' . $inclink . ' '; 179 179 } else { 180 $inclusions .= ' OR link_id = ' . intval( $inclink ). ' ';180 $inclusions .= ' OR link_id = ' . $inclink . ' '; 181 181 } 182 182 } … … 189 189 $exclusions = ''; 190 190 if ( ! empty( $r['exclude'] ) ) { 191 $exlinks = preg_split( '/[\s,]+/',$r['exclude'] );191 $exlinks = wp_parse_id_list( $r['exclude'] ); 192 192 if ( count( $exlinks ) ) { 193 193 foreach ( $exlinks as $exlink ) { 194 194 if ( empty( $exclusions ) ) { 195 $exclusions = ' AND ( link_id <> ' . intval( $exlink ). ' ';195 $exclusions = ' AND ( link_id <> ' . $exlink . ' '; 196 196 } else { 197 $exclusions .= ' AND link_id <> ' . intval( $exlink ). ' ';197 $exclusions .= ' AND link_id <> ' . $exlink . ' '; 198 198 } 199 199 } … … 224 224 $join = ''; 225 225 if ( ! empty( $r['category'] ) ) { 226 $incategories = preg_split( '/[\s,]+/',$r['category'] );226 $incategories = wp_parse_id_list( $r['category'] ); 227 227 if ( count( $incategories ) ) { 228 228 foreach ( $incategories as $incat ) { 229 229 if ( empty( $category_query ) ) { 230 $category_query = ' AND ( tt.term_id = ' . intval( $incat ). ' ';230 $category_query = ' AND ( tt.term_id = ' . $incat . ' '; 231 231 } else { 232 $category_query .= ' OR tt.term_id = ' . intval( $incat ). ' ';232 $category_query .= ' OR tt.term_id = ' . $incat . ' '; 233 233 } 234 234 }
Note: See TracChangeset
for help on using the changeset viewer.