ap_get_subscriber( integer|false $user_id = false, string $event = '', integer $ref_id = '' )
Description #
Get a subscriber.
Parameters #
- $user_idinteger | false (Optional) User ID. Default value: false
- $eventstring (Optional) Event type. Default value: ''
- $ref_idinteger (Optional) Reference identifier id. Default value: ''
Changelog #
Source #
File: includes/subscribers.php
function ap_get_subscriber( $user_id = false, $event = '', $ref_id = '' ) { global $wpdb; if ( false === $user_id ) { $user_id = get_current_user_id(); } if ( empty( $event ) || empty( $ref_id ) ) { return false; } $results = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->ap_subscribers WHERE subs_user_id = %d AND subs_ref_id = %d AND subs_event = %s LIMIT 1", $user_id, $ref_id, $event ) ); // phpcs:ignore WordPress.DB return $results; }
Expand full source code Collapse full source code View on GitHub: includes/subscribers.php:84
Add your comment