BP_Media_Album::populate()
Populate the object with data about the specific album item.
Description
Source
File: bp-media/classes/class-bp-media-album.php
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | public function populate() { global $wpdb ; $row = wp_cache_get( $this ->id, 'bp_media_album' ); if ( false === $row ) { $bp = buddypress(); $row = $wpdb ->get_row( $wpdb ->prepare( "SELECT * FROM {$bp->media->table_name_albums} WHERE id = %d" , $this ->id ) ); wp_cache_set( $this ->id, $row , 'bp_media_album' ); } if ( empty ( $row ) ) { $this ->id = 0; return ; } $this ->id = (int) $row ->id; $this ->user_id = (int) $row ->user_id; $this ->group_id = (int) $row ->group_id; $this ->title = $row ->title; $this ->privacy = $row ->privacy; $this ->date_created = $row ->date_created; } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.