Profile::current_user_id()
Description #
Get current user id for AnsPress profile.
Source #
File: addons/profile/profile.php
public function current_user_id() { $query_object = get_queried_object(); $user_id = get_queried_object_id(); // Current user id if queried object is not set. if ( ! $query_object instanceof \WP_User || empty( $user_id ) ) { $user_id = get_current_user_id(); } return (int) $user_id; }
Expand full source code Collapse full source code View on GitHub: addons/profile/profile.php:526
Add your comment