Tribe__Tickets__Tickets::get_login_url( int $post_id = null )

Provides a URL that can be used to direct users to the login form.


Parameters

$post_id

(int) (Optional) - the ID of the post to redirect to

Default value: null


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Tickets.php

		public static function get_login_url( $post_id = null ) {
			if ( is_null( $post_id ) ) {
				$post_id   = get_the_ID();
			}

			$login_url = get_site_url( null, 'wp-login.php' );

			if ( $post_id ) {
				$login_url = add_query_arg( 'redirect_to', get_permalink( $post_id ), $login_url );
			}

			/**
			 * Provides an opportunity to modify the login URL used within frontend
			 * ticket forms (typically when they need to login before they can proceed).
			 *
			 * @param string $login_url
			 */
			return apply_filters( 'tribe_tickets_ticket_login_url', $login_url );
		}