Changeset 7005
- Timestamp:
- 11/24/2019 04:49:50 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/engagements.php
r7002 r7005 945 945 $object_ids = $this->parse_comma_list( get_user_option( $option_key, $user_id ) ); 946 946 947 // Maybe trick WP_Query into ".ID IN ()" 948 if ( empty( $object_ids ) ) { 949 $object_ids = array( 0 ); 950 } 951 947 952 // Maybe include these post IDs 948 if ( ! empty( $object_ids ) ) { 949 $args = array( 950 'post__in' => $object_ids 951 ); 952 953 // Or maybe include nothing 954 } else { 955 $args = array( 956 'post__in' => -1 // Tricks WP_Query into ".ID IN ()" 957 ); 958 } 953 $args = array( 954 'post__in' => $object_ids 955 ); 959 956 960 957 // Parse arguments
Note: See TracChangeset
for help on using the changeset viewer.