Changeset 13493 for trunk/src/bp-members/bp-members-functions.php
- Timestamp:
- 05/30/2023 05:56:44 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-members/bp-members-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-functions.php
r13468 r13493 265 265 266 266 /** 267 * Return the ID of a user, based on user_login.268 *269 * No longer used.270 *271 * @todo Deprecate.272 *273 * @param string $user_login user_login of the user being queried.274 * @return int275 */276 function bp_core_get_displayed_userid( $user_login ) {277 return apply_filters( 'bp_core_get_displayed_userid', bp_core_get_userid( $user_login ) );278 }279 280 /**281 267 * Return the user ID based on a user's user_login. 282 268 * … … 1248 1234 1249 1235 return $wpdb->query( $sql ); 1250 }1251 1252 /**1253 * Fetch every post that is authored by the given user for the current blog.1254 *1255 * No longer used in BuddyPress.1256 *1257 * @todo Deprecate.1258 *1259 * @param int $user_id ID of the user being queried.1260 * @return array Post IDs.1261 */1262 function bp_core_get_all_posts_for_user( $user_id = 0 ) {1263 global $wpdb;1264 1265 if ( empty( $user_id ) ) {1266 $user_id = bp_displayed_user_id();1267 }1268 1269 return apply_filters( 'bp_core_get_all_posts_for_user', $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_author = %d AND post_status = 'publish' AND post_type = 'post'", $user_id ) ) );1270 1236 } 1271 1237
Note: See TracChangeset
for help on using the changeset viewer.