1

$boat_safety_terms_cleaned_sorted = sort( $boat_safety_terms_cleaned ); error_log( print_r( $boat_safety_terms_cleaned_sorted, TRUE ) ); PHP's sort accepts an array reference and sorts in-place, and returns success or failure - hence the 1 you're getting. You want: sort( $boat_safety_terms_cleaned ); error_log( print_r( $boat_safety_terms_cleaned, TRUE ) );...


1

You're calling get_post_meta() in two different ways: the first, leaving $single unset (it defaults to false) will get you the full array of meta entries for the given key; the second, setting $single to true, will get only the first item with that key. What you want, I believe, is an array of user IDs attached to each post in the post_is_read meta. Here's ...


Only top voted, non community-wiki answers of a minimum length are eligible