Changeset 10016
- Timestamp:
- 07/06/2020 08:10:06 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/fields/plugin/class-ratings.php
r6287 r10016 24 24 */ 25 25 public function get_ratings( $object ) { 26 $ratings = array_map( 'absint', get_post_meta( $object['id'], 'ratings', true ) ); 26 $data = get_post_meta( $object['id'], 'ratings', true ); 27 if ( is_array( $data ) ) { 28 $ratings = array_map( 'absint', $data ); 29 } else { 30 $ratings = array(); 31 } 27 32 28 33 return $ratings ?: [];
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)