AnsPress_Notification_Hook::notification_page()
Description #
Display reputation tab content in AnsPress author page.
Source #
File: addons/free/notification.php
public static function notification_page() { $user_id = ap_current_user_id(); $seen = ap_sanitize_unslash( 'seen', 'r', 'all' ); if ( get_current_user_id() === $user_id ) { $seen = 'all' === $seen ? null : (int) $seen; $notifications = new AnsPress_Notification_Query( [ 'user_id' => $user_id, 'seen' => $seen ] ); do_action( 'ap_before_notification_page', $notifications ); include ap_get_theme_location( 'addons/notification/index.php' ); } else { _e( 'You do not have permission to view this page', 'anspress-question-answer' ); // xss okay. } }
Expand full source code Collapse full source code View on GitHub: addons/free/notification.php:209
Add your comment