Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Notifications_Query::sql_where()

Retrieve the prepared SQL for the WHERE clause


Return Return

(string)


Top ↑

Source Source

File: includes/notifications/class.llms.notifications.query.php

	 * Slightly modified from abstract to include the table name to prevent ambiguous errors.
	 *
	 * @since 3.9.2
	 * @since 7.1.0 Drop usage of `$this->get_filter('where')` in favor of `llms_notifications_query_where`.
	 *
	 * @return string
	 */
	protected function sql_orderby() {

		$sql = 'ORDER BY';

		$comma = false;

		foreach ( $this->get( 'sort' ) as $orderby => $order ) {
			$pre   = ( $comma ) ? ', ' : ' ';
			$sql  .= $pre . "n.{$orderby} {$order}";
			$comma = true;
		}

		if ( $this->get( 'suppress_filters' ) ) {
			return $sql;
		}

		/**
		 * Filters the query WHERE clause.
		 *
		 * @since 7.1.0
		 *
		 * @param string                   $sql                 The WHERE clause of the query.
		 * @param LLMS_Notifications_Query $notifications_query Instance of LLMS_Events_Query.
		 */
		return apply_filters( 'llms_notifications_query_where', $sql, $this );

	}

	/**
	 * Retrieve the prepared SQL for the WHERE clause
	 *
	 * @return   string
	 * @since    3.8.0
	 * @version  3.14.0
	 */
	private function sql_where() {



Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.