Noptin_Subscriber::get( string $key, $single = true )
Retrieve the value of a property or meta key.
Parameters Parameters
- $key
(string) (Required) Property
Return Return
(mixed)
Source Source
File: includes/class-noptin-subscriber.php
public function get( $key, $single = true ) { // Abort early if the subscriber does not exist. if ( ! $this->exists() ) { return null; } $value = null; if ( strtolower( $key ) === 'id' ) { $key = 'id'; } if ( isset( $this->data->$key ) ) { $value = $this->data->$key; } else { $value = get_noptin_subscriber_meta( $this->id, $key, $single ); } return apply_filters( "get_noptin_subscriber_field_$key", $value, $this, $single ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.7 | Introduced. |