Activity_Helper::get_activity( integer $activity_id )

Description #

Get activity by activity_id.

Parameters #

  • $activity_id
    integer (Required) Activity id.

Changelog #

VersionDescription
4.1.2Introduced.

Source #

File: includes/class/class-activity-helper.php

	public function get_activity( $activity_id ) {
		global $wpdb;

		if ( empty( $activity_id ) ) {
			return false;
		}

		return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->ap_activity WHERE activity_id = %d", $activity_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery
	}

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