Menu Icons by ThemeIsle - Version 0.11.5

Version Description

  • 2019-05-23
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 Menu Icons by ThemeIsle
Version 0.11.5
Comparing to
See all releases

Code changes from version 0.11.4 to 0.11.5

Files changed (65) hide show
  1. CHANGELOG.md +4 -0
  2. mailin.php +459 -459
  3. menu-icons.php +3 -3
  4. readme.md +5 -0
  5. readme.txt +5 -0
  6. vendor/autoload.php +1 -1
  7. vendor/codeinwp/icon-picker/assets/screenshot-1.png +0 -0
  8. vendor/codeinwp/icon-picker/assets/screenshot-2.png +0 -0
  9. vendor/codeinwp/icon-picker/js/src/icon-picker.js +101 -0
  10. vendor/codeinwp/icon-picker/js/src/media/controllers/font.js +69 -0
  11. vendor/codeinwp/icon-picker/js/src/media/controllers/img.js +148 -0
  12. vendor/codeinwp/icon-picker/js/src/media/controllers/mixin.js +35 -0
  13. vendor/codeinwp/icon-picker/js/src/media/manifest.js +16 -0
  14. vendor/codeinwp/icon-picker/js/src/media/models/fonts.js +77 -0
  15. vendor/codeinwp/icon-picker/js/src/media/models/target.js +18 -0
  16. vendor/codeinwp/icon-picker/js/src/media/views/browser.js +15 -0
  17. vendor/codeinwp/icon-picker/js/src/media/views/font-browser.js +65 -0
  18. vendor/codeinwp/icon-picker/js/src/media/views/font-filter.js +33 -0
  19. vendor/codeinwp/icon-picker/js/src/media/views/font-item.js +30 -0
  20. vendor/codeinwp/icon-picker/js/src/media/views/font-library.js +100 -0
  21. vendor/codeinwp/icon-picker/js/src/media/views/frame.js +118 -0
  22. vendor/codeinwp/icon-picker/js/src/media/views/img-browser.js +6 -0
  23. vendor/codeinwp/icon-picker/js/src/media/views/sidebar.js +29 -0
  24. vendor/codeinwp/icon-picker/js/src/media/views/svg-item.js +8 -0
  25. vendor/codeinwp/icon-picker/phpcs.ruleset.xml +17 -0
  26. vendor/codeinwp/icon-picker/readme.md +85 -0
  27. vendor/codeinwp/menu-item-custom-fields/phpcs.ruleset.xml +18 -0
  28. vendor/codeinwp/menu-item-custom-fields/readme.md +66 -0
  29. vendor/codeinwp/themeisle-sdk/CHANGELOG.md +50 -0
  30. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php +0 -312
  31. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php +0 -556
  32. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php +0 -50
  33. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php +0 -209
  34. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php +0 -983
  35. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php +0 -90
  36. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php +0 -686
  37. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +0 -96
  38. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php +0 -227
  39. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php +0 -105
  40. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +0 -635
  41. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php +0 -223
  42. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php +0 -412
  43. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php +0 -50
  44. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php +0 -37
  45. vendor/codeinwp/themeisle-sdk/composer.json +0 -24
  46. vendor/codeinwp/themeisle-sdk/index.php +2 -4
  47. vendor/codeinwp/themeisle-sdk/load.php +17 -3
  48. vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php +66 -0
  49. vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php +108 -0
  50. vendor/codeinwp/themeisle-sdk/src/Loader.php +126 -0
  51. vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php +464 -0
  52. vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php +358 -0
  53. vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +719 -0
  54. vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php +177 -0
  55. vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php +456 -0
  56. vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php +374 -0
  57. vendor/codeinwp/themeisle-sdk/src/Modules/Review.php +117 -0
  58. vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php +376 -0
  59. vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php +918 -0
  60. vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php +734 -0
  61. vendor/codeinwp/themeisle-sdk/src/Product.php +396 -0
  62. vendor/codeinwp/themeisle-sdk/start.php +32 -21
  63. vendor/composer/autoload_files.php +0 -1
  64. vendor/composer/autoload_real.php +5 -5
  65. vendor/composer/installed.json +42 -42
CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
2
### v0.11.4 - 2018-12-10
3
**Changes:**
4
* fix issue with composer libraries.
1
2
+ ### v0.11.5 - 2019-05-23
3
+ **Changes:**
4
+ * Sync composer dependencies with the latest version
5
+
6
### v0.11.4 - 2018-12-10
7
**Changes:**
8
* fix issue with composer libraries.
mailin.php CHANGED
@@ -55,155 +55,155 @@ class Mailin {
55
}
56
57
/*
58
- Get Account.
59
- No input required
60
- */
61
public function get_account() {
62
return $this->get( 'account', '' );
63
}
64
65
/*
66
- Get SMTP details.
67
- No input required
68
- */
69
public function get_smtp_details() {
70
return $this->get( 'account/smtpdetail', '' );
71
}
72
73
/*
74
- Create Child Account.
75
- @param {Array} data contains php array with key value pair.
76
- @options data {String} child_email: Email address of Reseller child [Mandatory]
77
- @options data {String} password: Password of Reseller child to login [Mandatory]
78
- @options data {String} company_org: Name of Reseller child’s company [Mandatory]
79
- @options data {String} first_name: First name of Reseller child [Mandatory]
80
- @options data {String} last_name: Last name of Reseller child [Mandatory]
81
- @options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional]
82
- - email_credit {Integer} number of email credits
83
- - sms_credit {Integer} Number of sms credts
84
- @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
85
- */
86
public function create_child_account( $data ) {
87
return $this->post( 'account', json_encode( $data ) );
88
}
89
90
/*
91
- Update Child Account.
92
- @param {Array} data contains php array with key value pair.
93
- @options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory]
94
- @options data {String} company_org: Name of Reseller child’s company [Optional]
95
- @options data {String} first_name: First name of Reseller child [Optional]
96
- @options data {String} last_name: Last name of Reseller child [Optional]
97
- @options data {String} password: Password of Reseller child to login [Optional]
98
- @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
99
- @options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional]
100
- */
101
public function update_child_account( $data ) {
102
return $this->put( 'account', json_encode( $data ) );
103
}
104
105
/*
106
- Delete Child Account.
107
- @param {Array} data contains php array with key value pair.
108
- @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory]
109
- */
110
public function delete_child_account( $data ) {
111
return $this->delete( 'account/' . $data['auth_key'], '' );
112
}
113
114
/*
115
- Get Reseller child Account.
116
- @param {Array} data contains php array with key value pair.
117
- @options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory]
118
- */
119
public function get_reseller_child( $data ) {
120
return $this->post( 'account/getchildv2', json_encode( $data ) );
121
}
122
123
/*
124
- Add/Remove Reseller child's Email/Sms credits.
125
- @param {Array} data contains php array with key value pair.
126
- @options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory]
127
- @options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty]
128
- - email_credit {Integer} number of email credits
129
- - sms_credit {Integer} Number of sms credts
130
- @options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty]
131
- - email_credit {Integer} number of email credits
132
- - sms_credit {Integer} Number of sms credts
133
- */
134
public function add_remove_child_credits( $data ) {
135
return $this->post( 'account/addrmvcredit', json_encode( $data ) );
136
}
137
138
/*
139
- Get a particular campaign detail.
140
- @param {Array} data contains php array with key value pair.
141
- @options data {Integer} id: Unique Id of the campaign [Mandatory]
142
- */
143
public function get_campaign_v2( $data ) {
144
return $this->get( 'campaign/' . $data['id'] . '/detailsv2', '' );
145
}
146
147
/*
148
- Get all campaigns detail.
149
- @param {Array} data contains php array with key value pair.
150
- @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional]
151
- @options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional]
152
- @options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional]
153
- @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
154
- */
155
public function get_campaigns_v2( $data ) {
156
return $this->get( 'campaign/detailsv2', json_encode( $data ) );
157
}
158
159
/*
160
- Create and Schedule your campaigns. It returns the ID of the created campaign.
161
- @param {Array} data contains php array with key value pair.
162
- @options data {String} category: Tag name of the campaign [Optional]
163
- @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
164
- @options data {String} name: Name of the campaign [Mandatory]
165
- @options data {String} bat: Email address for test mail [Optional]
166
- @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
167
- @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
168
- @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
169
- @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
170
- @options data {String} subject: Subject of the campaign [Mandatory]
171
- @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
172
- @options data {String} reply_to: The reply to email in the campaign emails [Optional]
173
- @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in SendinBlue account [Optional]
174
- @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
175
- @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
176
- @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
177
- @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
178
- @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
179
-
180
- */
181
public function create_campaign( $data ) {
182
return $this->post( 'campaign', json_encode( $data ) );
183
}
184
185
/*
186
- Update your campaign.
187
- @param {Array} data contains php array with key value pair.
188
- @options data {Integer} id: Id of campaign to be modified [Mandatory]
189
- @options data {String} category: Tag name of the campaign [Optional]
190
- @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
191
- @options data {String} name: Name of the campaign [Optional]
192
- @options data {String} bat: Email address for test mail [Optional]
193
- @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional]
194
- @options data {String} html_url: Url which content is the body of content [Optional]
195
- @options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
196
- @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
197
- @options data {String} subject: Subject of the campaign.
198
- @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
199
- @options data {String} reply_to: The reply to email in the campaign emails [Optional]
200
- @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
201
- @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
202
- @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
203
- @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
204
- @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
205
- @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
206
- */
207
public function update_campaign( $data ) {
208
$id = $data['id'];
209
unset( $data['id'] );
@@ -211,26 +211,26 @@ class Mailin {
211
}
212
213
/*
214
- Delete your campaigns.
215
- @param {Array} data contains php array with key value pair.
216
- @options data {Integer} id: Id of campaign to be deleted [Mandatory]
217
- */
218
public function delete_campaign( $data ) {
219
return $this->delete( 'campaign/' . $data['id'], '' );
220
}
221
222
/*
223
- Send report of Sent and Archived campaign.
224
- @param {Array} data contains php array with key value pair.
225
- @options data {Integer} id: Id of campaign to send its report [Mandatory]
226
- @options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional]
227
- @options data {String} email_subject: Message subject [Mandatory]
228
- @options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
229
- @options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory]
230
- @options data {Array} email_bcc: Same as email_to but for Bcc [Optional]
231
- @options data {Array} email_cc: Same as email_to but for Cc [Optional]
232
- @options data {String} email_body: Body of the message [Mandatory]
233
- */
234
public function campaign_report_email( $data ) {
235
$id = $data['id'];
236
unset( $data['id'] );
@@ -238,12 +238,12 @@ class Mailin {
238
}
239
240
/*
241
- Export the recipients of a specified campaign.
242
- @param {Array} data contains php array with key value pair.
243
- @options data {Integer} id: Id of campaign to export its recipients [Mandatory]
244
- @options data {String} notify_url: URL that will be called once the export process is finished [Mandatory]
245
- @options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory]
246
- */
247
public function campaign_recipients_export( $data ) {
248
$id = $data['id'];
249
unset( $data['id'] );
@@ -251,21 +251,21 @@ class Mailin {
251
}
252
253
/*
254
- Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available.
255
- @param {Array} data contains php array with key value pair.
256
- @options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory]
257
- */
258
259
public function share_campaign( $data ) {
260
return $this->post( 'campaign/sharelinkv2', json_encode( $data ) );
261
}
262
263
/*
264
- Send a Test Campaign.
265
- @param {Array} data contains php array with key value pair.
266
- @options data {Integer} id: Id of the campaign [Mandatory]
267
- @options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
268
- */
269
public function send_bat_email( $data ) {
270
$id = $data['id'];
271
unset( $data['id'] );
@@ -273,11 +273,11 @@ class Mailin {
273
}
274
275
/*
276
- Update the Campaign status.
277
- @param {Array} data contains php array with key value pair.
278
- @options data {Integer} id: Id of campaign to update its status [Mandatory]
279
- @options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory]
280
- */
281
public function update_campaign_status( $data ) {
282
$id = $data['id'];
283
unset( $data['id'] );
@@ -285,54 +285,54 @@ class Mailin {
285
}
286
287
/*
288
- Create and schedule your Trigger campaigns.
289
- @param {Array} data contains php array with key value pair.
290
- @options data {String} category: Tag name of the campaign [Optional]
291
- @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
292
- @options data {String} trigger_name: Name of the campaign [Mandatory]
293
- @options data {String} bat: Email address for test mail [Optional]
294
- @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
295
- @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
296
- @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
297
- @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
298
- @options data {String} subject: Subject of the campaign [Mandatory]
299
- @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
300
- @options data {String} reply_to: The reply to email in the campaign emails [Optional]
301
- @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
302
- @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
303
- @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
304
- @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
305
- @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
306
- @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
307
- @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
308
- */
309
public function create_trigger_campaign( $data ) {
310
return $this->post( 'campaign', json_encode( $data ) );
311
}
312
313
/*
314
- Update and schedule your Trigger campaigns.
315
- @param {Array} data contains php array with key value pair.
316
- @options data {Integer} id: Id of Trigger campaign to be modified [Mandatory]
317
- @options data {String} category: Tag name of the campaign [Optional]
318
- @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
319
- @options data {String} trigger_name: Name of the campaign [Mandatory]
320
- @options data {String} bat Email address for test mail [Optional]
321
- @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
322
- @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
323
- @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
324
- @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
325
- @options data {String} subject: Subject of the campaign [Mandatory]
326
- @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
327
- @options data {String} reply_to: The reply to email in the campaign emails [Optional]
328
- @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
329
- @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
330
- @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
331
- @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
332
- @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
333
- @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
334
- @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
335
- */
336
public function update_trigger_campaign( $data ) {
337
$id = $data['id'];
338
unset( $data['id'] );
@@ -340,48 +340,48 @@ class Mailin {
340
}
341
342
/*
343
- Get all folders detail.
344
- @param {Array} data contains php array with key value pair.
345
- @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory]
346
- @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
347
- */
348
public function get_folders( $data ) {
349
return $this->get( 'folder', json_encode( $data ) );
350
}
351
352
/*
353
- Get a particular folder detail.
354
- @param {Array} data contains php array with key value pair.
355
- @options data {Integer} id: Id of folder to get details [Mandatory]
356
- */
357
public function get_folder( $data ) {
358
return $this->get( 'folder/' . $data['id'], '' );
359
}
360
361
/*
362
- Create a new folder.
363
- @param {Array} data contains php array with key value pair.
364
- @options data {String} name: Desired name of the folder to be created [Mandatory]
365
- */
366
public function create_folder( $data ) {
367
return $this->post( 'folder', json_encode( $data ) );
368
}
369
370
/*
371
- Delete a specific folder information.
372
- @param {Array} data contains php array with key value pair.
373
- @options data {Integer} id: Id of folder to be deleted [Mandatory]
374
- */
375
public function delete_folder( $data ) {
376
return $this->delete( 'folder/' . $data['id'], '' );
377
}
378
379
/*
380
- Update an existing folder.
381
- @param {Array} data contains php array with key value pair.
382
- @options data {Integer} id: Id of folder to be modified [Mandatory]
383
- @options data {String} name: Desired name of the folder to be modified [Mandatory]
384
- */
385
public function update_folder( $data ) {
386
$id = $data['id'];
387
unset( $data['id'] );
@@ -389,42 +389,42 @@ class Mailin {
389
}
390
391
/*
392
- Get all lists detail.
393
- @param {Array} data contains php array with key value pair.
394
- @options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional]
395
- @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
396
- @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
397
- */
398
public function get_lists( $data ) {
399
return $this->get( 'list', json_encode( $data ) );
400
}
401
402
/*
403
- Get a particular list detail.
404
- @param {Array} data contains php array with key value pair.
405
- @options data {Integer} id: Id of list to get details [Mandatory]
406
- */
407
public function get_list( $data ) {
408
return $this->get( 'list/' . $data['id'], '' );
409
}
410
411
/*
412
- Create a new list.
413
- @param {Array} data contains php array with key value pair.
414
- @options data {String} list_name: Desired name of the list to be created [Mandatory]
415
- @options data {Integer} list_parent: Folder ID [Mandatory]
416
- */
417
public function create_list( $data ) {
418
return $this->post( 'list', json_encode( $data ) );
419
}
420
421
/*
422
- Update a list.
423
- @param {Array} data contains php array with key value pair.
424
- @options data {Integer} id: Id of list to be modified [Mandatory]
425
- @options data {String} list_name: Desired name of the list to be modified [Optional]
426
- @options data {Integer} list_parent: Folder ID [Mandatory]
427
- */
428
public function update_list( $data ) {
429
$id = $data['id'];
430
unset( $data['id'] );
@@ -432,32 +432,32 @@ class Mailin {
432
}
433
434
/*
435
- Delete a specific list.
436
- @param {Array} data contains php array with key value pair.
437
- @options data {Integer} id: Id of list to be deleted [Mandatory]
438
- */
439
public function delete_list( $data ) {
440
return $this->delete( 'list/' . $data['id'], '' );
441
}
442
443
/*
444
- Display details of all users for the given lists.
445
- @param {Array} data contains php array with key value pair.
446
- @options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory]
447
- @options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional]
448
- @options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional]
449
- @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
450
- */
451
public function display_list_users( $data ) {
452
return $this->post( 'list/display', json_encode( $data ) );
453
}
454
455
/*
456
- Add already existing users in the SendinBlue contacts to the list.
457
- @param {Array} data contains php array with key value pair.
458
- @options data {Integer} id: Id of list to link users in it [Mandatory]
459
- @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
460
- */
461
462
public function add_users_list( $data ) {
463
$id = $data['id'];
@@ -466,11 +466,11 @@ class Mailin {
466
}
467
468
/*
469
- Delete already existing users in the SendinBlue contacts from the list.
470
- @param {Array} data contains php array with key value pair.
471
- @options data {Integer} id: Id of list to unlink users from it [Mandatory]
472
- @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
473
- */
474
public function delete_users_list( $data ) {
475
$id = $data['id'];
476
unset( $data['id'] );
@@ -478,38 +478,38 @@ class Mailin {
478
}
479
480
/*
481
- Access all the attributes information under the account.
482
- No input required
483
- */
484
public function get_attributes() {
485
return $this->get( 'attribute', '' );
486
}
487
488
/*
489
- Access the specific type of attribute information.
490
- @param {Array} data contains php array with key value pair.
491
- @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional]
492
- */
493
public function get_attribute( $data ) {
494
return $this->get( 'attribute/' . $data['type'], '' );
495
}
496
497
/*
498
- Create an Attribute.
499
- @param {Array} data contains php array with key value pair.
500
- @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory]
501
- @options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your SendinBlue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′).
502
- The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory]
503
- */
504
public function create_attribute( $data ) {
505
return $this->post( 'attribute/', json_encode( $data ) );
506
}
507
508
/*
509
- Delete a specific type of attribute information.
510
- @param {Array} data contains php array with key value pair.
511
- @options data {Integer} type: Type of attribute to be deleted [Mandatory]
512
- */
513
public function delete_attribute( $type, $data ) {
514
$type = $data['type'];
515
unset( $data['type'] );
@@ -517,128 +517,128 @@ class Mailin {
517
}
518
519
/*
520
- Create a new user if an email provided as input, doesn’t exists in the contact list of your SendinBlue account, otherwise it will update the existing user.
521
- @param {Array} data contains php array with key value pair.
522
- @options data {String} email: Email address of the user to be created in SendinBlue contacts. Already existing email address of user in the SendinBlue contacts to be modified [Mandatory]
523
- @options data {Array} attributes: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
524
- @options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional]
525
- @options data {Array} listid: The list id(s) to be linked from user [Optional]
526
- @options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional]
527
- @options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional]
528
- */
529
public function create_update_user( $data ) {
530
return $this->post( 'user/createdituser', json_encode( $data ) );
531
}
532
533
/*
534
- Get Access a specific user Information.
535
- @param {Array} data contains php array with key value pair.
536
- @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory]
537
- */
538
public function get_user( $data ) {
539
return $this->get( 'user/' . $data['email'], '' );
540
}
541
542
/*
543
- Unlink existing user from all lists.
544
- @param {Array} data contains php array with key value pair.
545
- @options data {String} email: Email address of the already existing user in the SendinBlue contacts to be unlinked from all lists [Mandatory]
546
- */
547
public function delete_user( $data ) {
548
return $this->delete( 'user/' . $data['email'], '' );
549
}
550
551
/*
552
- Import Users Information.
553
- @param {Array} data contains php array with key value pair.
554
- @options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty]
555
- @options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty]
556
- @options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty]
557
- @options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method
558
- @options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty]
559
- @options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional]
560
- */
561
public function import_users( $data ) {
562
return $this->post( 'user/import', json_encode( $data ) );
563
}
564
565
/*
566
- Export Users Information.
567
- @param {Array} data contains php array with key value pair.
568
- @options data {String} export_attrib: The name of attribute present in your SendinBlue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional]
569
- @options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory]
570
- @options data {String} notify_url: URL that will be called once the export process is finished [Optional]
571
- */
572
public function export_users( $data ) {
573
return $this->post( 'user/export', json_encode( $data ) );
574
}
575
576
/*
577
- Get all the processes information under the account.
578
- @param {Array} data contains php array with key value pair.
579
- @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
580
- @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
581
- */
582
public function get_processes( $data ) {
583
return $this->get( 'process', json_encode( $data ) );
584
}
585
586
/*
587
- Get the process information.
588
- @param {Array} data contains php array with key value pair.
589
- @options data {Integer} id: Id of process to get details [Mandatory]
590
- */
591
public function get_process( $data ) {
592
return $this->get( 'process/' . $data['id'], '' );
593
}
594
595
/*
596
- To retrieve details of all webhooks.
597
- @param {Array} data contains php array with key value pair.
598
- @options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional]
599
- */
600
public function get_webhooks( $data ) {
601
return $this->get( 'webhook', json_encode( $data ) );
602
}
603
604
/*
605
- To retrieve details of any particular webhook.
606
- @param {Array} data contains php array with key value pair.
607
- @options data {Integer} id: Id of webhook to get details [Mandatory]
608
- */
609
public function get_webhook( $data ) {
610
return $this->get( 'webhook/' . $data['id'], '' );
611
}
612
613
/*
614
- Create a Webhook.
615
- @param {Array} data contains php array with key value pair.
616
- @options data {String} url: URL that will be triggered by a webhook [Mandatory]
617
- @options data {String} description: Webook description [Optional]
618
- @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
619
- @options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional]
620
- */
621
public function create_webhook( $data ) {
622
return $this->post( 'webhook', json_encode( $data ) );
623
}
624
625
/*
626
- Delete a webhook.
627
- @param {Array} data contains php array with key value pair.
628
- @options data {Integer} id: Id of webhook to be deleted [Mandatory]
629
- */
630
public function delete_webhook( $data ) {
631
return $this->delete( 'webhook/' . $data['id'], '' );
632
}
633
634
/*
635
- Update a webhook.
636
- @param {Array} data contains php array with key value pair.
637
- @options data {Integer} id: Id of webhook to be modified [Mandatory]
638
- @options data {String} url: URL that will be triggered by a webhook [Mandatory]
639
- @options data {String} description: Webook description [Optional]
640
- @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
641
- */
642
public function update_webhook( $data ) {
643
$id = $data['id'];
644
unset( $data['id'] );
@@ -646,32 +646,32 @@ class Mailin {
646
}
647
648
/*
649
- Get Access of created senders information.
650
- @param {Array} data contains php array with key value pair.
651
- @options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional]
652
- */
653
public function get_senders( $data ) {
654
return $this->get( 'advanced', json_encode( $data ) );
655
}
656
657
/*
658
- Create your Senders.
659
- @param {Array} data contains php array with key value pair.
660
- @options data {String} name: Name of the sender [Mandatory]
661
- @options data {String} email: Email address of the sender [Mandatory]
662
- @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
663
- */
664
public function create_sender( $data ) {
665
return $this->post( 'advanced', json_encode( $data ) );
666
}
667
668
/*
669
- Update your Senders.
670
- @param {Array} data contains php array with key value pair.
671
- @options data {Integer} id: Id of sender to be modified [Mandatory]
672
- @options data {String} name: Name of the sender [Mandatory]
673
- @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
674
- */
675
public function update_sender( $data ) {
676
$id = $data['id'];
677
unset( $data['id'] );
@@ -679,83 +679,83 @@ class Mailin {
679
}
680
681
/*
682
- Delete your Sender Information.
683
- @param {Array} data contains php array with key value pair.
684
- @options data {Integer} id: Id of sender to be deleted [Mandatory]
685
- */
686
public function delete_sender( $data ) {
687
return $this->delete( 'advanced/' . $data['id'], '' );
688
}
689
690
/*
691
- Send Transactional Email.
692
- @param {Array} data contains php array with key value pair.
693
- @options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory]
694
- @options data {String} subject: Message subject [Mandatory]
695
- @options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory]
696
- @options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use <img src="{YourFileName.Extension}" alt="image" border="0" >, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter
697
- @options data {String} text: Body of the message. (text version) [Optional]
698
- @options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional]
699
- @options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional]
700
- @options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional]
701
- @options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar, and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional]
702
- @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional]
703
- @options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional]
704
- */
705
public function send_email( $data ) {
706
return $this->post( 'email', json_encode( $data ) );
707
}
708
709
/*
710
- Aggregate / date-wise report of the SendinBlue SMTP account.
711
- @param {Array} data contains php array with key value pair.
712
- @options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional]
713
- @options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
714
- @options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
715
- @options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional]
716
- @options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional]
717
- */
718
public function get_statistics( $data ) {
719
return $this->post( 'statistics', json_encode( $data ) );
720
}
721
722
/*
723
- Get Email Event report.
724
- @param {Array} data contains php array with key value pair.
725
- @options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional]
726
- @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
727
- @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
728
- @options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional]
729
- @options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional]
730
- @options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional]
731
- @options data {String} email: Email address to search report for [Optional]
732
- */
733
public function get_report( $data ) {
734
return $this->post( 'report', json_encode( $data ) );
735
}
736
737
/*
738
- Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures.
739
- @param {Array} data contains php array with key value pair.
740
- @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
741
- @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
742
- @options data {String} email: Email address to delete its bounces [Optional]
743
- */
744
public function delete_bounces( $data ) {
745
return $this->post( 'bounces', json_encode( $data ) );
746
}
747
748
/*
749
- Send templates created on SendinBlue, through SendinBlue SMTP (transactional mails).
750
- @param {Array} data contains php array with key value pair.
751
- @options data {Integer} id: Id of the template created on SendinBlue account [Mandatory]
752
- @options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory]
753
- @options data {String} cc: Same as to but for Cc [Optional]
754
- @options data {String} bcc: Same as to but for Bcc [Optional]
755
- @options data {Array} attrv The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
756
- @options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional]
757
- @options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional]
758
- */
759
public function send_transactional_template( $data ) {
760
$id = $data['id'];
761
unset( $data['id'] );
@@ -763,40 +763,40 @@ class Mailin {
763
}
764
765
/*
766
- Create a Template.
767
- @param {Array} data contains php array with key value pair.
768
- @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
769
- @options data {String} template_name: Name of the Template [Mandatory]
770
- @options data {String} bat: Email address for test mail [Optional]
771
- @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
772
- @options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty]
773
- @options data {String} subject: Subject of the campaign [Mandatory]
774
- @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
775
- @options data {String} reply_to: The reply to email in the campaign emails [Optional]
776
- @options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
777
- @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
778
- @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
779
- */
780
public function create_template( $data ) {
781
return $this->post( 'template', json_encode( $data ) );
782
}
783
784
/*
785
- Update a Template.
786
- @param {Array} data contains php array with key value pair.
787
- @options data {Integer} id: Id of Template to be modified [Mandatory]
788
- @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
789
- @options data {String} template_name: Name of the Template [Mandatory]
790
- @options data {String} bat: Email address for test mail [Optional]
791
- @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
792
- @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
793
- @options data {String} subject: Subject of the campaign [Mandatory]
794
- @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
795
- @options data {String} reply_to: The reply to email in the campaign emails [Optional]
796
- @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
797
- @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
798
- @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
799
- */
800
public function update_template( $data ) {
801
$id = $data['id'];
802
unset( $data['id'] );
@@ -804,48 +804,48 @@ class Mailin {
804
}
805
806
/*
807
- Send a transactional SMS.
808
- @param {Array} data contains php array with key value pair.
809
- @options data {String} to: The mobile number to send SMS to with country code [Mandatory]
810
- @options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory]
811
- @options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory]
812
- @options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional]
813
- @options data {String} tag: The tag that you can associate with the message [Optional]
814
- @options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional]
815
- */
816
public function send_sms( $data ) {
817
return $this->post( 'sms', json_encode( $data ) );
818
}
819
820
/*
821
- Create & Schedule your SMS campaigns.
822
- @param {Array} data contains php array with key value pair.
823
- @options data {String} name: Name of the SMS campaign [Mandatory]
824
- @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
825
- @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
826
- @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
827
- @options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
828
- @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
829
- @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
830
- @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
831
- */
832
public function create_sms_campaign( $data ) {
833
return $this->post( 'sms', json_encode( $data ) );
834
}
835
836
/*
837
- Update your SMS campaigns.
838
- @param {Array} data contains php array with key value pair.
839
- @options data {Integer} id: Id of the SMS campaign [Mandatory]
840
- @options data {String} name: Name of the SMS campaign [Optional]
841
- @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
842
- @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
843
- @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
844
- @options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
845
- @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
846
- @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
847
- @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
848
- */
849
public function update_sms_campaign( $data ) {
850
$id = $data['id'];
851
unset( $data['id'] );
@@ -853,11 +853,11 @@ class Mailin {
853
}
854
855
/*
856
- Send a Test SMS.
857
- @param {Array} data contains php array with key value pair.
858
- @options data {Integer} id: Id of the SMS campaign [Mandatory]
859
- @options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Mandatory]
860
- */
861
public function send_bat_sms( $data ) {
862
$id = $data['id'];
863
unset( $data['id'] );
55
}
56
57
/*
58
+ Get Account.
59
+ No input required
60
+ */
61
public function get_account() {
62
return $this->get( 'account', '' );
63
}
64
65
/*
66
+ Get SMTP details.
67
+ No input required
68
+ */
69
public function get_smtp_details() {
70
return $this->get( 'account/smtpdetail', '' );
71
}
72
73
/*
74
+ Create Child Account.
75
+ @param {Array} data contains php array with key value pair.
76
+ @options data {String} child_email: Email address of Reseller child [Mandatory]
77
+ @options data {String} password: Password of Reseller child to login [Mandatory]
78
+ @options data {String} company_org: Name of Reseller child’s company [Mandatory]
79
+ @options data {String} first_name: First name of Reseller child [Mandatory]
80
+ @options data {String} last_name: Last name of Reseller child [Mandatory]
81
+ @options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional]
82
+ - email_credit {Integer} number of email credits
83
+ - sms_credit {Integer} Number of sms credts
84
+ @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
85
+ */
86
public function create_child_account( $data ) {
87
return $this->post( 'account', json_encode( $data ) );
88
}
89
90
/*
91
+ Update Child Account.
92
+ @param {Array} data contains php array with key value pair.
93
+ @options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory]
94
+ @options data {String} company_org: Name of Reseller child’s company [Optional]
95
+ @options data {String} first_name: First name of Reseller child [Optional]
96
+ @options data {String} last_name: Last name of Reseller child [Optional]
97
+ @options data {String} password: Password of Reseller child to login [Optional]
98
+ @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
99
+ @options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional]
100
+ */
101
public function update_child_account( $data ) {
102
return $this->put( 'account', json_encode( $data ) );
103
}
104
105
/*
106
+ Delete Child Account.
107
+ @param {Array} data contains php array with key value pair.
108
+ @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory]
109
+ */
110
public function delete_child_account( $data ) {
111
return $this->delete( 'account/' . $data['auth_key'], '' );
112
}
113
114
/*
115
+ Get Reseller child Account.
116
+ @param {Array} data contains php array with key value pair.
117
+ @options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory]
118
+ */
119
public function get_reseller_child( $data ) {
120
return $this->post( 'account/getchildv2', json_encode( $data ) );
121
}
122
123
/*
124
+ Add/Remove Reseller child's Email/Sms credits.
125
+ @param {Array} data contains php array with key value pair.
126
+ @options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory]
127
+ @options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty]
128
+ - email_credit {Integer} number of email credits
129
+ - sms_credit {Integer} Number of sms credts
130
+ @options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty]
131
+ - email_credit {Integer} number of email credits
132
+ - sms_credit {Integer} Number of sms credts
133
+ */
134
public function add_remove_child_credits( $data ) {
135
return $this->post( 'account/addrmvcredit', json_encode( $data ) );
136
}
137
138
/*
139
+ Get a particular campaign detail.
140
+ @param {Array} data contains php array with key value pair.
141
+ @options data {Integer} id: Unique Id of the campaign [Mandatory]
142
+ */
143
public function get_campaign_v2( $data ) {
144
return $this->get( 'campaign/' . $data['id'] . '/detailsv2', '' );
145
}
146
147
/*
148
+ Get all campaigns detail.
149
+ @param {Array} data contains php array with key value pair.
150
+ @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional]
151
+ @options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional]
152
+ @options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional]
153
+ @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
154
+ */
155
public function get_campaigns_v2( $data ) {
156
return $this->get( 'campaign/detailsv2', json_encode( $data ) );
157
}
158
159
/*
160
+ Create and Schedule your campaigns. It returns the ID of the created campaign.
161
+ @param {Array} data contains php array with key value pair.
162
+ @options data {String} category: Tag name of the campaign [Optional]
163
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
164
+ @options data {String} name: Name of the campaign [Mandatory]
165
+ @options data {String} bat: Email address for test mail [Optional]
166
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
167
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
168
+ @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
169
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
170
+ @options data {String} subject: Subject of the campaign [Mandatory]
171
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
172
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
173
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in SendinBlue account [Optional]
174
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
175
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
176
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
177
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
178
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
179
+
180
+ */
181
public function create_campaign( $data ) {
182
return $this->post( 'campaign', json_encode( $data ) );
183
}
184
185
/*
186
+ Update your campaign.
187
+ @param {Array} data contains php array with key value pair.
188
+ @options data {Integer} id: Id of campaign to be modified [Mandatory]
189
+ @options data {String} category: Tag name of the campaign [Optional]
190
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
191
+ @options data {String} name: Name of the campaign [Optional]
192
+ @options data {String} bat: Email address for test mail [Optional]
193
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional]
194
+ @options data {String} html_url: Url which content is the body of content [Optional]
195
+ @options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
196
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
197
+ @options data {String} subject: Subject of the campaign.
198
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
199
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
200
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
201
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
202
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
203
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
204
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
205
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
206
+ */
207
public function update_campaign( $data ) {
208
$id = $data['id'];
209
unset( $data['id'] );
211
}
212
213
/*
214
+ Delete your campaigns.
215
+ @param {Array} data contains php array with key value pair.
216
+ @options data {Integer} id: Id of campaign to be deleted [Mandatory]
217
+ */
218
public function delete_campaign( $data ) {
219
return $this->delete( 'campaign/' . $data['id'], '' );
220
}
221
222
/*
223
+ Send report of Sent and Archived campaign.
224
+ @param {Array} data contains php array with key value pair.
225
+ @options data {Integer} id: Id of campaign to send its report [Mandatory]
226
+ @options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional]
227
+ @options data {String} email_subject: Message subject [Mandatory]
228
+ @options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
229
+ @options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory]
230
+ @options data {Array} email_bcc: Same as email_to but for Bcc [Optional]
231
+ @options data {Array} email_cc: Same as email_to but for Cc [Optional]
232
+ @options data {String} email_body: Body of the message [Mandatory]
233
+ */
234
public function campaign_report_email( $data ) {
235
$id = $data['id'];
236
unset( $data['id'] );
238
}
239
240
/*
241
+ Export the recipients of a specified campaign.
242
+ @param {Array} data contains php array with key value pair.
243
+ @options data {Integer} id: Id of campaign to export its recipients [Mandatory]
244
+ @options data {String} notify_url: URL that will be called once the export process is finished [Mandatory]
245
+ @options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory]
246
+ */
247
public function campaign_recipients_export( $data ) {
248
$id = $data['id'];
249
unset( $data['id'] );
251
}
252
253
/*
254
+ Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available.
255
+ @param {Array} data contains php array with key value pair.
256
+ @options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory]
257
+ */
258
259
public function share_campaign( $data ) {
260
return $this->post( 'campaign/sharelinkv2', json_encode( $data ) );
261
}
262
263
/*
264
+ Send a Test Campaign.
265
+ @param {Array} data contains php array with key value pair.
266
+ @options data {Integer} id: Id of the campaign [Mandatory]
267
+ @options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
268
+ */
269
public function send_bat_email( $data ) {
270
$id = $data['id'];
271
unset( $data['id'] );
273
}
274
275
/*
276
+ Update the Campaign status.
277
+ @param {Array} data contains php array with key value pair.
278
+ @options data {Integer} id: Id of campaign to update its status [Mandatory]
279
+ @options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory]
280
+ */
281
public function update_campaign_status( $data ) {
282
$id = $data['id'];
283
unset( $data['id'] );
285
}
286
287
/*
288
+ Create and schedule your Trigger campaigns.
289
+ @param {Array} data contains php array with key value pair.
290
+ @options data {String} category: Tag name of the campaign [Optional]
291
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
292
+ @options data {String} trigger_name: Name of the campaign [Mandatory]
293
+ @options data {String} bat: Email address for test mail [Optional]
294
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
295
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
296
+ @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
297
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
298
+ @options data {String} subject: Subject of the campaign [Mandatory]
299
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
300
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
301
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
302
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
303
+ @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
304
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
305
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
306
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
307
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
308
+ */
309
public function create_trigger_campaign( $data ) {
310
return $this->post( 'campaign', json_encode( $data ) );
311
}
312
313
/*
314
+ Update and schedule your Trigger campaigns.
315
+ @param {Array} data contains php array with key value pair.
316
+ @options data {Integer} id: Id of Trigger campaign to be modified [Mandatory]
317
+ @options data {String} category: Tag name of the campaign [Optional]
318
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
319
+ @options data {String} trigger_name: Name of the campaign [Mandatory]
320
+ @options data {String} bat Email address for test mail [Optional]
321
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
322
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
323
+ @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
324
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
325
+ @options data {String} subject: Subject of the campaign [Mandatory]
326
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
327
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
328
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
329
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
330
+ @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
331
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
332
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
333
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
334
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
335
+ */
336
public function update_trigger_campaign( $data ) {
337
$id = $data['id'];
338
unset( $data['id'] );
340
}
341
342
/*
343
+ Get all folders detail.
344
+ @param {Array} data contains php array with key value pair.
345
+ @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory]
346
+ @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
347
+ */
348
public function get_folders( $data ) {
349
return $this->get( 'folder', json_encode( $data ) );
350
}
351
352
/*
353
+ Get a particular folder detail.
354
+ @param {Array} data contains php array with key value pair.
355
+ @options data {Integer} id: Id of folder to get details [Mandatory]
356
+ */
357
public function get_folder( $data ) {
358
return $this->get( 'folder/' . $data['id'], '' );
359
}
360
361
/*
362
+ Create a new folder.
363
+ @param {Array} data contains php array with key value pair.
364
+ @options data {String} name: Desired name of the folder to be created [Mandatory]
365
+ */
366
public function create_folder( $data ) {
367
return $this->post( 'folder', json_encode( $data ) );
368
}
369
370
/*
371
+ Delete a specific folder information.
372
+ @param {Array} data contains php array with key value pair.
373
+ @options data {Integer} id: Id of folder to be deleted [Mandatory]
374
+ */
375
public function delete_folder( $data ) {
376
return $this->delete( 'folder/' . $data['id'], '' );
377
}
378
379
/*
380
+ Update an existing folder.
381
+ @param {Array} data contains php array with key value pair.
382
+ @options data {Integer} id: Id of folder to be modified [Mandatory]
383
+ @options data {String} name: Desired name of the folder to be modified [Mandatory]
384
+ */
385
public function update_folder( $data ) {
386
$id = $data['id'];
387
unset( $data['id'] );
389
}
390
391
/*
392
+ Get all lists detail.
393
+ @param {Array} data contains php array with key value pair.
394
+ @options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional]
395
+ @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
396
+ @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
397
+ */
398
public function get_lists( $data ) {
399
return $this->get( 'list', json_encode( $data ) );
400
}
401
402
/*
403
+ Get a particular list detail.
404
+ @param {Array} data contains php array with key value pair.
405
+ @options data {Integer} id: Id of list to get details [Mandatory]
406
+ */
407
public function get_list( $data ) {
408
return $this->get( 'list/' . $data['id'], '' );
409
}
410
411
/*
412
+ Create a new list.
413
+ @param {Array} data contains php array with key value pair.
414
+ @options data {String} list_name: Desired name of the list to be created [Mandatory]
415
+ @options data {Integer} list_parent: Folder ID [Mandatory]
416
+ */
417
public function create_list( $data ) {
418
return $this->post( 'list', json_encode( $data ) );
419
}
420
421
/*
422
+ Update a list.
423
+ @param {Array} data contains php array with key value pair.
424
+ @options data {Integer} id: Id of list to be modified [Mandatory]
425
+ @options data {String} list_name: Desired name of the list to be modified [Optional]
426
+ @options data {Integer} list_parent: Folder ID [Mandatory]
427
+ */
428
public function update_list( $data ) {
429
$id = $data['id'];
430
unset( $data['id'] );
432
}
433
434
/*
435
+ Delete a specific list.
436
+ @param {Array} data contains php array with key value pair.
437
+ @options data {Integer} id: Id of list to be deleted [Mandatory]
438
+ */
439
public function delete_list( $data ) {
440
return $this->delete( 'list/' . $data['id'], '' );
441
}
442
443
/*
444
+ Display details of all users for the given lists.
445
+ @param {Array} data contains php array with key value pair.
446
+ @options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory]
447
+ @options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional]
448
+ @options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional]
449
+ @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
450
+ */
451
public function display_list_users( $data ) {
452
return $this->post( 'list/display', json_encode( $data ) );
453
}
454
455
/*
456
+ Add already existing users in the SendinBlue contacts to the list.
457
+ @param {Array} data contains php array with key value pair.
458
+ @options data {Integer} id: Id of list to link users in it [Mandatory]
459
+ @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
460
+ */
461
462
public function add_users_list( $data ) {
463
$id = $data['id'];
466
}
467
468
/*
469
+ Delete already existing users in the SendinBlue contacts from the list.
470
+ @param {Array} data contains php array with key value pair.
471
+ @options data {Integer} id: Id of list to unlink users from it [Mandatory]
472
+ @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
473
+ */
474
public function delete_users_list( $data ) {
475
$id = $data['id'];
476
unset( $data['id'] );
478
}
479
480
/*
481
+ Access all the attributes information under the account.
482
+ No input required
483
+ */
484
public function get_attributes() {
485
return $this->get( 'attribute', '' );
486
}
487
488
/*
489
+ Access the specific type of attribute information.
490
+ @param {Array} data contains php array with key value pair.
491
+ @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional]
492
+ */
493
public function get_attribute( $data ) {
494
return $this->get( 'attribute/' . $data['type'], '' );
495
}
496
497
/*
498
+ Create an Attribute.
499
+ @param {Array} data contains php array with key value pair.
500
+ @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory]
501
+ @options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your SendinBlue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′).
502
+ The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory]
503
+ */
504
public function create_attribute( $data ) {
505
return $this->post( 'attribute/', json_encode( $data ) );
506
}
507
508
/*
509
+ Delete a specific type of attribute information.
510
+ @param {Array} data contains php array with key value pair.
511
+ @options data {Integer} type: Type of attribute to be deleted [Mandatory]
512
+ */
513
public function delete_attribute( $type, $data ) {
514
$type = $data['type'];
515
unset( $data['type'] );
517
}
518
519
/*
520
+ Create a new user if an email provided as input, doesn’t exists in the contact list of your SendinBlue account, otherwise it will update the existing user.
521
+ @param {Array} data contains php array with key value pair.
522
+ @options data {String} email: Email address of the user to be created in SendinBlue contacts. Already existing email address of user in the SendinBlue contacts to be modified [Mandatory]
523
+ @options data {Array} attributes: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
524
+ @options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional]
525
+ @options data {Array} listid: The list id(s) to be linked from user [Optional]
526
+ @options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional]
527
+ @options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional]
528
+ */
529
public function create_update_user( $data ) {
530
return $this->post( 'user/createdituser', json_encode( $data ) );
531
}
532
533
/*
534
+ Get Access a specific user Information.
535
+ @param {Array} data contains php array with key value pair.
536
+ @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory]
537
+ */
538
public function get_user( $data ) {
539
return $this->get( 'user/' . $data['email'], '' );
540
}
541
542
/*
543
+ Unlink existing user from all lists.
544
+ @param {Array} data contains php array with key value pair.
545
+ @options data {String} email: Email address of the already existing user in the SendinBlue contacts to be unlinked from all lists [Mandatory]
546
+ */
547
public function delete_user( $data ) {
548
return $this->delete( 'user/' . $data['email'], '' );
549
}
550
551
/*
552
+ Import Users Information.
553
+ @param {Array} data contains php array with key value pair.
554
+ @options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty]
555
+ @options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty]
556
+ @options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty]
557
+ @options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method
558
+ @options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty]
559
+ @options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional]
560
+ */
561
public function import_users( $data ) {
562
return $this->post( 'user/import', json_encode( $data ) );
563
}
564
565
/*
566
+ Export Users Information.
567
+ @param {Array} data contains php array with key value pair.
568
+ @options data {String} export_attrib: The name of attribute present in your SendinBlue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional]
569
+ @options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory]
570
+ @options data {String} notify_url: URL that will be called once the export process is finished [Optional]
571
+ */
572
public function export_users( $data ) {
573
return $this->post( 'user/export', json_encode( $data ) );
574
}
575
576
/*
577
+ Get all the processes information under the account.
578
+ @param {Array} data contains php array with key value pair.
579
+ @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
580
+ @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
581
+ */
582
public function get_processes( $data ) {
583
return $this->get( 'process', json_encode( $data ) );
584
}
585
586
/*
587
+ Get the process information.
588
+ @param {Array} data contains php array with key value pair.
589
+ @options data {Integer} id: Id of process to get details [Mandatory]
590
+ */
591
public function get_process( $data ) {
592
return $this->get( 'process/' . $data['id'], '' );
593
}
594
595
/*
596
+ To retrieve details of all webhooks.
597
+ @param {Array} data contains php array with key value pair.
598
+ @options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional]
599
+ */
600
public function get_webhooks( $data ) {
601
return $this->get( 'webhook', json_encode( $data ) );
602
}
603
604
/*
605
+ To retrieve details of any particular webhook.
606
+ @param {Array} data contains php array with key value pair.
607
+ @options data {Integer} id: Id of webhook to get details [Mandatory]
608
+ */
609
public function get_webhook( $data ) {
610
return $this->get( 'webhook/' . $data['id'], '' );
611
}
612
613
/*
614
+ Create a Webhook.
615
+ @param {Array} data contains php array with key value pair.
616
+ @options data {String} url: URL that will be triggered by a webhook [Mandatory]
617
+ @options data {String} description: Webook description [Optional]
618
+ @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
619
+ @options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional]
620
+ */
621
public function create_webhook( $data ) {
622
return $this->post( 'webhook', json_encode( $data ) );
623
}
624
625
/*
626
+ Delete a webhook.
627
+ @param {Array} data contains php array with key value pair.
628
+ @options data {Integer} id: Id of webhook to be deleted [Mandatory]
629
+ */
630
public function delete_webhook( $data ) {
631
return $this->delete( 'webhook/' . $data['id'], '' );
632
}
633
634
/*
635
+ Update a webhook.
636
+ @param {Array} data contains php array with key value pair.
637
+ @options data {Integer} id: Id of webhook to be modified [Mandatory]
638
+ @options data {String} url: URL that will be triggered by a webhook [Mandatory]
639
+ @options data {String} description: Webook description [Optional]
640
+ @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
641
+ */
642
public function update_webhook( $data ) {
643
$id = $data['id'];
644
unset( $data['id'] );
646
}
647
648
/*
649
+ Get Access of created senders information.
650
+ @param {Array} data contains php array with key value pair.
651
+ @options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional]
652
+ */
653
public function get_senders( $data ) {
654
return $this->get( 'advanced', json_encode( $data ) );
655
}
656
657
/*
658
+ Create your Senders.
659
+ @param {Array} data contains php array with key value pair.
660
+ @options data {String} name: Name of the sender [Mandatory]
661
+ @options data {String} email: Email address of the sender [Mandatory]
662
+ @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
663
+ */
664
public function create_sender( $data ) {
665
return $this->post( 'advanced', json_encode( $data ) );
666
}
667
668
/*
669
+ Update your Senders.
670
+ @param {Array} data contains php array with key value pair.
671
+ @options data {Integer} id: Id of sender to be modified [Mandatory]
672
+ @options data {String} name: Name of the sender [Mandatory]
673
+ @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
674
+ */
675
public function update_sender( $data ) {
676
$id = $data['id'];
677
unset( $data['id'] );
679
}
680
681
/*
682
+ Delete your Sender Information.
683
+ @param {Array} data contains php array with key value pair.
684
+ @options data {Integer} id: Id of sender to be deleted [Mandatory]
685
+ */
686
public function delete_sender( $data ) {
687
return $this->delete( 'advanced/' . $data['id'], '' );
688
}
689
690
/*
691
+ Send Transactional Email.
692
+ @param {Array} data contains php array with key value pair.
693
+ @options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory]
694
+ @options data {String} subject: Message subject [Mandatory]
695
+ @options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory]
696
+ @options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use <img src="{YourFileName.Extension}" alt="image" border="0" >, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter
697
+ @options data {String} text: Body of the message. (text version) [Optional]
698
+ @options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional]
699
+ @options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional]
700
+ @options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional]
701
+ @options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar, and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional]
702
+ @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional]
703
+ @options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional]
704
+ */
705
public function send_email( $data ) {
706
return $this->post( 'email', json_encode( $data ) );
707
}
708
709
/*
710
+ Aggregate / date-wise report of the SendinBlue SMTP account.
711
+ @param {Array} data contains php array with key value pair.
712
+ @options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional]
713
+ @options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
714
+ @options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
715
+ @options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional]
716
+ @options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional]
717
+ */
718
public function get_statistics( $data ) {
719
return $this->post( 'statistics', json_encode( $data ) );
720
}
721
722
/*
723
+ Get Email Event report.
724
+ @param {Array} data contains php array with key value pair.
725
+ @options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional]
726
+ @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
727
+ @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
728
+ @options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional]
729
+ @options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional]
730
+ @options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional]
731
+ @options data {String} email: Email address to search report for [Optional]
732
+ */
733
public function get_report( $data ) {
734
return $this->post( 'report', json_encode( $data ) );
735
}
736
737
/*
738
+ Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures.
739
+ @param {Array} data contains php array with key value pair.
740
+ @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
741
+ @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
742
+ @options data {String} email: Email address to delete its bounces [Optional]
743
+ */
744
public function delete_bounces( $data ) {
745
return $this->post( 'bounces', json_encode( $data ) );
746
}
747
748
/*
749
+ Send templates created on SendinBlue, through SendinBlue SMTP (transactional mails).
750
+ @param {Array} data contains php array with key value pair.
751
+ @options data {Integer} id: Id of the template created on SendinBlue account [Mandatory]
752
+ @options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory]
753
+ @options data {String} cc: Same as to but for Cc [Optional]
754
+ @options data {String} bcc: Same as to but for Bcc [Optional]
755
+ @options data {Array} attrv The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
756
+ @options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional]
757
+ @options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional]
758
+ */
759
public function send_transactional_template( $data ) {
760
$id = $data['id'];
761
unset( $data['id'] );
763
}
764
765
/*
766
+ Create a Template.
767
+ @param {Array} data contains php array with key value pair.
768
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
769
+ @options data {String} template_name: Name of the Template [Mandatory]
770
+ @options data {String} bat: Email address for test mail [Optional]
771
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
772
+ @options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty]
773
+ @options data {String} subject: Subject of the campaign [Mandatory]
774
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
775
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
776
+ @options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
777
+ @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
778
+ @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
779
+ */
780
public function create_template( $data ) {
781
return $this->post( 'template', json_encode( $data ) );
782
}
783
784
/*
785
+ Update a Template.
786
+ @param {Array} data contains php array with key value pair.
787
+ @options data {Integer} id: Id of Template to be modified [Mandatory]
788
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
789
+ @options data {String} template_name: Name of the Template [Mandatory]
790
+ @options data {String} bat: Email address for test mail [Optional]
791
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
792
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
793
+ @options data {String} subject: Subject of the campaign [Mandatory]
794
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
795
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
796
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
797
+ @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
798
+ @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
799
+ */
800
public function update_template( $data ) {
801
$id = $data['id'];
802
unset( $data['id'] );
804
}
805
806
/*
807
+ Send a transactional SMS.
808
+ @param {Array} data contains php array with key value pair.
809
+ @options data {String} to: The mobile number to send SMS to with country code [Mandatory]
810
+ @options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory]
811
+ @options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory]
812
+ @options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional]
813
+ @options data {String} tag: The tag that you can associate with the message [Optional]
814
+ @options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional]
815
+ */
816
public function send_sms( $data ) {
817
return $this->post( 'sms', json_encode( $data ) );
818
}
819
820
/*
821
+ Create & Schedule your SMS campaigns.
822
+ @param {Array} data contains php array with key value pair.
823
+ @options data {String} name: Name of the SMS campaign [Mandatory]
824
+ @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
825
+ @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
826
+ @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
827
+ @options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
828
+ @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
829
+ @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
830
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
831
+ */
832
public function create_sms_campaign( $data ) {
833
return $this->post( 'sms', json_encode( $data ) );
834
}
835
836
/*
837
+ Update your SMS campaigns.
838
+ @param {Array} data contains php array with key value pair.
839
+ @options data {Integer} id: Id of the SMS campaign [Mandatory]
840
+ @options data {String} name: Name of the SMS campaign [Optional]
841
+ @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
842
+ @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
843
+ @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
844
+ @options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
845
+ @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
846
+ @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
847
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
848
+ */
849
public function update_sms_campaign( $data ) {
850
$id = $data['id'];
851
unset( $data['id'] );
853
}
854
855
/*
856
+ Send a Test SMS.
857
+ @param {Array} data contains php array with key value pair.
858
+ @options data {Integer} id: Id of the SMS campaign [Mandatory]
859
+ @options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Mandatory]
860
+ */
861
public function send_bat_sms( $data ) {
862
$id = $data['id'];
863
unset( $data['id'] );
menu-icons.php CHANGED
@@ -11,7 +11,7 @@
11
* Plugin name: Menu Icons
12
* Plugin URI: https://github.com/Codeinwp/wp-menu-icons
13
* Description: Spice up your navigation menus with pretty icons, easily.
14
- * Version: 0.11.4
15
* Author: ThemeIsle
16
* Author URI: https://themeisle.com
17
* License: GPLv2
@@ -27,7 +27,7 @@
27
*/
28
final class Menu_Icons {
29
30
- const VERSION = '0.11.4';
31
32
/**
33
* Holds plugin data
@@ -176,4 +176,4 @@ function kucrut_register_sdk( $products ) {
176
177
$products[] = __FILE__;
178
return $products;
179
- }
11
* Plugin name: Menu Icons
12
* Plugin URI: https://github.com/Codeinwp/wp-menu-icons
13
* Description: Spice up your navigation menus with pretty icons, easily.
14
+ * Version: 0.11.5
15
* Author: ThemeIsle
16
* Author URI: https://themeisle.com
17
* License: GPLv2
27
*/
28
final class Menu_Icons {
29
30
+ const VERSION = '0.11.5';
31
32
/**
33
* Holds plugin data
176
177
$products[] = __FILE__;
178
return $products;
179
+ }
readme.md CHANGED
@@ -224,6 +224,11 @@ Add this block of code to your [mu-plugin file](http://codex.wordpress.org/Must_
224
Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
225
226
## Changelog ##
227
### 0.11.4 - 2018-12-10 ###
228
229
* fix issue with composer libraries.
224
Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
225
226
## Changelog ##
227
+ ### 0.11.5 - 2019-05-23 ###
228
+
229
+ * Sync composer dependencies with the latest version
230
+
231
+
232
### 0.11.4 - 2018-12-10 ###
233
234
* fix issue with composer libraries.
readme.txt CHANGED
@@ -224,6 +224,11 @@ add_filter( 'menu_icons_menu_settings', 'my_menu_icons_menu_settings', 10, 2 );
224
Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
225
226
== Changelog ==
227
= 0.11.4 - 2018-12-10 =
228
229
* fix issue with composer libraries.
224
Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
225
226
== Changelog ==
227
+ = 0.11.5 - 2019-05-23 =
228
+
229
+ * Sync composer dependencies with the latest version
230
+
231
+
232
= 0.11.4 - 2018-12-10 =
233
234
* fix issue with composer libraries.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
5
require_once __DIR__ . '/composer' . '/autoload_real.php';
6
7
- return ComposerAutoloaderInit13eb48706f29258ff3a0d5c6cbadd39c::getLoader();
4
5
require_once __DIR__ . '/composer' . '/autoload_real.php';
6
7
+ return ComposerAutoloaderInited3d108ddbcd41f318ae3324c5a3c8ce::getLoader();
vendor/codeinwp/icon-picker/assets/screenshot-1.png ADDED
Binary file
vendor/codeinwp/icon-picker/assets/screenshot-2.png ADDED
Binary file
vendor/codeinwp/icon-picker/js/src/icon-picker.js ADDED
@@ -0,0 +1,101 @@
1
+ require( './media/manifest' );
2
+
3
+ ( function( $ ) {
4
+ var l10n = wp.media.view.l10n.iconPicker,
5
+ templates = {},
6
+ frame, selectIcon, removeIcon, getFrame, updateField, updatePreview, $field;
7
+
8
+ getFrame = function() {
9
+ if ( ! frame ) {
10
+ frame = new wp.media.view.MediaFrame.IconPicker();
11
+
12
+ frame.target.on( 'change', updateField );
13
+ }
14
+
15
+ return frame;
16
+ };
17
+
18
+ updateField = function( model ) {
19
+ _.each( model.get( 'inputs' ), function( $input, key ) {
20
+ $input.val( model.get( key ) );
21
+ });
22
+
23
+ model.clear({ silent: true });
24
+ $field.trigger( 'ipf:update' );
25
+ };
26
+
27
+ updatePreview = function( e ) {
28
+ var $el = $( e.currentTarget ),
29
+ $select = $el.find( 'a.ipf-select' ),
30
+ $remove = $el.find( 'a.ipf-remove' ),
31
+ type = $el.find( 'input.ipf-type' ).val(),
32
+ icon = $el.find( 'input.ipf-icon' ).val(),
33
+ url = $el.find( 'input.url' ).val(),
34
+ template;
35
+
36
+ if ( type === '' || icon === '' || ! _.has( iconPicker.types, type ) ) {
37
+ $remove.addClass( 'hidden' );
38
+ $select
39
+ .removeClass( 'has-icon' )
40
+ .addClass( 'button' )
41
+ .text( l10n.selectIcon )
42
+ .attr( 'title', '' );
43
+
44
+ return;
45
+ }
46
+
47
+ if ( templates[ type ]) {
48
+ template = templates[ type ];
49
+ } else {
50
+ template = templates[ type ] = wp.template( 'iconpicker-' + iconPicker.types[ type ].templateId + '-icon' );
51
+ }
52
+
53
+ $remove.removeClass( 'hidden' );
54
+ $select
55
+ .attr( 'title', l10n.selectIcon )
56
+ .addClass( 'has-icon' )
57
+ .removeClass( 'button' )
58
+ .html( template({
59
+ type: type,
60
+ icon: icon,
61
+ url: url
62
+ }) );
63
+ };
64
+
65
+ selectIcon = function( e ) {
66
+ var frame = getFrame(),
67
+ model = { inputs: {} };
68
+
69
+ e.preventDefault();
70
+
71
+ $field = $( e.currentTarget ).closest( '.ipf' );
72
+ model.id = $field.attr( 'id' );
73
+
74
+ // Collect input fields and use them as the model's attributes.
75
+ $field.find( 'input' ).each( function() {
76
+ var $input = $( this ),
77
+ key = $input.attr( 'class' ).replace( 'ipf-', '' ),
78
+ value = $input.val();
79
+
80
+ model[ key ] = value;
81
+ model.inputs[ key ] = $input;
82
+ });
83
+
84
+ frame.target.set( model, { silent: true });
85
+ frame.open();
86
+ };
87
+
88
+ removeIcon = function( e ) {
89
+ var $el = $( e.currentTarget ).closest( 'div.ipf' );
90
+
91
+ $el.find( 'input' ).val( '' );
92
+ $el.trigger( 'ipf:update' );
93
+ };
94
+
95
+ $( document )
96
+ .on( 'click', 'a.ipf-select', selectIcon )
97
+ .on( 'click', 'a.ipf-remove', removeIcon )
98
+ .on( 'ipf:update', 'div.ipf', updatePreview );
99
+
100
+ $( 'div.ipf' ).trigger( 'ipf:update' );
101
+ }( jQuery ) );
vendor/codeinwp/icon-picker/js/src/media/controllers/font.js ADDED
@@ -0,0 +1,69 @@
1
+ /**
2
+ * wp.media.controller.IconPickerFont
3
+ *
4
+ * @class
5
+ * @augments wp.media.controller.State
6
+ * @augments Backbone.Model
7
+ * @mixes wp.media.controller.iconPickerMixin
8
+ */
9
+ var IconPickerFont = wp.media.controller.State.extend( _.extend({}, wp.media.controller.iconPickerMixin, {
10
+ defaults: {
11
+ multiple: false,
12
+ menu: 'default',
13
+ toolbar: 'select',
14
+ baseType: 'font'
15
+ },
16
+
17
+ initialize: function() {
18
+ var data = this.get( 'data' );
19
+
20
+ this.set( 'groups', new Backbone.Collection( data.groups ) );
21
+ this.set( 'library', new wp.media.model.IconPickerFonts( data.items ) );
22
+ this.set( 'selection', new wp.media.model.Selection( null, {
23
+ multiple: this.get( 'multiple' )
24
+ }) );
25
+ },
26
+
27
+ activate: function() {
28
+ this.frame.on( 'open', this.updateSelection, this );
29
+ this.resetFilter();
30
+ this.updateSelection();
31
+ },
32
+
33
+ deactivate: function() {
34
+ this.frame.off( 'open', this.updateSelection, this );
35
+ },
36
+
37
+ resetFilter: function() {
38
+ this.get( 'library' ).props.set( 'group', 'all' );
39
+ },
40
+
41
+ updateSelection: function() {
42
+ var selection = this.get( 'selection' ),
43
+ library = this.get( 'library' ),
44
+ target = this.frame.target,
45
+ icon = target.get( 'icon' ),
46
+ type = target.get( 'type' ),
47
+ selected;
48
+
49
+ if ( this.id === type ) {
50
+ selected = library.findWhere({ id: icon });
51
+ }
52
+
53
+ selection.reset( selected ? selected : null );
54
+ },
55
+
56
+ getContentView: function() {
57
+ return new wp.media.view.IconPickerFontBrowser( _.extend({
58
+ controller: this.frame,
59
+ model: this,
60
+ groups: this.get( 'groups' ),
61
+ collection: this.get( 'library' ),
62
+ selection: this.get( 'selection' ),
63
+ baseType: this.get( 'baseType' ),
64
+ type: this.get( 'id' )
65
+ }, this.ipGetSidebarOptions() ) );
66
+ }
67
+ }) );
68
+
69
+ module.exports = IconPickerFont;
vendor/codeinwp/icon-picker/js/src/media/controllers/img.js ADDED
@@ -0,0 +1,148 @@
1
+ var Library = wp.media.controller.Library,
2
+ l10n = wp.media.view.l10n,
3
+ models = wp.media.model,
4
+ views = wp.media.view,
5
+ IconPickerImg;
6
+
7
+ /**
8
+ * wp.media.controller.IconPickerImg
9
+ *
10
+ * @augments wp.media.controller.Library
11
+ * @augments wp.media.controller.State
12
+ * @augments Backbone.Model
13
+ * @mixes media.selectionSync
14
+ * @mixes wp.media.controller.iconPickerMixin
15
+ */
16
+ IconPickerImg = Library.extend( _.extend({}, wp.media.controller.iconPickerMixin, {
17
+ defaults: _.defaults({
18
+ id: 'image',
19
+ baseType: 'image',
20
+ syncSelection: false
21
+ }, Library.prototype.defaults ),
22
+
23
+ initialize: function( options ) {
24
+ var selection = this.get( 'selection' );
25
+
26
+ this.options = options;
27
+
28
+ this.set( 'library', wp.media.query({ type: options.data.mimeTypes }) );
29
+
30
+ this.routers = {
31
+ upload: {
32
+ text: l10n.uploadFilesTitle,
33
+ priority: 20
34
+ },
35
+ browse: {
36
+ text: l10n.mediaLibraryTitle,
37
+ priority: 40
38
+ }
39
+ };
40
+
41
+ if ( ! ( selection instanceof models.Selection ) ) {
42
+ this.set( 'selection', new models.Selection( selection, {
43
+ multiple: false
44
+ }) );
45
+ }
46
+
47
+ Library.prototype.initialize.apply( this, arguments );
48
+ },
49
+
50
+ activate: function() {
51
+ Library.prototype.activate.apply( this, arguments );
52
+ this.get( 'library' ).observe( wp.Uploader.queue );
53
+ this.frame.on( 'open', this.updateSelection, this );
54
+ this.updateSelection();
55
+ },
56
+
57
+ deactivate: function() {
58
+ Library.prototype.deactivate.apply( this, arguments );
59
+ this.get( 'library' ).unobserve( wp.Uploader.queue );
60
+ this.frame.off( 'open', this.updateSelection, this );
61
+ },
62
+
63
+ getContentView: function( mode ) {
64
+ var content = ( mode === 'upload' ) ? this.uploadContent() : this.browseContent();
65
+
66
+ this.frame.$el.removeClass( 'hide-toolbar' );
67
+
68
+ return content;
69
+ },
70
+
71
+ /**
72
+ * Media library content
73
+ *
74
+ * @returns {wp.media.view.IconPickerImgBrowser} "Browse" content view.
75
+ */
76
+ browseContent: function() {
77
+ var options = _.extend({
78
+ model: this,
79
+ controller: this.frame,
80
+ collection: this.get( 'library' ),
81
+ selection: this.get( 'selection' ),
82
+ sortable: this.get( 'sortable' ),
83
+ search: this.get( 'searchable' ),
84
+ filters: this.get( 'filterable' ),
85
+ dragInfo: this.get( 'dragInfo' ),
86
+ idealColumnWidth: this.get( 'idealColumnWidth' ),
87
+ suggestedWidth: this.get( 'suggestedWidth' ),
88
+ suggestedHeight: this.get( 'suggestedHeight' )
89
+ }, this.ipGetSidebarOptions() );
90
+
91
+ if ( this.id === 'svg' ) {
92
+ options.AttachmentView = views.IconPickerSvgItem;
93
+ }
94
+
95
+ return new views.IconPickerImgBrowser( options );
96
+ },
97
+
98
+ /**
99
+ * Render callback for the content region in the `upload` mode.
100
+ *
101
+ * @returns {wp.media.view.UploaderInline} "Upload" content view.
102
+ */
103
+ uploadContent: function() {
104
+ return new wp.media.view.UploaderInline({
105
+ controller: this.frame
106
+ });
107
+ },
108
+
109
+ updateSelection: function() {
110
+ var selection = this.get( 'selection' ),
111
+ target = this.frame.target,
112
+ icon = target.get( 'icon' ),
113
+ type = target.get( 'type' ),
114
+ selected;
115
+
116
+ if ( this.id === type ) {
117
+ selected = models.Attachment.get( icon );
118
+ this.dfd = selected.fetch();
119
+ }
120
+
121
+ selection.reset( selected ? selected : null );
122
+ },
123
+
124
+ /**
125
+ * Get image icon URL
126
+ *
127
+ * @param {object} model - Selected icon model.
128
+ * @param {string} size - Image size.
129
+ *
130
+ * @returns {string} Icon URL.
131
+ */
132
+ ipGetIconUrl: function( model, size ) {
133
+ var url = model.get( 'url' ),
134
+ sizes = model.get( 'sizes' );
135
+
136
+ if ( undefined === size ) {
137
+ size = 'thumbnail';
138
+ }
139
+
140
+ if ( sizes && sizes[ size ]) {
141
+ url = sizes[ size ].url;
142
+ }
143
+
144
+ return url;
145
+ }
146
+ }) );
147
+
148
+ module.exports = IconPickerImg;
vendor/codeinwp/icon-picker/js/src/media/controllers/mixin.js ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Methods for the state
3
+ *
4
+ * @mixin
5
+ */
6
+ var iconPickerMixin = {
7
+
8
+ /**
9
+ * @returns {object}
10
+ */
11
+ ipGetSidebarOptions: function() {
12
+ var frameOptions = this.frame.options,
13
+ options = {};
14
+
15
+ if ( frameOptions.SidebarView && frameOptions.SidebarView.prototype instanceof wp.media.view.IconPickerSidebar ) {
16
+ options.sidebar = true;
17
+ options.SidebarView = frameOptions.SidebarView;
18
+ } else {
19
+ options.sidebar = false;
20
+ }
21
+
22
+ return options;
23
+ },
24
+
25
+ /**
26
+ * Get image icon URL
27
+ *
28
+ * @returns {string}
29
+ */
30
+ ipGetIconUrl: function() {
31
+ return '';
32
+ }
33
+ };
34
+
35
+ module.exports = iconPickerMixin;
vendor/codeinwp/icon-picker/js/src/media/manifest.js ADDED
@@ -0,0 +1,16 @@
1
+ wp.media.model.IconPickerTarget = require( './models/target.js' );
2
+ wp.media.model.IconPickerFonts = require( './models/fonts.js' );
3
+
4
+ wp.media.controller.iconPickerMixin = require( './controllers/mixin.js' );
5
+ wp.media.controller.IconPickerFont = require( './controllers/font.js' );
6
+ wp.media.controller.IconPickerImg = require( './controllers/img.js' );
7
+
8
+ wp.media.view.IconPickerBrowser = require( './views/browser.js' );
9
+ wp.media.view.IconPickerSidebar = require( './views/sidebar.js' );
10
+ wp.media.view.IconPickerFontItem = require( './views/font-item.js' );
11
+ wp.media.view.IconPickerFontLibrary = require( './views/font-library.js' );
12
+ wp.media.view.IconPickerFontFilter = require( './views/font-filter.js' );
13
+ wp.media.view.IconPickerFontBrowser = require( './views/font-browser.js' );
14
+ wp.media.view.IconPickerImgBrowser = require( './views/img-browser.js' );
15
+ wp.media.view.IconPickerSvgItem = require( './views/svg-item.js' );
16
+ wp.media.view.MediaFrame.IconPicker = require( './views/frame.js' );
vendor/codeinwp/icon-picker/js/src/media/models/fonts.js ADDED
@@ -0,0 +1,77 @@
1
+ /**
2
+ * wp.media.model.IconPickerFonts
3
+ */
4
+ var IconPickerFonts = Backbone.Collection.extend({
5
+ constructor: function() {
6
+ Backbone.Collection.prototype.constructor.apply( this, arguments );
7
+
8
+ this.items = new Backbone.Collection( this.models );
9
+ this.props = new Backbone.Model({
10
+ group: 'all',
11
+ search: ''
12
+ });
13
+
14
+ this.props.on( 'change', this.refresh, this );
15
+ },
16
+
17
+ /**
18
+ * Refresh library when props is changed
19
+ *
20
+ * @param {Backbone.Model} props
21
+ */
22
+ refresh: function( props ) {
23
+ let items = _.clone( this.items.models );
24
+
25
+ _.each( props.toJSON(), ( value, filter ) => {
26
+ const method = this.filters[ filter ];
27
+
28
+ if ( method ) {
29
+ items = items.filter( item => {
30
+ return method( item, value );
31
+ });
32
+ }
33
+ });
34
+
35
+ this.reset( items );
36
+ },
37
+
38
+ filters: {
39
+ /**
40
+ * @static
41
+ *
42
+ * @param {Backbone.Model} item Item model.
43
+ * @param {string} group Group ID.
44
+ *
45
+ * @returns {Boolean}
46
+ */
47
+ group: function( item, group ) {
48
+ return ( group === 'all' || item.get( 'group' ) === group || item.get( 'group' ) === '' );
49
+ },
50
+
51
+ /**
52
+ * @static
53
+ *
54
+ * @param {Backbone.Model} item Item model.
55
+ * @param {string} term Search term.
56
+ *
57
+ * @returns {Boolean}
58
+ */
59
+ search: function( item, term ) {
60
+ let result;
61
+
62
+ if ( term === '' ) {
63
+ result = true;
64
+ } else {
65
+ result = _.any([ 'id', 'name' ], attribute => {
66
+ const value = item.get( attribute );
67
+
68
+ return value && value.search( term ) >= 0;
69
+ }, term );
70
+ }
71
+
72
+ return result;
73
+ }
74
+ }
75
+ });
76
+
77
+ module.exports = IconPickerFonts;
vendor/codeinwp/icon-picker/js/src/media/models/target.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * wp.media.model.IconPickerTarget
3
+ *
4
+ * A target where the picked icon should be sent to
5
+ *
6
+ * @augments Backbone.Model
7
+ */
8
+ var IconPickerTarget = Backbone.Model.extend({
9
+ defaults: {
10
+ type: '',
11
+ group: 'all',
12
+ icon: '',
13
+ url: '',
14
+ sizes: []
15
+ }
16
+ });
17
+
18
+ module.exports = IconPickerTarget;
vendor/codeinwp/icon-picker/js/src/media/views/browser.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Methods for the browser views
3
+ */
4
+ var IconPickerBrowser = {
5
+ createSidebar: function() {
6
+ this.sidebar = new this.options.SidebarView({
7
+ controller: this.controller,
8
+ selection: this.options.selection
9
+ });
10
+
11
+ this.views.add( this.sidebar );
12
+ }
13
+ };
14
+
15
+ module.exports = IconPickerBrowser;
vendor/codeinwp/icon-picker/js/src/media/views/font-browser.js ADDED
@@ -0,0 +1,65 @@
1
+ /**
2
+ * wp.media.view.IconPickerFontBrowser
3
+ */
4
+ var IconPickerFontBrowser = wp.media.View.extend( _.extend({
5
+ className: function() {
6
+ var className = 'attachments-browser iconpicker-fonts-browser';
7
+
8
+ if ( ! this.options.sidebar ) {
9
+ className += ' hide-sidebar';
10
+ }
11
+
12
+ return className;
13
+ },
14
+
15
+ initialize: function() {
16
+ this.groups = this.options.groups;
17
+
18
+ this.createToolbar();
19
+ this.createLibrary();
20
+
21
+ if ( this.options.sidebar ) {
22
+ this.createSidebar();
23
+ }
24
+ },
25
+
26
+ createLibrary: function() {
27
+ this.items = new wp.media.view.IconPickerFontLibrary({
28
+ controller: this.controller,
29
+ collection: this.collection,
30
+ selection: this.options.selection,
31
+ baseType: this.options.baseType,
32
+ type: this.options.type
33
+ });
34
+
35
+ // Add keydown listener to the instance of the library view
36
+ this.items.listenTo( this.controller, 'attachment:keydown:arrow', this.items.arrowEvent );
37
+ this.items.listenTo( this.controller, 'attachment:details:shift-tab', this.items.restoreFocus );
38
+
39
+ this.views.add( this.items );
40
+ },
41
+
42
+ createToolbar: function() {
43
+ this.toolbar = new wp.media.view.Toolbar({
44
+ controller: this.controller
45
+ });
46
+
47
+ this.views.add( this.toolbar );
48
+
49
+ // Dropdown filter
50
+ this.toolbar.set( 'filters', new wp.media.view.IconPickerFontFilter({
51
+ controller: this.controller,
52
+ model: this.collection.props,
53
+ priority: - 80
54
+ }).render() );
55
+
56
+ // Search field
57
+ this.toolbar.set( 'search', new wp.media.view.Search({
58
+ controller: this.controller,
59
+ model: this.collection.props,
60
+ priority: 60
61
+ }).render() );
62
+ }
63
+ }, wp.media.view.IconPickerBrowser ) );
64
+
65
+ module.exports = IconPickerFontBrowser;
vendor/codeinwp/icon-picker/js/src/media/views/font-filter.js ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * wp.media.view.IconPickerFontFilter
3
+ */
4
+ var IconPickerFontFilter = wp.media.view.AttachmentFilters.extend({
5
+ createFilters: function() {
6
+ var groups = this.controller.state().get( 'groups' ),
7
+ filters = {};
8
+
9
+ filters.all = {
10
+ text: wp.media.view.l10n.iconPicker.allFilter,
11
+ props: { group: 'all' }
12
+ };
13
+
14
+ groups.each( function( group ) {
15
+ filters[ group.id ] = {
16
+ text: group.get( 'name' ),
17
+ props: { group: group.id }
18
+ };
19
+ });
20
+
21
+ this.filters = filters;
22
+ },
23
+
24
+ change: function() {
25
+ var filter = this.filters[ this.el.value ];
26
+
27
+ if ( filter ) {
28
+ this.model.set( 'group', filter.props.group );
29
+ }
30
+ }
31
+ });
32
+
33
+ module.exports = IconPickerFontFilter;
vendor/codeinwp/icon-picker/js/src/media/views/font-item.js ADDED
@@ -0,0 +1,30 @@
1
+ var Attachment = wp.media.view.Attachment.Library,
2
+ IconPickerFontItem;
3
+
4
+ /**
5
+ * wp.media.view.IconPickerFontItem
6
+ */
7
+ IconPickerFontItem = Attachment.extend({
8
+ className: 'attachment iconpicker-item',
9
+
10
+ initialize: function() {
11
+ this.template = wp.media.template( 'iconpicker-' + this.options.baseType + '-item' );
12
+ Attachment.prototype.initialize.apply( this, arguments );
13
+ },
14
+
15
+ render: function() {
16
+ var options = _.defaults( this.model.toJSON(), {
17
+ baseType: this.options.baseType,
18
+ type: this.options.type
19
+ });
20
+
21
+ this.views.detach();
22
+ this.$el.html( this.template( options ) );
23
+ this.updateSelect();
24
+ this.views.render();
25
+
26
+ return this;
27
+ }
28
+ });
29
+
30
+ module.exports = IconPickerFontItem;
vendor/codeinwp/icon-picker/js/src/media/views/font-library.js ADDED
@@ -0,0 +1,100 @@
1
+ var $ = jQuery,
2
+ Attachments = wp.media.view.Attachments,
3
+ IconPickerFontLibrary;
4
+
5
+ /**
6
+ * wp.media.view.IconPickerFontLibrary
7
+ */
8
+ IconPickerFontLibrary = Attachments.extend({
9
+ className: 'attachments iconpicker-items clearfix',
10
+
11
+ initialize: function() {
12
+ Attachments.prototype.initialize.apply( this, arguments );
13
+
14
+ _.bindAll( this, 'scrollToSelected' );
15
+ _.defer( this.scrollToSelected, this );
16
+ this.controller.on( 'open', this.scrollToSelected, this );
17
+ $( this.options.scrollElement ).off( 'scroll', this.scroll );
18
+ },
19
+
20
+ _addItem: function( model ) {
21
+ this.views.add( this.createAttachmentView( model ), {
22
+ at: this.collection.indexOf( model )
23
+ });
24
+ },
25
+
26
+ _removeItem: function( model ) {
27
+ var view = this._viewsByCid[ model.cid ];
28
+ delete this._viewsByCid[ model.cid ];
29
+
30
+ if ( view ) {
31
+ view.remove();
32
+ }
33
+ },
34
+
35
+ render: function() {
36
+ _.each( this._viewsByCid, this._removeItem, this );
37
+ this.collection.each( this._addItem, this );
38
+
39
+ return this;
40
+ },
41
+
42
+ createAttachmentView: function( model ) {
43
+ var view = new wp.media.view.IconPickerFontItem({
44
+ controller: this.controller,
45
+ model: model,
46
+ collection: this.collection,
47
+ selection: this.options.selection,
48