ap_get_reputation( string $event, integer $ref_id, integer|boolean $user_id = false )
Description #
Get reputation.
Parameters #
- $eventstring (Required) Event type.
- $ref_idinteger (Required) Reference ID (post or comment ID).
- $user_idinteger | boolean (Optional) User ID. Default value: false
Source #
File: includes/reputation.php
function ap_get_reputation( $event, $ref_id, $user_id = false ) { global $wpdb; if ( false === $user_id ) { $user_id = get_current_user_id(); } $reputation = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->ap_reputations WHERE rep_user_id = %d AND rep_ref_id = %d AND rep_event = %s", $user_id, $ref_id, $event ) ); // phpcs:ignore WordPress.DB return $reputation; }
Expand full source code Collapse full source code View on GitHub: includes/reputation.php:82
Add your comment