LLMS_REST_Webhooks::is_topic_valid( string $topic )
Determine if a given topic is valid.
Parameters Parameters
- $topic
-
(string) (Required) Topic.
Return Return
(bool)
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 ) {
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |