PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 10.10.2
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v10.10.2
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / dynamics / user / UserBirthday.php

UserBirthday.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 10.10.2, at back/dynamics/user/UserBirthday.php

32 lines 855 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 trait UserBirthday
4 {
5 public function onAcymGetPluginField(&$availablePlugins)
6 {
7 if (ACYM_CMS === 'joomla') {
8 $availablePlugins[get_class($this)] = acym_translation('ACYM_JOOMLA_USERS');
9 }
10 }
11
12 public function getBirthdayField(&$availableFields)
13 {
14 if (!ACYM_J37) {
15 return;
16 }
17 $query = 'SELECT * FROM #__fields WHERE context = "com_users.user" AND type = "calendar"';
18 $customFields = acym_loadObjectList($query);
19 foreach ($customFields as $customField) {
20 $availableFields[$customField->id] = $customField->title;
21 }
22 }
23
24 public function getJsonBirthdayField()
25 {
26 $availableFields = [];
27 $this->getBirthdayField($availableFields);
28 echo json_encode(['fields' => $availableFields]);
29 exit;
30 }
31 }
32