ap_current_user_id()
Description #
Get current user id for AnsPress profile.
This function must be used only in AnsPress profile. This function checks for user ID in queried object, hence if not in user page
Source #
File: includes/functions.php
function ap_current_user_id() { if ( 'user' === ap_current_page() ) { $query_object = get_queried_object(); if ( $query_object instanceof WP_User ) { return $query_object->ID; } } return 0; }
Expand full source code Collapse full source code View on GitHub: includes/functions.php:2417
Add your comment