Newsletters: Function – wpml_get_mailinglists
« Function ReferenceDescription
wpml_get_mailinglists is used to get an Array of mailing list objects according to your needs.
Usage
wpml_get_mailinglists();
Arguments
The following arguments can be used to customize the query:
- privatelist [ 'Y' | 'N' ] (default: ‘N’) Set to ‘Y’ to get private lists.
Example
Below is an example of using the wpml_get_mailinglists function:
if ($mailinglists = wpml_get_mailinglists(array('privatelist' => "N"))) {
//do something with the Array $mailinglists
foreach ($mailinglists as $mailinglist) {
echo 'The title of this list is: ' . $mailinglist -> title;
}
}