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_Form_Post_Type::get_permalink( WP_Post $post )

Retrieve a permalink for a given form post.


Parameters Parameters

$post

(WP_Post) (Required) Form post object.


Top ↑

Return Return

(string|false) Permalink to the form or false if no permalink exists for the given location.


Top ↑

Source Source

File: includes/forms/class-llms-form-post-type.php

	private function get_permalink( $post ) {

		$url      = false;
		$location = get_post_meta( $post->ID, '_llms_form_location', true );

		$method = "get_permalink_for_{$location}";
		if ( $this->forms->is_location_valid( $location ) && method_exists( $this, $method ) ) {
			$url = $this->$method();
		}

		/**
		 * Filters the permalink for a LifterLMS form
		 *
		 * @since 5.0.0
		 *
		 * @param string|false $url      The form's URL.
		 * @param string       $location The location ID for the form.
		 * @param WP_Post      $post     The form post object.
		 */
		return apply_filters( 'llms_form_permalink', $url, $location, $post );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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