ap_get_reputation_event_by_slug( string $slug )

Description #

Get a reputation event by slug.

Parameters #

  • $slug
    string (Required) Event slug.

Changelog #

VersionDescription
4.3.0Introduced.

Source #

File: includes/reputation.php

function ap_get_reputation_event_by_slug( $slug ) {
	global $wpdb;

	return $wpdb->get_row( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
		$wpdb->prepare( "SELECT * FROM $wpdb->ap_reputation_events WHERE slug = %s LIMIT 1", $slug )
	);
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment