LLMS_Abstract_Notification_Controller::subscribe( mixed $subscriber, string $type )
Subscribe a user to a notification type
Description Description
Parameters Parameters
- $subscriber
-
(mixed) (Required) WP User ID, email address, etc...
- $type
-
(string) (Required) Identifier for a subscription type eg: basic
Return Return
(void)
Source Source
File: includes/abstracts/llms.abstract.notification.controller.php
public function subscribe( $subscriber, $type ) { // prevent unsupported types from being subscribed if ( ! $this->supports( $type ) ) { return; } $subscriptions = $this->get_subscriber_subscriptions( $subscriber ); if ( ! in_array( $type, $subscriptions ) ) { array_push( $subscriptions, $type ); } $this->subscriptions[ $subscriber ] = $subscriptions; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: