LLMS_REST_Webhooks::is_topic_valid( string $topic )

Determine if a given topic is valid.


Parameters Parameters

$topic

(string) (Required) Topic.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/class-llms-rest-webhooks.php

	 *
	 * @since 1.0.0-beta.1
	 *
	 * @param string $topic Topic.
	 * @return bool
	 */
	public function is_topic_valid( $topic ) {

		$split = explode( '.', $topic );

		if ( 'action' === $split[0] && ! empty( $split[1] ) ) {
			return true;
		} elseif ( in_array( $topic, array_keys( $this->get_topics() ), true ) && 'action' !== $topic ) {


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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