BP_Invitation::get_paged_sql( array $args = array() )

Assemble the LIMIT clause of a get() SQL statement.

Description

Used by BP_Invitation::get() to create its LIMIT clause.

Parameters

$args

(array) (Optional) See BP_Invitation::get() for more details.

Default value: array()

Return

(string) LIMIT clause.

Source

File: bp-core/classes/class-bp-invitation.php

	protected static function get_paged_sql( $args = array() ) {
		global $wpdb;

		// Setup local variable
		$retval = '';

		// Custom LIMIT
		if ( ! empty( $args['page'] ) && ! empty( $args['per_page'] ) ) {
			$page     = absint( $args['page']     );
			$per_page = absint( $args['per_page'] );
			$offset   = $per_page * ( $page - 1 );
			$retval   = $wpdb->prepare( "LIMIT %d, %d", $offset, $per_page );
		}

		return $retval;
	}

Changelog

Changelog
Version Description
BuddyBoss 1.3.5 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.