WP Embed Facebook - Version 2.1.5

Version Description

  • Added: new filter wef_lightbox_title
  • Added: event time format option
  • Added: single post time format option
  • Added: single post now triggers photos in lightbox
  • Fixed: single post caption link error
  • Added: compatibility for custom embed templates css (pierreg_)
  • Fixed: typos on readme file
  • Improved: Lightbox css and option section
  • Added: Facebook API v2.7
  • Added: option to use lightbox on [gallery] shortcode (experimental)
Download this release

Release Info

Developer poxtron
Plugin Icon 128x128 WP Embed Facebook
Version 2.1.5
Comparing to
See all releases

Code changes from version 2.1.4 to 2.1.5

lang/wp-embed-facebook.pot CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the WP Embed Facebook package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Embed Facebook 2.1.3\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/wp-embed-facebook\n"
8
  "POT-Creation-Date: 2016-06-22 18:07:38+00:00\n"
@@ -25,7 +25,7 @@ msgstr ""
25
  "X-Poedit-Bookmarks: \n"
26
  "X-Textdomain-Support: yes\n"
27
  "X-Poedit-SearchPathExcluded-0: *.js\n"
28
- "X-Poedit-Wpheader: wp-embed-facebook/.php\n"
29
 
30
  #: lib/class-wef-magic-embeds.php:100
31
  msgid "Shortcode used:"
@@ -58,31 +58,31 @@ msgid ""
58
  "humanity."
59
  msgstr ""
60
 
61
- #: lib/class-wp-embed-fb-admin.php:135
62
  msgid "Settings"
63
  msgstr ""
64
 
65
- #: lib/class-wp-embed-fb-admin.php:318
66
  msgid "Magic Embeds"
67
  msgstr ""
68
 
69
- #: lib/class-wp-embed-fb-admin.php:319
70
  msgid "Social Plugins"
71
  msgstr ""
72
 
73
- #: lib/class-wp-embed-fb-admin.php:320
74
  msgid "Custom Embeds"
75
  msgstr ""
76
 
77
- #: lib/class-wp-embed-fb-admin.php:321 lib/class-wp-embed-fb-admin.php:596
78
  msgid "Lightbox"
79
  msgstr ""
80
 
81
- #: lib/class-wp-embed-fb-admin.php:322
82
  msgid "Advanced"
83
  msgstr ""
84
 
85
- #: lib/class-wp-embed-fb-admin.php:338
86
  msgid ""
87
  "Auto embeds understand the url you are entering and return a social plugin "
88
  "or a custom embed. <br>They can be activated by <a "
@@ -92,423 +92,435 @@ msgid ""
92
  "target=\"_blank\">shortcode</a>."
93
  msgstr ""
94
 
95
- #: lib/class-wp-embed-fb-admin.php:339
96
  msgid "Auto Embeds"
97
  msgstr ""
98
 
99
- #: lib/class-wp-embed-fb-admin.php:340
100
  msgid "Auto embed url's on editor "
101
  msgstr ""
102
 
103
- #: lib/class-wp-embed-fb-admin.php:341
104
  msgid "Maximum width in pixels"
105
  msgstr ""
106
 
107
- #: lib/class-wp-embed-fb-admin.php:342
108
  msgid "Embed video as post"
109
  msgstr ""
110
 
111
- #: lib/class-wp-embed-fb-admin.php:343
112
  msgid "%sDownload link under video"
113
  msgstr ""
114
 
115
- #: lib/class-wp-embed-fb-admin.php:345
116
  msgid ""
117
  "The quote plugin lets people select text on your page and add it to their "
118
  "share.<br><a href=\"%s\" target=\"_blank\" title=\"WP Embed "
119
  "Facebook\">Demo</a>"
120
  msgstr ""
121
 
122
- #: lib/class-wp-embed-fb-admin.php:345
123
  msgid "Quote Plugin"
124
  msgstr ""
125
 
126
- #: lib/class-wp-embed-fb-admin.php:346 lib/class-wp-embed-fb-admin.php:351
127
  msgid "Active"
128
  msgstr ""
129
 
130
- #: lib/class-wp-embed-fb-admin.php:347 lib/class-wp-embed-fb-admin.php:352
131
  msgid "Post types"
132
  msgstr ""
133
 
134
- #: lib/class-wp-embed-fb-admin.php:348 lib/class-wp-embed-fb-admin.php:353
135
  msgid "Coma separated post types i.e. post,page,attachment"
136
  msgstr ""
137
 
138
- #: lib/class-wp-embed-fb-admin.php:350
139
  msgid "Comments"
140
  msgstr ""
141
 
142
- #: lib/class-wp-embed-fb-admin.php:354
143
  msgid "Sync comment count"
144
  msgstr ""
145
 
146
- #: lib/class-wp-embed-fb-admin.php:357
147
  msgid "Add open graph meta"
148
  msgstr ""
149
 
150
- #: lib/class-wp-embed-fb-admin.php:358
151
  msgid "Needed to moderate comments"
152
  msgstr ""
153
 
154
- #: lib/class-wp-embed-fb-admin.php:358
155
  msgid ""
156
  "Disable this if you already have another plugin adding <a "
157
  "title=\"Moderation Setup Instructions\" target=\"_blank\" href=\"%s\">the "
158
  "fb:app_id meta</a>"
159
  msgstr ""
160
 
161
- #: lib/class-wp-embed-fb-admin.php:359
162
  msgid "To enable comments moderation setup your App ID"
163
  msgstr ""
164
 
165
- #: lib/class-wp-embed-fb-admin.php:362
166
  msgid ""
167
  "If you cant see the \"Moderate comment\" link above each comment you will "
168
  "need to <a title=\"Sharing Debugger\" target=\"_blank\" href=\"%s\">scrape "
169
  "the url</a>"
170
  msgstr ""
171
 
172
- #: lib/class-wp-embed-fb-admin.php:366
173
  msgid "Notes:"
174
  msgstr ""
175
 
176
- #: lib/class-wp-embed-fb-admin.php:368
177
  msgid "Facebook settings"
178
  msgstr ""
179
 
180
- #: lib/class-wp-embed-fb-admin.php:369
181
  msgid "Social Plugins Language"
182
  msgstr ""
183
 
184
- #: lib/class-wp-embed-fb-admin.php:372
185
  msgid ""
186
  "Creating a Facebook app is easy view the <a href=\"%s\" target=\"_blank\" "
187
  "title=\"WP Embed FB documentation\">step by step guide</a> or view <a "
188
  "href=\"%s\" target=\"_blank\" title=\"Facebook Apps\">your apps</a>."
189
  msgstr ""
190
 
191
- #: lib/class-wp-embed-fb-admin.php:379
192
  msgid "App ID"
193
  msgstr ""
194
 
195
- #: lib/class-wp-embed-fb-admin.php:381
196
  msgid "App Secret"
197
  msgstr ""
198
 
199
- #: lib/class-wp-embed-fb-admin.php:393
200
  msgid ""
201
  "<a title=\"Facebook Social Plugins\" href=\"%s\" rel=\"nofollow\" "
202
  "target=\"_blank\">Social plugins</a> are pieces of code that Facebook "
203
  "developers created for us mortals."
204
  msgstr ""
205
 
206
- #: lib/class-wp-embed-fb-admin.php:395 lib/class-wp-embed-fb-admin.php:532
207
  msgid "Example:"
208
  msgstr ""
209
 
210
- #: lib/class-wp-embed-fb-admin.php:397
211
  msgid "Embed a like button for the curent page:"
212
  msgstr ""
213
 
214
- #: lib/class-wp-embed-fb-admin.php:400
215
  msgid "add debug=1 to debug the result."
216
  msgstr ""
217
 
218
- #: lib/class-wp-embed-fb-admin.php:407
219
  msgid "Page plugin"
220
  msgstr ""
221
 
222
- #: lib/class-wp-embed-fb-admin.php:414
223
  msgid "Comma separated tabs i.e. timeline,events,messages"
224
  msgstr ""
225
 
226
- #: lib/class-wp-embed-fb-admin.php:421
227
  msgid "Post plugin"
228
  msgstr ""
229
 
230
- #: lib/class-wp-embed-fb-admin.php:428
231
  msgid "Video"
232
  msgstr ""
233
 
234
- #: lib/class-wp-embed-fb-admin.php:435
235
  msgid "Single comment"
236
  msgstr ""
237
 
238
- #: lib/class-wp-embed-fb-admin.php:439
239
  msgid "Activate them on all your posts on the \"Magic embeds\" section"
240
  msgstr ""
241
 
242
- #: lib/class-wp-embed-fb-admin.php:439
243
  msgid "Comments plugin"
244
  msgstr ""
245
 
246
- #: lib/class-wp-embed-fb-admin.php:446
247
  msgid "Activate it on all your posts on the \"Magic embeds\" section"
248
  msgstr ""
249
 
250
- #: lib/class-wp-embed-fb-admin.php:446
251
  msgid "Quote plugin"
252
  msgstr ""
253
 
254
- #: lib/class-wp-embed-fb-admin.php:449
255
  msgid "Save button"
256
  msgstr ""
257
 
258
- #: lib/class-wp-embed-fb-admin.php:452
259
  msgid "Like button"
260
  msgstr ""
261
 
262
- #: lib/class-wp-embed-fb-admin.php:461
263
  msgid "Send button"
264
  msgstr ""
265
 
266
- #: lib/class-wp-embed-fb-admin.php:465
267
  msgid "Share button"
268
  msgstr ""
269
 
270
- #: lib/class-wp-embed-fb-admin.php:469
271
  msgid "Follow button"
272
  msgstr ""
273
 
274
- #: lib/class-wp-embed-fb-admin.php:479
275
  msgid "Adaptive view"
276
  msgstr ""
277
 
278
- #: lib/class-wp-embed-fb-admin.php:491
279
  msgid "General"
280
  msgstr ""
281
 
282
- #: lib/class-wp-embed-fb-admin.php:503
283
  msgid "Albums"
284
  msgstr ""
285
 
286
- #: lib/class-wp-embed-fb-admin.php:504
287
  msgid "Number of Photos"
288
  msgstr ""
289
 
290
- #: lib/class-wp-embed-fb-admin.php:506
291
  msgid "Events"
292
  msgstr ""
293
 
294
- #: lib/class-wp-embed-fb-admin.php:507
295
  msgid "Use WP time to calculate the date"
296
  msgstr ""
297
 
298
- #: lib/class-wp-embed-fb-admin.php:509
 
 
 
 
 
 
 
 
299
  msgid "Pages"
300
  msgstr ""
301
 
302
- #: lib/class-wp-embed-fb-admin.php:510 lib/class-wp-embed-fb-admin.php:515
303
- #: lib/class-wp-embed-fb-admin.php:518 lib/class-wp-embed-fb-admin.php:521
304
  msgid "Use by default on \"Auto Embeds\""
305
  msgstr ""
306
 
307
- #: lib/class-wp-embed-fb-admin.php:511
308
  msgid "Show like button"
309
  msgstr ""
310
 
311
- #: lib/class-wp-embed-fb-admin.php:512
312
  msgid "Number of posts"
313
  msgstr ""
314
 
315
- #: lib/class-wp-embed-fb-admin.php:514
316
  msgid "Photos"
317
  msgstr ""
318
 
319
- #: lib/class-wp-embed-fb-admin.php:517
320
  msgid "Posts"
321
  msgstr ""
322
 
323
- #: lib/class-wp-embed-fb-admin.php:520
324
  msgid "Videos"
325
  msgstr ""
326
 
327
- #: lib/class-wp-embed-fb-admin.php:522
328
  msgid "Force 16:9 ratio"
329
  msgstr ""
330
 
331
- #: lib/class-wp-embed-fb-admin.php:524
332
  msgid "Profiles"
333
  msgstr ""
334
 
335
- #: lib/class-wp-embed-fb-admin.php:525
336
  msgid "Show follow button"
337
  msgstr ""
338
 
339
- #: lib/class-wp-embed-fb-admin.php:530
340
  msgid ""
341
  "Custom embeds can be accessed using the [facebook url] or [embed] "
342
  "shortcodes also by activating \"Auto Embeds\" on Magic Embeds section."
343
  msgstr ""
344
 
345
- #: lib/class-wp-embed-fb-admin.php:537
346
  msgid ""
347
  "<a href=\"%s\" title=\"WP Embed Facebook Shortcode\" target=\"_blank\">Read "
348
  "More</a>"
349
  msgstr ""
350
 
351
- #: lib/class-wp-embed-fb-admin.php:544 lib/class-wp-embed-fb-admin.php:576
352
  msgid "By default you can only embed public pages, videos, photos and posts."
353
  msgstr ""
354
 
355
- #: lib/class-wp-embed-fb-admin.php:545 lib/class-wp-embed-fb-admin.php:577
356
  msgid ""
357
  "To embed albums, events, profiles and video as HTML5 you will need to setup "
358
  "a Facebook App on Magic Embeds section"
359
  msgstr ""
360
 
361
- #: lib/class-wp-embed-fb-admin.php:558
362
  msgid "Lightbox Options"
363
  msgstr ""
364
 
365
- #: lib/class-wp-embed-fb-admin.php:559
366
  msgid "Show Image Number Label"
367
  msgstr ""
368
 
369
- #: lib/class-wp-embed-fb-admin.php:560
370
  msgid "Album Label"
371
  msgstr ""
372
 
373
- #: lib/class-wp-embed-fb-admin.php:561
374
  msgid "Fade Duration"
375
  msgstr ""
376
 
377
- #: lib/class-wp-embed-fb-admin.php:562
378
  msgid "Resize Duration"
379
  msgstr ""
380
 
381
- #: lib/class-wp-embed-fb-admin.php:563
382
  msgid "Position From Top"
383
  msgstr ""
384
 
385
- #: lib/class-wp-embed-fb-admin.php:564
386
  msgid "Max Height"
387
  msgstr ""
388
 
389
- #: lib/class-wp-embed-fb-admin.php:565
390
  msgid "Max Width"
391
  msgstr ""
392
 
393
- #: lib/class-wp-embed-fb-admin.php:566
394
  msgid "Always Show Nav On TouchDevices"
395
  msgstr ""
396
 
397
- #: lib/class-wp-embed-fb-admin.php:567
398
  msgid "Fit Images In Viewport"
399
  msgstr ""
400
 
401
- #: lib/class-wp-embed-fb-admin.php:568
402
  msgid "Disable Scrolling"
403
  msgstr ""
404
 
405
- #: lib/class-wp-embed-fb-admin.php:569
406
  msgid "Loop Through Album"
407
  msgstr ""
408
 
409
- #: lib/class-wp-embed-fb-admin.php:590
 
 
 
 
410
  msgid "Enqueue styles and scripts"
411
  msgstr ""
412
 
413
- #: lib/class-wp-embed-fb-admin.php:591
414
  msgid "Only when there is an embed present"
415
  msgstr ""
416
 
417
- #: lib/class-wp-embed-fb-admin.php:592
418
  msgid "Facebook SDK"
419
  msgstr ""
420
 
421
- #: lib/class-wp-embed-fb-admin.php:593
422
  msgid "Template Styles"
423
  msgstr ""
424
 
425
- #: lib/class-wp-embed-fb-admin.php:594
426
  msgid "Adaptive social plugins script"
427
  msgstr ""
428
 
429
- #: lib/class-wp-embed-fb-admin.php:597
430
  msgid "Enqueue script"
431
  msgstr ""
432
 
433
- #: lib/class-wp-embed-fb-admin.php:598
434
  msgid "Attribute"
435
  msgstr ""
436
 
437
- #: lib/class-wp-embed-fb-admin.php:600
438
  msgid "Other Options"
439
  msgstr ""
440
 
441
- #: lib/class-wp-embed-fb-admin.php:601
442
  msgid "Add fb-root on top of content"
443
  msgstr ""
444
 
445
- #: lib/class-wp-embed-fb-admin.php:602
446
  msgid "Force Facebook SDK script on all site"
447
  msgstr ""
448
 
449
- #: lib/class-wp-embed-fb-admin.php:603
450
  msgid "Force app token"
451
  msgstr ""
452
 
453
- #: lib/class-wp-embed-fb-admin.php:621
454
  msgid "Save all settings"
455
  msgstr ""
456
 
457
- #: lib/class-wp-embed-fb-admin.php:626
458
  msgid "Restore default values?"
459
  msgstr ""
460
 
461
- #: lib/class-wp-embed-fb-admin.php:629
462
  msgid "Restore defaults"
463
  msgstr ""
464
 
465
- #: lib/class-wp-embed-fb-admin.php:637
466
  msgid "Premium Extension Available"
467
  msgstr ""
468
 
469
- #: lib/class-wp-embed-fb-admin.php:641
470
  msgid "Shortcodes for embedding a full event or page."
471
  msgstr ""
472
 
473
- #: lib/class-wp-embed-fb-admin.php:643
474
  msgid "Default event template shows admins and address."
475
  msgstr ""
476
 
477
- #: lib/class-wp-embed-fb-admin.php:645
478
  msgid "Albums with more that 100 photos."
479
  msgstr ""
480
 
481
- #: lib/class-wp-embed-fb-admin.php:647
482
  msgid "One Year Premium Support"
483
  msgstr ""
484
 
485
- #: lib/class-wp-embed-fb-admin.php:651
486
  msgid "Check it out"
487
  msgstr ""
488
 
489
- #: lib/class-wp-embed-fb-admin.php:655
490
  msgid "Plus new features cooking"
491
  msgstr ""
492
 
493
- #: lib/class-wp-embed-fb-admin.php:658
494
  msgid ""
495
  "Embed personal data, shortcode creator, widgets, special templates for "
496
  "albums and pages"
497
  msgstr ""
498
 
499
- #: lib/class-wp-embed-fb-admin.php:663
500
  msgid "This free plugin has taken thousands of hours to maintain and develop"
501
  msgstr ""
502
 
503
- #: lib/class-wp-embed-fb-admin.php:668
504
  msgid "Rate it"
505
  msgstr ""
506
 
507
- #: lib/class-wp-embed-fb-admin.php:676
508
  msgid "Donate"
509
  msgstr ""
510
 
511
- #: lib/class-wp-embed-fb-admin.php:681
512
  msgid "More information"
513
  msgstr ""
514
 
@@ -543,7 +555,7 @@ msgstr ""
543
 
544
  #: templates/classic/com-page.php:20 templates/classic/page.php:34
545
  #: templates/classic/post.php:21 templates/default/com-page.php:20
546
- #: templates/default/page.php:34 templates/default/post.php:21
547
  msgid "%d people like this."
548
  msgstr ""
549
 
@@ -563,6 +575,18 @@ msgstr ""
563
  msgid "Creator: "
564
  msgstr ""
565
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  #: templates/classic/social-plugin.php:15
567
  #: templates/default/social-plugin.php:15
568
  msgid "Download this video"
2
  # This file is distributed under the same license as the WP Embed Facebook package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Embed Facebook 2.1.4\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/wp-embed-facebook\n"
8
  "POT-Creation-Date: 2016-06-22 18:07:38+00:00\n"
25
  "X-Poedit-Bookmarks: \n"
26
  "X-Textdomain-Support: yes\n"
27
  "X-Poedit-SearchPathExcluded-0: *.js\n"
28
+ "X-Poedit-Wpheader: wp-embed-facebook.php\n"
29
 
30
  #: lib/class-wef-magic-embeds.php:100
31
  msgid "Shortcode used:"
58
  "humanity."
59
  msgstr ""
60
 
61
+ #: lib/class-wp-embed-fb-admin.php:136
62
  msgid "Settings"
63
  msgstr ""
64
 
65
+ #: lib/class-wp-embed-fb-admin.php:319
66
  msgid "Magic Embeds"
67
  msgstr ""
68
 
69
+ #: lib/class-wp-embed-fb-admin.php:320
70
  msgid "Social Plugins"
71
  msgstr ""
72
 
73
+ #: lib/class-wp-embed-fb-admin.php:321
74
  msgid "Custom Embeds"
75
  msgstr ""
76
 
77
+ #: lib/class-wp-embed-fb-admin.php:322 lib/class-wp-embed-fb-admin.php:605
78
  msgid "Lightbox"
79
  msgstr ""
80
 
81
+ #: lib/class-wp-embed-fb-admin.php:323
82
  msgid "Advanced"
83
  msgstr ""
84
 
85
+ #: lib/class-wp-embed-fb-admin.php:339
86
  msgid ""
87
  "Auto embeds understand the url you are entering and return a social plugin "
88
  "or a custom embed. <br>They can be activated by <a "
92
  "target=\"_blank\">shortcode</a>."
93
  msgstr ""
94
 
95
+ #: lib/class-wp-embed-fb-admin.php:340
96
  msgid "Auto Embeds"
97
  msgstr ""
98
 
99
+ #: lib/class-wp-embed-fb-admin.php:341
100
  msgid "Auto embed url's on editor "
101
  msgstr ""
102
 
103
+ #: lib/class-wp-embed-fb-admin.php:342
104
  msgid "Maximum width in pixels"
105
  msgstr ""
106
 
107
+ #: lib/class-wp-embed-fb-admin.php:343
108
  msgid "Embed video as post"
109
  msgstr ""
110
 
111
+ #: lib/class-wp-embed-fb-admin.php:344
112
  msgid "%sDownload link under video"
113
  msgstr ""
114
 
115
+ #: lib/class-wp-embed-fb-admin.php:346
116
  msgid ""
117
  "The quote plugin lets people select text on your page and add it to their "
118
  "share.<br><a href=\"%s\" target=\"_blank\" title=\"WP Embed "
119
  "Facebook\">Demo</a>"
120
  msgstr ""
121
 
122
+ #: lib/class-wp-embed-fb-admin.php:346
123
  msgid "Quote Plugin"
124
  msgstr ""
125
 
126
+ #: lib/class-wp-embed-fb-admin.php:347 lib/class-wp-embed-fb-admin.php:352
127
  msgid "Active"
128
  msgstr ""
129
 
130
+ #: lib/class-wp-embed-fb-admin.php:348 lib/class-wp-embed-fb-admin.php:353
131
  msgid "Post types"
132
  msgstr ""
133
 
134
+ #: lib/class-wp-embed-fb-admin.php:349 lib/class-wp-embed-fb-admin.php:354
135
  msgid "Coma separated post types i.e. post,page,attachment"
136
  msgstr ""
137
 
138
+ #: lib/class-wp-embed-fb-admin.php:351
139
  msgid "Comments"
140
  msgstr ""
141
 
142
+ #: lib/class-wp-embed-fb-admin.php:355
143
  msgid "Sync comment count"
144
  msgstr ""
145
 
146
+ #: lib/class-wp-embed-fb-admin.php:358
147
  msgid "Add open graph meta"
148
  msgstr ""
149
 
150
+ #: lib/class-wp-embed-fb-admin.php:359
151
  msgid "Needed to moderate comments"
152
  msgstr ""
153
 
154
+ #: lib/class-wp-embed-fb-admin.php:359
155
  msgid ""
156
  "Disable this if you already have another plugin adding <a "
157
  "title=\"Moderation Setup Instructions\" target=\"_blank\" href=\"%s\">the "
158
  "fb:app_id meta</a>"
159
  msgstr ""
160
 
161
+ #: lib/class-wp-embed-fb-admin.php:360
162
  msgid "To enable comments moderation setup your App ID"
163
  msgstr ""
164
 
165
+ #: lib/class-wp-embed-fb-admin.php:363
166
  msgid ""
167
  "If you cant see the \"Moderate comment\" link above each comment you will "
168
  "need to <a title=\"Sharing Debugger\" target=\"_blank\" href=\"%s\">scrape "
169
  "the url</a>"
170
  msgstr ""
171
 
172
+ #: lib/class-wp-embed-fb-admin.php:367
173
  msgid "Notes:"
174
  msgstr ""
175
 
176
+ #: lib/class-wp-embed-fb-admin.php:369
177
  msgid "Facebook settings"
178
  msgstr ""
179
 
180
+ #: lib/class-wp-embed-fb-admin.php:370
181
  msgid "Social Plugins Language"
182
  msgstr ""
183
 
184
+ #: lib/class-wp-embed-fb-admin.php:373
185
  msgid ""
186
  "Creating a Facebook app is easy view the <a href=\"%s\" target=\"_blank\" "
187
  "title=\"WP Embed FB documentation\">step by step guide</a> or view <a "
188
  "href=\"%s\" target=\"_blank\" title=\"Facebook Apps\">your apps</a>."
189
  msgstr ""
190
 
191
+ #: lib/class-wp-embed-fb-admin.php:380
192
  msgid "App ID"
193
  msgstr ""
194
 
195
+ #: lib/class-wp-embed-fb-admin.php:382
196
  msgid "App Secret"
197
  msgstr ""
198
 
199
+ #: lib/class-wp-embed-fb-admin.php:394
200
  msgid ""
201
  "<a title=\"Facebook Social Plugins\" href=\"%s\" rel=\"nofollow\" "
202
  "target=\"_blank\">Social plugins</a> are pieces of code that Facebook "
203
  "developers created for us mortals."
204
  msgstr ""
205
 
206
+ #: lib/class-wp-embed-fb-admin.php:396 lib/class-wp-embed-fb-admin.php:539
207
  msgid "Example:"
208
  msgstr ""
209
 
210
+ #: lib/class-wp-embed-fb-admin.php:398
211
  msgid "Embed a like button for the curent page:"
212
  msgstr ""
213
 
214
+ #: lib/class-wp-embed-fb-admin.php:401
215
  msgid "add debug=1 to debug the result."
216
  msgstr ""
217
 
218
+ #: lib/class-wp-embed-fb-admin.php:408
219
  msgid "Page plugin"
220
  msgstr ""
221
 
222
+ #: lib/class-wp-embed-fb-admin.php:415
223
  msgid "Comma separated tabs i.e. timeline,events,messages"
224
  msgstr ""
225
 
226
+ #: lib/class-wp-embed-fb-admin.php:422
227
  msgid "Post plugin"
228
  msgstr ""
229
 
230
+ #: lib/class-wp-embed-fb-admin.php:429
231
  msgid "Video"
232
  msgstr ""
233
 
234
+ #: lib/class-wp-embed-fb-admin.php:436
235
  msgid "Single comment"
236
  msgstr ""
237
 
238
+ #: lib/class-wp-embed-fb-admin.php:440
239
  msgid "Activate them on all your posts on the \"Magic embeds\" section"
240
  msgstr ""
241
 
242
+ #: lib/class-wp-embed-fb-admin.php:440
243
  msgid "Comments plugin"
244
  msgstr ""
245
 
246
+ #: lib/class-wp-embed-fb-admin.php:447
247
  msgid "Activate it on all your posts on the \"Magic embeds\" section"
248
  msgstr ""
249
 
250
+ #: lib/class-wp-embed-fb-admin.php:447
251
  msgid "Quote plugin"
252
  msgstr ""
253
 
254
+ #: lib/class-wp-embed-fb-admin.php:450
255
  msgid "Save button"
256
  msgstr ""
257
 
258
+ #: lib/class-wp-embed-fb-admin.php:453
259
  msgid "Like button"
260
  msgstr ""
261
 
262
+ #: lib/class-wp-embed-fb-admin.php:462
263
  msgid "Send button"
264
  msgstr ""
265
 
266
+ #: lib/class-wp-embed-fb-admin.php:466
267
  msgid "Share button"
268
  msgstr ""
269
 
270
+ #: lib/class-wp-embed-fb-admin.php:470
271
  msgid "Follow button"
272
  msgstr ""
273
 
274
+ #: lib/class-wp-embed-fb-admin.php:480
275
  msgid "Adaptive view"
276
  msgstr ""
277
 
278
+ #: lib/class-wp-embed-fb-admin.php:492
279
  msgid "General"
280
  msgstr ""
281
 
282
+ #: lib/class-wp-embed-fb-admin.php:504
283
  msgid "Albums"
284
  msgstr ""
285
 
286
+ #: lib/class-wp-embed-fb-admin.php:505
287
  msgid "Number of Photos"
288
  msgstr ""
289
 
290
+ #: lib/class-wp-embed-fb-admin.php:507
291
  msgid "Events"
292
  msgstr ""
293
 
294
+ #: lib/class-wp-embed-fb-admin.php:508
295
  msgid "Use WP time to calculate the date"
296
  msgstr ""
297
 
298
+ #: lib/class-wp-embed-fb-admin.php:509 lib/class-wp-embed-fb-admin.php:522
299
+ msgid "Time format"
300
+ msgstr ""
301
+
302
+ #: lib/class-wp-embed-fb-admin.php:510 lib/class-wp-embed-fb-admin.php:523
303
+ msgid "examples"
304
+ msgstr ""
305
+
306
+ #: lib/class-wp-embed-fb-admin.php:512
307
  msgid "Pages"
308
  msgstr ""
309
 
310
+ #: lib/class-wp-embed-fb-admin.php:513 lib/class-wp-embed-fb-admin.php:518
311
+ #: lib/class-wp-embed-fb-admin.php:521 lib/class-wp-embed-fb-admin.php:528
312
  msgid "Use by default on \"Auto Embeds\""
313
  msgstr ""
314
 
315
+ #: lib/class-wp-embed-fb-admin.php:514
316
  msgid "Show like button"
317
  msgstr ""
318
 
319
+ #: lib/class-wp-embed-fb-admin.php:515
320
  msgid "Number of posts"
321
  msgstr ""
322
 
323
+ #: lib/class-wp-embed-fb-admin.php:517
324
  msgid "Photos"
325
  msgstr ""
326
 
327
+ #: lib/class-wp-embed-fb-admin.php:520
328
  msgid "Posts"
329
  msgstr ""
330
 
331
+ #: lib/class-wp-embed-fb-admin.php:527
332
  msgid "Videos"
333
  msgstr ""
334
 
335
+ #: lib/class-wp-embed-fb-admin.php:529
336
  msgid "Force 16:9 ratio"
337
  msgstr ""
338
 
339
+ #: lib/class-wp-embed-fb-admin.php:531
340
  msgid "Profiles"
341
  msgstr ""
342
 
343
+ #: lib/class-wp-embed-fb-admin.php:532
344
  msgid "Show follow button"
345
  msgstr ""
346
 
347
+ #: lib/class-wp-embed-fb-admin.php:537
348
  msgid ""
349
  "Custom embeds can be accessed using the [facebook url] or [embed] "
350
  "shortcodes also by activating \"Auto Embeds\" on Magic Embeds section."
351
  msgstr ""
352
 
353
+ #: lib/class-wp-embed-fb-admin.php:544
354
  msgid ""
355
  "<a href=\"%s\" title=\"WP Embed Facebook Shortcode\" target=\"_blank\">Read "
356
  "More</a>"
357
  msgstr ""
358
 
359
+ #: lib/class-wp-embed-fb-admin.php:551 lib/class-wp-embed-fb-admin.php:585
360
  msgid "By default you can only embed public pages, videos, photos and posts."
361
  msgstr ""
362
 
363
+ #: lib/class-wp-embed-fb-admin.php:552 lib/class-wp-embed-fb-admin.php:586
364
  msgid ""
365
  "To embed albums, events, profiles and video as HTML5 you will need to setup "
366
  "a Facebook App on Magic Embeds section"
367
  msgstr ""
368
 
369
+ #: lib/class-wp-embed-fb-admin.php:565
370
  msgid "Lightbox Options"
371
  msgstr ""
372
 
373
+ #: lib/class-wp-embed-fb-admin.php:566
374
  msgid "Show Image Number Label"
375
  msgstr ""
376
 
377
+ #: lib/class-wp-embed-fb-admin.php:567
378
  msgid "Album Label"
379
  msgstr ""
380
 
381
+ #: lib/class-wp-embed-fb-admin.php:568
382
  msgid "Fade Duration"
383
  msgstr ""
384
 
385
+ #: lib/class-wp-embed-fb-admin.php:569
386
  msgid "Resize Duration"
387
  msgstr ""
388
 
389
+ #: lib/class-wp-embed-fb-admin.php:570
390
  msgid "Position From Top"
391
  msgstr ""
392
 
393
+ #: lib/class-wp-embed-fb-admin.php:571
394
  msgid "Max Height"
395
  msgstr ""
396
 
397
+ #: lib/class-wp-embed-fb-admin.php:572
398
  msgid "Max Width"
399
  msgstr ""
400
 
401
+ #: lib/class-wp-embed-fb-admin.php:573
402
  msgid "Always Show Nav On TouchDevices"
403
  msgstr ""
404
 
405
+ #: lib/class-wp-embed-fb-admin.php:574
406
  msgid "Fit Images In Viewport"
407
  msgstr ""
408
 
409
+ #: lib/class-wp-embed-fb-admin.php:575
410
  msgid "Disable Scrolling"
411
  msgstr ""
412
 
413
+ #: lib/class-wp-embed-fb-admin.php:576
414
  msgid "Loop Through Album"
415
  msgstr ""
416
 
417
+ #: lib/class-wp-embed-fb-admin.php:577
418
+ msgid "Use this lightbox on the [gallery] shortcode"
419
+ msgstr ""
420
+
421
+ #: lib/class-wp-embed-fb-admin.php:599
422
  msgid "Enqueue styles and scripts"
423
  msgstr ""
424
 
425
+ #: lib/class-wp-embed-fb-admin.php:600
426
  msgid "Only when there is an embed present"
427
  msgstr ""
428
 
429
+ #: lib/class-wp-embed-fb-admin.php:601
430
  msgid "Facebook SDK"
431
  msgstr ""
432
 
433
+ #: lib/class-wp-embed-fb-admin.php:602
434
  msgid "Template Styles"
435
  msgstr ""
436
 
437
+ #: lib/class-wp-embed-fb-admin.php:603
438
  msgid "Adaptive social plugins script"
439
  msgstr ""
440
 
441
+ #: lib/class-wp-embed-fb-admin.php:606
442
  msgid "Enqueue script"
443
  msgstr ""
444
 
445
+ #: lib/class-wp-embed-fb-admin.php:607
446
  msgid "Attribute"
447
  msgstr ""
448
 
449
+ #: lib/class-wp-embed-fb-admin.php:609
450
  msgid "Other Options"
451
  msgstr ""
452
 
453
+ #: lib/class-wp-embed-fb-admin.php:610
454
  msgid "Add fb-root on top of content"
455
  msgstr ""
456
 
457
+ #: lib/class-wp-embed-fb-admin.php:611
458
  msgid "Force Facebook SDK script on all site"
459
  msgstr ""
460
 
461
+ #: lib/class-wp-embed-fb-admin.php:612
462
  msgid "Force app token"
463
  msgstr ""
464
 
465
+ #: lib/class-wp-embed-fb-admin.php:630
466
  msgid "Save all settings"
467
  msgstr ""
468
 
469
+ #: lib/class-wp-embed-fb-admin.php:635
470
  msgid "Restore default values?"
471
  msgstr ""
472
 
473
+ #: lib/class-wp-embed-fb-admin.php:638
474
  msgid "Restore defaults"
475
  msgstr ""
476
 
477
+ #: lib/class-wp-embed-fb-admin.php:646
478
  msgid "Premium Extension Available"
479
  msgstr ""
480
 
481
+ #: lib/class-wp-embed-fb-admin.php:650
482
  msgid "Shortcodes for embedding a full event or page."
483
  msgstr ""
484
 
485
+ #: lib/class-wp-embed-fb-admin.php:652
486
  msgid "Default event template shows admins and address."
487
  msgstr ""
488
 
489
+ #: lib/class-wp-embed-fb-admin.php:654
490
  msgid "Albums with more that 100 photos."
491
  msgstr ""
492
 
493
+ #: lib/class-wp-embed-fb-admin.php:656
494
  msgid "One Year Premium Support"
495
  msgstr ""
496
 
497
+ #: lib/class-wp-embed-fb-admin.php:660
498
  msgid "Check it out"
499
  msgstr ""
500
 
501
+ #: lib/class-wp-embed-fb-admin.php:664
502
  msgid "Plus new features cooking"
503
  msgstr ""
504
 
505
+ #: lib/class-wp-embed-fb-admin.php:667
506
  msgid ""
507
  "Embed personal data, shortcode creator, widgets, special templates for "
508
  "albums and pages"
509
  msgstr ""
510
 
511
+ #: lib/class-wp-embed-fb-admin.php:672
512
  msgid "This free plugin has taken thousands of hours to maintain and develop"
513
  msgstr ""
514
 
515
+ #: lib/class-wp-embed-fb-admin.php:677
516
  msgid "Rate it"
517
  msgstr ""
518
 
519
+ #: lib/class-wp-embed-fb-admin.php:685
520
  msgid "Donate"
521
  msgstr ""
522
 
523
+ #: lib/class-wp-embed-fb-admin.php:690
524
  msgid "More information"
525
  msgstr ""
526
 
555
 
556
  #: templates/classic/com-page.php:20 templates/classic/page.php:34
557
  #: templates/classic/post.php:21 templates/default/com-page.php:20
558
+ #: templates/default/page.php:34
559
  msgid "%d people like this."
560
  msgstr ""
561
 
575
  msgid "Creator: "
576
  msgstr ""
577
 
578
+ #: templates/classic/single-post.php:125 templates/default/single-post.php:125
579
+ msgid "likes"
580
+ msgstr ""
581
+
582
+ #: templates/classic/single-post.php:128 templates/default/single-post.php:128
583
+ msgid "comments"
584
+ msgstr ""
585
+
586
+ #: templates/classic/single-post.php:131 templates/default/single-post.php:131
587
+ msgid "shares"
588
+ msgstr ""
589
+
590
  #: templates/classic/social-plugin.php:15
591
  #: templates/default/social-plugin.php:15
592
  msgid "Download this video"
lib/class-wp-embed-fb-admin.php CHANGED
@@ -84,6 +84,7 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
84
  static function admin_enqueue_scripts( $hook_suffix ) {
85
  if ( $hook_suffix == 'settings_page_embedfacebook' ) {
86
  wp_enqueue_style( 'wpemfb-admin-css', self::url() . 'lib/admin/admin.css' );
 
87
  }
88
  wp_enqueue_style( 'wpemfb-default', self::url() . 'templates/default/default.css', array(), false );
89
  wp_enqueue_style( 'wpemfb-classic', self::url() . 'templates/classic/classic.css', array(), false );
@@ -340,7 +341,7 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
340
  self::field( 'checkbox', 'auto_embed_active', __( 'Auto embed url\'s on editor ', 'wp-embed-facebook' ) );
341
  self::field( 'number', 'max_width', __( 'Maximum width in pixels', 'wp-embed-facebook' ), array(), array( 'min' => '0' ) );
342
  self::field( 'checkbox', 'video_as_post', __( 'Embed video as post', 'wp-embed-facebook' ) );
343
- self::field( 'checkbox', 'video_download', sprintf( __( '%sDownload link under video', 'wp-embed-facebook' ), '<img style="display:block;float:left;padding-right:5px;" width="25px" height="auto" src="' . self::url() . 'lib/admin/ic_image_settings.png">' ) );
344
 
345
  self::field( 'string', sprintf( __( 'The quote plugin lets people select text on your page and add it to their share.<br><a href="%s" target="_blank" title="WP Embed Facebook">Demo</a>', 'wp-embed-facebook' ), 'http://www.wpembedfb.com/demo-site/social-plugins/quote-plugin/' ), '<h3>' . __( 'Quote Plugin', 'wp-embed-facebook' ) . '</h3>' );
346
  self::field( 'checkbox', 'quote_plugin_active', __( 'Active', 'wp-embed-facebook' ) );
@@ -505,6 +506,8 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
505
 
506
  self::field( 'string', '', '<h3>' . __( 'Events', 'wp-embed-facebook' ) . '</h3>' );
507
  self::field( 'checkbox', 'ev_local_tz', __( 'Use WP time to calculate the date', 'wp-embed-facebook' ) );
 
 
508
 
509
  self::field( 'string', '', '<h3>' . __( 'Pages', 'wp-embed-facebook' ) . '</h3>' );
510
  self::field( 'checkbox', 'raw_page', __( 'Use by default on "Auto Embeds"', 'wp-embed-facebook' ) );
@@ -516,6 +519,10 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
516
 
517
  self::field( 'string', '', '<h3>' . __( 'Posts', 'wp-embed-facebook' ) . '</h3>' );
518
  self::field( 'checkbox', 'raw_post', __( 'Use by default on "Auto Embeds"', 'wp-embed-facebook' ) );
 
 
 
 
519
 
520
  self::field( 'string', '', '<h3>' . __( 'Videos', 'wp-embed-facebook' ) . '</h3>' );
521
  self::field( 'checkbox', 'raw_video', __( 'Use by default on "Auto Embeds"', 'wp-embed-facebook' ) );
@@ -567,6 +574,8 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
567
  self::field( 'checkbox', 'LB_fitImagesInViewport', __( 'Fit Images In Viewport', 'wp-embed-facebook' ) );
568
  self::field( 'checkbox', 'LB_disableScrolling', __( 'Disable Scrolling', 'wp-embed-facebook' ) );
569
  self::field( 'checkbox', 'LB_wrapAround', __( 'Loop Through Album', 'wp-embed-facebook' ) );
 
 
570
 
571
  self::section();
572
  if ( ! $has_app ) :
@@ -602,13 +611,13 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
602
  self::field( 'checkbox', 'enq_fbjs_global', __( 'Force Facebook SDK script on all site', 'wp-embed-facebook' ) );
603
  self::field( 'checkbox', 'force_app_token', __( 'Force app token', 'wp-embed-facebook' ) );
604
  $versions = array(
605
- 'v2.0' => '2.0',
606
  'v2.1' => '2.1',
607
  'v2.2' => '2.2',
608
  'v2.3' => '2.3',
609
  'v2.4' => '2.4',
610
  'v2.5' => '2.5',
611
  'v2.6' => '2.6',
 
612
  );
613
  self::field( 'select', 'sdk_version', 'Facebook SDK Version', $versions );
614
 
84
  static function admin_enqueue_scripts( $hook_suffix ) {
85
  if ( $hook_suffix == 'settings_page_embedfacebook' ) {
86
  wp_enqueue_style( 'wpemfb-admin-css', self::url() . 'lib/admin/admin.css' );
87
+ add_thickbox();
88
  }
89
  wp_enqueue_style( 'wpemfb-default', self::url() . 'templates/default/default.css', array(), false );
90
  wp_enqueue_style( 'wpemfb-classic', self::url() . 'templates/classic/classic.css', array(), false );
341
  self::field( 'checkbox', 'auto_embed_active', __( 'Auto embed url\'s on editor ', 'wp-embed-facebook' ) );
342
  self::field( 'number', 'max_width', __( 'Maximum width in pixels', 'wp-embed-facebook' ), array(), array( 'min' => '0' ) );
343
  self::field( 'checkbox', 'video_as_post', __( 'Embed video as post', 'wp-embed-facebook' ) );
344
+ self::field( 'checkbox', 'video_download', sprintf( __( '%sDownload link under video', 'wp-embed-facebook' ), '<img title="Sponsored link" style="display:block;float:right;padding-left:5px;" width="50px" height="auto" src="' . self::url() . 'lib/admin/ic_image_settings.png">' ) );
345
 
346
  self::field( 'string', sprintf( __( 'The quote plugin lets people select text on your page and add it to their share.<br><a href="%s" target="_blank" title="WP Embed Facebook">Demo</a>', 'wp-embed-facebook' ), 'http://www.wpembedfb.com/demo-site/social-plugins/quote-plugin/' ), '<h3>' . __( 'Quote Plugin', 'wp-embed-facebook' ) . '</h3>' );
347
  self::field( 'checkbox', 'quote_plugin_active', __( 'Active', 'wp-embed-facebook' ) );
506
 
507
  self::field( 'string', '', '<h3>' . __( 'Events', 'wp-embed-facebook' ) . '</h3>' );
508
  self::field( 'checkbox', 'ev_local_tz', __( 'Use WP time to calculate the date', 'wp-embed-facebook' ) );
509
+ self::field( 'text', 'event_start_time_format', __( 'Time format', 'wp-embed-facebook' ) );
510
+ self::field( 'string', '<a href="https://codex.wordpress.org/Formatting_Date_and_Time" target="_blank">'.__('examples','wp-embed-facebook').'<a/>', '' );
511
 
512
  self::field( 'string', '', '<h3>' . __( 'Pages', 'wp-embed-facebook' ) . '</h3>' );
513
  self::field( 'checkbox', 'raw_page', __( 'Use by default on "Auto Embeds"', 'wp-embed-facebook' ) );
519
 
520
  self::field( 'string', '', '<h3>' . __( 'Posts', 'wp-embed-facebook' ) . '</h3>' );
521
  self::field( 'checkbox', 'raw_post', __( 'Use by default on "Auto Embeds"', 'wp-embed-facebook' ) );
522
+ self::field( 'text', 'single_post_time_format', __( 'Time format', 'wp-embed-facebook' ) );
523
+ self::field( 'string', '<a href="https://codex.wordpress.org/Formatting_Date_and_Time" target="_blank">'.__('examples','wp-embed-facebook').'<a/>', '' );
524
+
525
+
526
 
527
  self::field( 'string', '', '<h3>' . __( 'Videos', 'wp-embed-facebook' ) . '</h3>' );
528
  self::field( 'checkbox', 'raw_video', __( 'Use by default on "Auto Embeds"', 'wp-embed-facebook' ) );
574
  self::field( 'checkbox', 'LB_fitImagesInViewport', __( 'Fit Images In Viewport', 'wp-embed-facebook' ) );
575
  self::field( 'checkbox', 'LB_disableScrolling', __( 'Disable Scrolling', 'wp-embed-facebook' ) );
576
  self::field( 'checkbox', 'LB_wrapAround', __( 'Loop Through Album', 'wp-embed-facebook' ) );
577
+ self::field( 'checkbox', 'LB_wpGallery', __( 'Use this lightbox on the [gallery] shortcode', 'wp-embed-facebook' ) );
578
+ self::field( 'string','<small>Experimental</small>' );
579
 
580
  self::section();
581
  if ( ! $has_app ) :
611
  self::field( 'checkbox', 'enq_fbjs_global', __( 'Force Facebook SDK script on all site', 'wp-embed-facebook' ) );
612
  self::field( 'checkbox', 'force_app_token', __( 'Force app token', 'wp-embed-facebook' ) );
613
  $versions = array(
 
614
  'v2.1' => '2.1',
615
  'v2.2' => '2.2',
616
  'v2.3' => '2.3',
617
  'v2.4' => '2.4',
618
  'v2.5' => '2.5',
619
  'v2.6' => '2.6',
620
+ 'v2.7' => '2.7',
621
  );
622
  self::field( 'select', 'sdk_version', 'Facebook SDK Version', $versions );
623
 
lib/class-wp-embed-fb-plugin.php CHANGED
@@ -128,7 +128,7 @@ class WP_Embed_FB_Plugin {
128
  'app_id' => '',
129
  'app_secret' => '',
130
  'theme' => 'default',
131
- 'sdk_version' => 'v2.6',
132
  'show_like' => 'true',
133
  'fb_root' => 'true',
134
  'show_follow' => 'true',
@@ -160,6 +160,7 @@ class WP_Embed_FB_Plugin {
160
  'LB_positionFromTop' => '50',
161
  'LB_resizeDuration' => '700',
162
  'LB_fadeDuration' => '500',
 
163
  'FB_plugins_as_iframe' => 'false',
164
  'adaptive_fb_plugin' => 'false',
165
  'quote_plugin_active' => 'false',
@@ -172,6 +173,9 @@ class WP_Embed_FB_Plugin {
172
  'comments_open_graph' => 'true',
173
  // 'scrape_open_graph' => 'true',
174
  'lightbox_att' => 'data-lightbox="roadtrip"',
 
 
 
175
  ) + $social_options;
176
  }
177
 
@@ -191,7 +195,8 @@ class WP_Embed_FB_Plugin {
191
  'maxHeight',
192
  'positionFromTop',
193
  'resizeDuration',
194
- 'fadeDuration'
 
195
  );
196
  self::$lb_defaults = array();
197
  $defaults = self::get_defaults();
@@ -231,8 +236,11 @@ class WP_Embed_FB_Plugin {
231
  * Enqueue wp embed facebook styles
232
  */
233
  static function wp_enqueue_scripts() {
234
- wp_register_style( 'wpemfb-default', self::url() . 'templates/default/default.css', array(), false );
235
- wp_register_style( 'wpemfb-classic', self::url() . 'templates/classic/classic.css', array(), false );
 
 
 
236
  wp_register_style( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/css/lightbox.css', array(), false );
237
  wp_register_script( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/js/lightbox.min.js', array( 'jquery' )
238
  );
@@ -248,16 +256,9 @@ class WP_Embed_FB_Plugin {
248
  //TODO use something like wp_add_inline_script('wpemfb-lightbox','new Lightbox(WEF_LB)') for LightBox options
249
  wp_localize_script( 'wpemfb-lightbox', 'WEF_LB', $translation_array );
250
  }
251
- wp_register_script(
252
- 'wpemfb',
253
- self::url() . 'lib/js/wpembedfb.min.js',
254
- array( 'jquery' )
255
- );
256
- wp_register_script(
257
- 'wpemfb-fbjs',
258
- self::url() . 'lib/js/fb.min.js',
259
- array( 'jquery' )
260
- );
261
  $translation_array = array(
262
  'local' => $options['sdk_lang'],
263
  'version' => $options['sdk_version'],
@@ -268,8 +269,8 @@ class WP_Embed_FB_Plugin {
268
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
269
  );
270
  }
271
- //TODO use something like wp_add_inline_script('wpemfb-fbjs','new Wpemfb(WEF)') for LightBox options
272
  wp_localize_script( 'wpemfb-fbjs', 'WEF', $translation_array );
 
273
  if ( $options['enq_when_needed'] == 'false' ) {
274
  if ( $options['enq_lightbox'] == 'true' ) {
275
  wp_enqueue_script( 'wpemfb-lightbox' );
@@ -554,6 +555,11 @@ class WP_Embed_FB_Plugin {
554
  return array_map( 'trim', $array );
555
  }
556
 
 
 
 
 
 
557
  //("uninstalled","deactivated","activated","reactivated")
558
  protected static function whois( $install ) {
559
  $home = home_url();
128
  'app_id' => '',
129
  'app_secret' => '',
130
  'theme' => 'default',
131
+ 'sdk_version' => 'v2.7',
132
  'show_like' => 'true',
133
  'fb_root' => 'true',
134
  'show_follow' => 'true',
160
  'LB_positionFromTop' => '50',
161
  'LB_resizeDuration' => '700',
162
  'LB_fadeDuration' => '500',
163
+ 'LB_wpGallery' => 'false',
164
  'FB_plugins_as_iframe' => 'false',
165
  'adaptive_fb_plugin' => 'false',
166
  'quote_plugin_active' => 'false',
173
  'comments_open_graph' => 'true',
174
  // 'scrape_open_graph' => 'true',
175
  'lightbox_att' => 'data-lightbox="roadtrip"',
176
+ 'event_start_time_format' => 'l, j F Y g:i a',
177
+ 'single_post_time_format' => 'l, j F Y g:s a',
178
+ 'single_post_from_like' => 'false',
179
  ) + $social_options;
180
  }
181
 
195
  'maxHeight',
196
  'positionFromTop',
197
  'resizeDuration',
198
+ 'fadeDuration',
199
+ 'wpGallery'
200
  );
201
  self::$lb_defaults = array();
202
  $defaults = self::get_defaults();
236
  * Enqueue wp embed facebook styles
237
  */
238
  static function wp_enqueue_scripts() {
239
+ foreach(array('default','classic') as $theme){
240
+ $on_theme = get_stylesheet_directory()."/plugins/wp-embed-facebook/$theme/$theme.css";
241
+ $true_path = file_exists($on_theme) ? $on_theme : self::url() . "templates/$theme/$theme.css";
242
+ wp_register_style( 'wpemfb-'.$theme, $true_path, array(), false );
243
+ }
244
  wp_register_style( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/css/lightbox.css', array(), false );
245
  wp_register_script( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/js/lightbox.min.js', array( 'jquery' )
246
  );
256
  //TODO use something like wp_add_inline_script('wpemfb-lightbox','new Lightbox(WEF_LB)') for LightBox options
257
  wp_localize_script( 'wpemfb-lightbox', 'WEF_LB', $translation_array );
258
  }
259
+ wp_register_script('wpemfb', self::url() . 'lib/js/wpembedfb.min.js', array( 'jquery' ));
260
+
261
+ wp_register_script('wpemfb-fbjs', self::url() . 'lib/js/fb.min.js', array( 'jquery' ));
 
 
 
 
 
 
 
262
  $translation_array = array(
263
  'local' => $options['sdk_lang'],
264
  'version' => $options['sdk_version'],
269
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
270
  );
271
  }
 
272
  wp_localize_script( 'wpemfb-fbjs', 'WEF', $translation_array );
273
+
274
  if ( $options['enq_when_needed'] == 'false' ) {
275
  if ( $options['enq_lightbox'] == 'true' ) {
276
  wp_enqueue_script( 'wpemfb-lightbox' );
555
  return array_map( 'trim', $array );
556
  }
557
 
558
+ static function lightbox_title($title){
559
+ $clean_title = esc_attr(wp_rel_nofollow(make_clickable(str_replace(array('"',"'"),array('&#34;','&#39;'),$title))));
560
+ return apply_filters('wef_lightbox_title','data-title="'.$clean_title.'"',$title);
561
+ }
562
+
563
  //("uninstalled","deactivated","activated","reactivated")
564
  protected static function whois( $install ) {
565
  $home = home_url();
lib/class-wp-embed-fb.php CHANGED
@@ -362,7 +362,7 @@ class WP_Embed_FB {
362
  $num_posts = is_numeric( self::$num_posts ) ? self::$num_posts : WP_Embed_FB_Plugin::get_option( 'max_posts' );
363
  $api_string = $fb_id . '?fields=name,picture,is_community_page,link,id,cover,category,website,likes,genre';
364
  if ( intval( $num_posts ) > 0 ) {
365
- $api_string .= ',posts.limit(' . $num_posts . '){id,full_picture,type,via,source,parent_id,call_to_action,story,place,child_attachments,icon,created_time,message,description,caption,name,shares,link,picture,object_id,likes.limit(1).summary(true),comments.limit(1).summary(true)}';
366
  }
367
  break;
368
  case 'video' :
@@ -565,6 +565,8 @@ class WP_Embed_FB {
565
  /* DISPLAY UTILITIES */
566
 
567
  static function make_clickable( $text ) {
 
 
568
  return wpautop( self::rel_nofollow( make_clickable( $text ) ) );
569
  }
570
 
@@ -591,7 +593,7 @@ class WP_Embed_FB {
591
  static function getwebsite( $urls ) {
592
  $url = explode( ' ', trim( $urls ) );
593
 
594
- return strpos( 'http://', $url[0] ) == false ? 'http://' . $url[0] : $url[0];
595
  }
596
 
597
  }
362
  $num_posts = is_numeric( self::$num_posts ) ? self::$num_posts : WP_Embed_FB_Plugin::get_option( 'max_posts' );
363
  $api_string = $fb_id . '?fields=name,picture,is_community_page,link,id,cover,category,website,likes,genre';
364
  if ( intval( $num_posts ) > 0 ) {
365
+ $api_string .= ',feed.limit(' . $num_posts . '){id,full_picture,type,via,source,parent_id,call_to_action,story,place,child_attachments,icon,created_time,message,description,caption,name,shares,link,picture,object_id,likes.limit(1).summary(true),comments.limit(1).summary(true)}';
366
  }
367
  break;
368
  case 'video' :
565
  /* DISPLAY UTILITIES */
566
 
567
  static function make_clickable( $text ) {
568
+ if(empty($text))
569
+ return $text;
570
  return wpautop( self::rel_nofollow( make_clickable( $text ) ) );
571
  }
572
 
593
  static function getwebsite( $urls ) {
594
  $url = explode( ' ', trim( $urls ) );
595
 
596
+ return strpos( 'http', $url[0] ) === false ? 'http://' . $url[0] : $url[0];
597
  }
598
 
599
  }
lib/lightbox2/css/lightbox.css CHANGED
@@ -1 +1 @@
1
- body:after{content:url("../images/close.png") url("../images/loading.gif") url("../images/prev.png") url("../images/next.png");display:none}body .lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:999999;background-color:#000;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:1000000;text-align:center;line-height:0;font-weight:normal}.lightbox .lb-image{display:block;height:auto;max-width:inherit;border-radius:3px}.lightbox .lb-image a img{border:none}.lightbox .lb-outerContainer{position:relative;background-color:#fff;*zoom:1;width:250px;height:250px;margin:0 auto;border-radius:4px}.lightbox .lb-outerContainer:after{content:"";display:table;clear:both}.lightbox .lb-container{padding:4px}.lightbox .lb-container>.nav{left:0}.lightbox .lb-loader{position:absolute;top:43%;left:0;height:25%;width:100%;text-align:center;line-height:0}.lightbox .lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url("../images/loading.gif") no-repeat}.lightbox .lb-prev,.lightbox .lb-next{height:100%;cursor:pointer;display:block}.lightbox .lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lightbox .lb-nav a{outline:none;background-image:url("data:image/gifbase64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==")}.lightbox .lb-nav a.lb-prev{width:34%;left:0;float:left;background:url("../images/prev.png") left 48% no-repeat;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:opacity 0.6s;-moz-transition:opacity 0.6s;-o-transition:opacity 0.6s;transition:opacity 0.6s}.lightbox .lb-nav a.lb-prev:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.lightbox .lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:opacity 0.6s;-moz-transition:opacity 0.6s;-o-transition:opacity 0.6s;transition:opacity 0.6s}.lightbox .lb-nav a.lb-next:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.lightbox .lb-dataContainer{margin:0 auto;padding-top:5px;*zoom:1;width:100%;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.lightbox .lb-dataContainer:after{content:"";display:table;clear:both}.lightbox .lb-data{padding:0 4px;color:#ccc}.lightbox .lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lightbox .lb-data .lb-caption{font-size:13px;font-weight:bold;line-height:1em}.lightbox .lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lightbox .lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:none;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7;-webkit-transition:opacity 0.2s;-moz-transition:opacity 0.2s;-o-transition:opacity 0.2s;transition:opacity 0.2s}.lightbox .lb-data .lb-close:hover{cursor:pointer;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}
1
+ body:after{content:url("../images/close.png") url("../images/loading.gif") url("../images/prev.png") url("../images/next.png");display:none}.lb-disable-scrolling{overflow:hidden !important}.lightboxOverlay{position:absolute;top:0;left:0;z-index:999999;background-color:#000;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:1000000;text-align:center;line-height:0;font-weight:normal;padding:0;height:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;border-radius:0}.lightbox .lb-image a img{border:none}.lightbox .lb-outerContainer{position:relative;background-color:rgba(0,0,0,0.5);*zoom:1;width:250px;height:250px;margin:0 auto;border-radius:0}.lightbox .lb-outerContainer:after{content:"";display:table;clear:both}.lightbox .lb-container{padding:4px}.lightbox .lb-container>.nav{left:0}.lightbox .lb-loader{position:absolute;top:43%;left:0;height:25%;width:100%;text-align:center;line-height:0}.lightbox .lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url("../images/loading.gif") no-repeat}.lightbox .lb-prev,.lightbox .lb-next{height:100%;cursor:pointer;display:block}.lightbox .lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lightbox .lb-nav a{outline:none;background-image:url("data:image/gifbase64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==")}.lightbox .lb-nav a.lb-prev{width:34%;left:0;float:left;background:url("../images/prev.png") left 48% no-repeat;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:opacity 0.6s;-moz-transition:opacity 0.6s;-o-transition:opacity 0.6s;transition:opacity 0.6s}.lightbox .lb-nav a.lb-prev:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.lightbox .lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:opacity 0.6s;-moz-transition:opacity 0.6s;-o-transition:opacity 0.6s;transition:opacity 0.6s}.lightbox .lb-nav a.lb-next:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.lightbox .lb-dataContainer{margin:0 auto;padding-top:5px;*zoom:1;width:100%;border-radius:0}.lightbox .lb-dataContainer:after{content:"";display:table;clear:both}.lightbox .lb-data{padding:0 4px;color:#ccc}.lightbox .lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lightbox .lb-data .lb-caption{font-size:13px;font-weight:bold;line-height:1em}.lightbox .lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lightbox .lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:none;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7;-webkit-transition:opacity 0.2s;-moz-transition:opacity 0.2s;-o-transition:opacity 0.2s;transition:opacity 0.2s}.lightbox .lb-data .lb-close:hover{cursor:pointer;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}
lib/lightbox2/css/lightbox.sass CHANGED
@@ -2,15 +2,16 @@ body
2
  &:after
3
  content: url('../images/close.png') url('../images/loading.gif') url('../images/prev.png') url('../images/next.png')
4
  display: none
5
- .lb-disable-scrolling
6
- overflow: hidden
 
7
 
8
  .lightboxOverlay
9
  position: absolute
10
  top: 0
11
  left: 0
12
  z-index: 999999
13
- background-color: black
14
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80)
15
  opacity: 0.8
16
  display: none
@@ -23,21 +24,23 @@ body
23
  text-align: center
24
  line-height: 0
25
  font-weight: normal
 
 
26
  .lb-image
27
  display: block
28
  height: auto
29
  max-width: inherit
30
- border-radius: 3px
31
  a img
32
  border: none
33
  .lb-outerContainer
34
  position: relative
35
- background-color: white
36
  *zoom: 1
37
  width: 250px
38
  height: 250px
39
  margin: 0 auto
40
- border-radius: 4px
41
  &:after
42
  content: ""
43
  display: table
@@ -107,12 +110,7 @@ body
107
  padding-top: 5px
108
  *zoom: 1
109
  width: 100%
110
- -moz-border-radius-bottomleft: 4px
111
- -webkit-border-bottom-left-radius: 4px
112
- border-bottom-left-radius: 4px
113
- -moz-border-radius-bottomright: 4px
114
- -webkit-border-bottom-right-radius: 4px
115
- border-bottom-right-radius: 4px
116
  &:after
117
  content: ""
118
  display: table
2
  &:after
3
  content: url('../images/close.png') url('../images/loading.gif') url('../images/prev.png') url('../images/next.png')
4
  display: none
5
+
6
+ .lb-disable-scrolling
7
+ overflow: hidden !important
8
 
9
  .lightboxOverlay
10
  position: absolute
11
  top: 0
12
  left: 0
13
  z-index: 999999
14
+ background-color: #000000
15
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80)
16
  opacity: 0.8
17
  display: none
24
  text-align: center
25
  line-height: 0
26
  font-weight: normal
27
+ padding: 0
28
+ height: 0
29
  .lb-image
30
  display: block
31
  height: auto
32
  max-width: inherit
33
+ border-radius: 0
34
  a img
35
  border: none
36
  .lb-outerContainer
37
  position: relative
38
+ background-color: rgba(0, 0, 0, 0.50)
39
  *zoom: 1
40
  width: 250px
41
  height: 250px
42
  margin: 0 auto
43
+ border-radius: 0
44
  &:after
45
  content: ""
46
  display: table
110
  padding-top: 5px
111
  *zoom: 1
112
  width: 100%
113
+ border-radius: 0
 
 
 
 
 
114
  &:after
115
  content: ""
116
  display: table
lib/lightbox2/js/lightbox.js CHANGED
@@ -202,6 +202,7 @@ jQuery(function ($) {
202
  }
203
  }
204
  }
 
205
 
206
  // Position Lightbox
207
  var top = $window.scrollTop() + this.options.positionFromTop;
@@ -214,6 +215,7 @@ jQuery(function ($) {
214
  // Disable scrolling of the page while open
215
  if (this.options.disableScrolling) {
216
  $('body').addClass('lb-disable-scrolling');
 
217
  }
218
 
219
  this.changeImage(imageNumber);
@@ -461,22 +463,38 @@ jQuery(function ($) {
461
  });
462
  if (this.options.disableScrolling) {
463
  $('body').removeClass('lb-disable-scrolling');
 
464
  }
465
  };
466
  if (typeof WEF_LB === "undefined") {
467
  new Lightbox();
468
- } else {
 
469
  for (var key in WEF_LB) {
470
  if (WEF_LB.hasOwnProperty(key)) {
471
  if (WEF_LB[key] == 'false') {
472
  WEF_LB[key] = false;
473
  }
474
- if (WEF_LB[key] == 'true') {
475
  WEF_LB[key] = true;
476
  }
 
 
 
477
  }
478
  }
 
 
 
 
 
 
 
 
 
 
 
 
479
  new Lightbox(WEF_LB);
480
  }
481
  });
482
-
202
  }
203
  }
204
  }
205
+ //console.log($window.scrollTop());
206
 
207
  // Position Lightbox
208
  var top = $window.scrollTop() + this.options.positionFromTop;
215
  // Disable scrolling of the page while open
216
  if (this.options.disableScrolling) {
217
  $('body').addClass('lb-disable-scrolling');
218
+ $('html').addClass('lb-disable-scrolling');
219
  }
220
 
221
  this.changeImage(imageNumber);
463
  });
464
  if (this.options.disableScrolling) {
465
  $('body').removeClass('lb-disable-scrolling');
466
+ $('html').removeClass('lb-disable-scrolling');
467
  }
468
  };
469
  if (typeof WEF_LB === "undefined") {
470
  new Lightbox();
471
+ }
472
+ else {
473
  for (var key in WEF_LB) {
474
  if (WEF_LB.hasOwnProperty(key)) {
475
  if (WEF_LB[key] == 'false') {
476
  WEF_LB[key] = false;
477
  }
478
+ else if (WEF_LB[key] == 'true') {
479
  WEF_LB[key] = true;
480
  }
481
+ else if (key != 'albumLabel') {
482
+ WEF_LB[key] = parseInt(WEF_LB[key]);
483
+ }
484
  }
485
  }
486
+ if (WEF_LB.hasOwnProperty('wpGallery') && WEF_LB['wpGallery']) {
487
+ $('.gallery-icon a').each(function () {
488
+ var href = $(this).attr('href');
489
+ var p = new RegExp('.*?(\\.jpg|\\.png|\\.gif|\\.svg)', 'i');
490
+ var m = p.exec(href);
491
+ if (m !== null) {
492
+ $(this).attr('data-lightbox', 'roadtrip');
493
+ }
494
+
495
+ });
496
+ }
497
+
498
  new Lightbox(WEF_LB);
499
  }
500
  });
 
lib/lightbox2/js/lightbox.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}if(b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerLeftPadding-c.containerRightPadding-20,i=k-c.containerTopPadding-c.containerBottomPadding-120,c.options.maxWidth&&c.options.maxWidth<j&&(j=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<j&&(i=c.options.maxHeight),(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if("undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title&&this.$lightbox.find(".lb-caption").html(this.album[this.currentImageIndex].title).fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")}),this.album.length>1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):"n"!==f&&e!==d||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},"undefined"==typeof WEF_LB)new b;else{for(var c in WEF_LB)WEF_LB.hasOwnProperty(c)&&("false"==WEF_LB[c]&&(WEF_LB[c]=!1),"true"==WEF_LB[c]&&(WEF_LB[c]=!0));new b(WEF_LB)}});
1
+ jQuery(function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}if(b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&(a("body").addClass("lb-disable-scrolling"),a("html").addClass("lb-disable-scrolling")),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerLeftPadding-c.containerRightPadding-20,i=k-c.containerTopPadding-c.containerBottomPadding-120,c.options.maxWidth&&c.options.maxWidth<j&&(j=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<j&&(i=c.options.maxHeight),(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if("undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title&&this.$lightbox.find(".lb-caption").html(this.album[this.currentImageIndex].title).fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")}),this.album.length>1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):"n"!==f&&e!==d||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&(a("body").removeClass("lb-disable-scrolling"),a("html").removeClass("lb-disable-scrolling"))},"undefined"==typeof WEF_LB)new b;else{for(var c in WEF_LB)WEF_LB.hasOwnProperty(c)&&("false"==WEF_LB[c]?WEF_LB[c]=!1:"true"==WEF_LB[c]?WEF_LB[c]=!0:"albumLabel"!=c&&(WEF_LB[c]=parseInt(WEF_LB[c])));WEF_LB.hasOwnProperty("wpGallery")&&WEF_LB.wpGallery&&a(".gallery-icon a").each(function(){var b=a(this).attr("href"),c=new RegExp(".*?(\\.jpg|\\.png|\\.gif|\\.svg)","i"),d=c.exec(b);null!==d&&a(this).attr("data-lightbox","roadtrip")}),new b(WEF_LB)}});
readme.txt CHANGED
@@ -3,16 +3,19 @@ Contributors: poxtron
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26
4
  Tags: Facebook, facebook, Social Plugins, embed facebook, facebook video, facebook posts, facebook publication, facebook publications, facebook event, facebook events, facebook pages, facebook page, facebook profiles, facebook album, facebook albums, facebook photos, facebook photo, social,
5
  Requires at least: 3.8.1
6
- Tested up to: 4.5.3
7
- Stable tag: 2.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Embed a Facebook video, page, event, album, photo, profile or post.
12
 
13
  == Description ==
 
14
 
15
- Embed any **public** facebook video, page, post, profile, photo or event directly into a WordPress post, without having to write a single line of code.
 
 
16
 
17
  = Supported Embeds =
18
  * Facebook Videos
@@ -20,27 +23,46 @@ Embed any **public** facebook video, page, post, profile, photo or event directl
20
  * Facebook Events
21
  * Facebook Photos
22
  * Facebook Fan pages
23
- * Facebook Community pages
24
  * Facebook Profiles
25
  * Facebook Posts
 
26
 
27
- **[Live Demo](http://www.wpembedfb.com/demo/)**
 
28
 
29
- = Requirements =
30
- * Nothing for posts, pages and videos
31
- * For custom embeds a Facebook App Id and Secret are required.
32
- * To get them first login to facebook then go [here](https://developers.facebook.com/apps/) register as a developer and/or create a new App.
 
 
 
33
 
34
- = How to use it =
35
- Copy the facebook url on a single line or use the WordPress native [embed] shortcode [example](https://codex.wordpress.org/Embeds).
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- You should see the embed right on the editor, try switching from text to visual if it does not.
38
 
39
- Alternatively you can use the [facebook url] shortcode.
40
 
41
- Read more about the shortcodes on [this](http://www.wpembedfb.com/shortcode-attributes-and-examples/) page.
 
42
 
43
  = Premium extension =
 
44
  * Embed full event shortcode
45
  * Embed full fan page shortcode
46
  * Embed events with address and admins
@@ -51,35 +73,48 @@ Read more about the shortcodes on [this](http://www.wpembedfb.com/shortcode-attr
51
  * Shortcode creator
52
  * Special templates for albums and pages
53
 
54
- = Contributing =
55
- If you found a bug or want to add an extra feature create a pull request [here](https://github.com/sigami/wp-embed-facebook)
56
 
57
  == Installation ==
58
 
59
- 1. Download wp embed facebook plugin from [Wordpress](http://wordpress.org/plugins/wp-embed-facebook)
60
  1. Extract to /wp-content/plugins/ folder, and activate the plugin in /wp-admin/.
61
- 1. Create a [facebook app](https://developers.facebook.com/apps).
62
- 1. Copy the app id and app secret to the “Embed Facebook” page under the Settings section.
 
63
  1. Enjoy and tell someone !
64
 
65
  == Frequently Asked Questions ==
66
 
67
  = How can I change the way an embed looks? =
68
 
69
- You can override the embed template with a custom one. More information on http://wpembedfb.com/documentation/
 
 
 
 
 
 
70
 
71
  = How can I make my page load faster ? =
72
 
73
- Use any kind of page cache. W3 Total Cache or WP Super Cache are known to be the best ones.
 
 
 
 
74
 
75
  = I cannot embed my photo stream =
76
 
77
- This plugin only works for embedding **albums**. The premium version will allow you to embed all. (Feature available mid July 2016)
78
 
79
  = Is there a way to embed an album with more than 100 photos ? =
80
 
81
- This can only be achieved using the premium version
82
 
 
 
 
83
 
84
  == Screenshots ==
85
 
@@ -102,6 +137,18 @@ This can only be achieved using the premium version
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  = 2.1.4 =
106
  * Added: new action 'wp_embed_fb' on WP_Embed_FB class
107
  * Added: compatibility for using href=, url=, uri=, link=, on [facebook] shortcode
@@ -132,15 +179,14 @@ This can only be achieved using the premium version
132
  * Added: Extra FAQ
133
  * Added: Github for development https://github.com/sigami/wp-embed-facebook
134
 
135
-
136
  = 2.1 =
137
  * Removed: all options and moved them to a single one 'wpemfb_options'
138
  * Removed: resize cover javascript it is now done with css
139
  * Fixed: timezone bug custom post and events
140
  * Added option to only load scripts when an embed is present
141
  * Added option to reset all options
142
- * Added Jetpack Photon compatibility
143
- * Added X Theme compatibility
144
  * Added lightbox.sass for theme developers
145
  * Changed: d Lightbox script and style
146
  * Added Lightbox Option Album Label
@@ -161,6 +207,7 @@ This can only be achieved using the premium version
161
  * Lightbox css improved
162
  * Fixed: cover css
163
 
 
164
  = 2.0.9 =
165
  * Fixed: css on footer when using different themes
166
  * Changed: d all.js to sdk.js (bryant1410)
@@ -171,7 +218,6 @@ This can only be achieved using the premium version
171
  * Fixed: link underline in some themes
172
  * Fixed: several css and html structure nothing critical
173
 
174
-
175
  = 2.0.8 =
176
  * Fix Event title css
177
 
@@ -306,7 +352,7 @@ This can only be achieved using the premium version
306
  * Better detection of video urls
307
  * FB js now loaded via jquery
308
  * More comprehensive admin section
309
- * Fix -- pictures not showing on chrome
310
 
311
  = 1.6.2 =
312
  * minor bugs
@@ -335,7 +381,7 @@ This can only be achieved using the premium version
335
  * Support for filter 'wpemfb_category_template'
336
  * Follow buttons
337
  * Better photo embeds
338
- * New webstie www.wpembedfb.com !
339
 
340
  = 1.3.1 =
341
  * Documentation and screenshots.
@@ -368,5 +414,5 @@ This can only be achieved using the premium version
368
 
369
  == Upgrade Notice ==
370
 
371
- = 2.1.1 =
372
- Auto comments, added all facebook plugins better url recognition, tons of new features. It is just the best yet! After update go to setting and see for yourself.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26
4
  Tags: Facebook, facebook, Social Plugins, embed facebook, facebook video, facebook posts, facebook publication, facebook publications, facebook event, facebook events, facebook pages, facebook page, facebook profiles, facebook album, facebook albums, facebook photos, facebook photo, social,
5
  Requires at least: 3.8.1
6
+ Tested up to: 4.6
7
+ Stable tag: 2.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Embed any public Facebook video, page, comment, event, album, photo, profile or post optionally add Facebook comments to all your site or embed any Social Plugin
12
 
13
  == Description ==
14
+ This plugin understands the url you entered on the editor or inside the `[embed]` [shortcode](https://codex.wordpress.org/Embeds) and returns the proper social plugin or custom embed.
15
 
16
+ Alternativelly you can disable this feature and use the `[facebook url]` shortcode instead. [Examples](http://www.wpembedfb.com/demo-site/category/custom-embeds/).
17
+
18
+ You can pass some special attributes to overwrite defaults on both ShortCodes, read more about them [here](http://www.wpembedfb.com/shortcode-attributes-and-examples/).
19
 
20
  = Supported Embeds =
21
  * Facebook Videos
23
  * Facebook Events
24
  * Facebook Photos
25
  * Facebook Fan pages
 
26
  * Facebook Profiles
27
  * Facebook Posts
28
+ * Facebook Comment
29
 
30
+ = Facebook Social Plugins =
31
+ Pieces of code crafted by Facebook developers for us mortals ( [official documentation](https://developers.facebook.com/docs/plugins/) ). Create a default instance with the shortcode: `[fb_plugin type]`
32
 
33
+ Examples:
34
+
35
+ A like and share button for the current page
36
+
37
+ `[fb_plugin like share=true]`
38
+
39
+ Send a message to a Facebook fan page.
40
 
41
+ `[fb_plugin page href=https://www.facebook.com/wpemf/ small-header=true height=350 tabs=messages ]`
42
+
43
+ See a lot more examples [here](http://www.wpembedfb.com/demo-site/category/social-plugins/).
44
+
45
+ = Facebook Comments =
46
+ Automatically replace the WordPress comments system with Facebook comments or manually using the shortcode `[fb_plugin comments]`.
47
+
48
+ To enable moderation you have to set up a Facebook App ID and Secret also scrape the urls on Facebook more details inside the settings page.
49
+
50
+ = The Quote Social Plugin =
51
+ The last social plugin to come to life allows your visitors to share any part of your site just by selecting text. Activate it automatically on selected post types or by using the shortcode `[fb_plugin quote]`. [Demo](http://www.wpembedfb.com/demo-site/social-plugins/quote-plugin/).
52
+
53
+ = Requirements =
54
+ * Nothing to embed posts, pages, videos and comments.
55
+ * For custom embeds and comments moderation a Facebook App Id and Secret are required more details inside settings.
56
 
57
+ **[One page live demo](http://www.wpembedfb.com/demo/)**
58
 
59
+ **[Demo Site](http://www.wpembedfb.com/demo-site/)**
60
 
61
+ = Contributing =
62
+ If you found a bug or want to add an extra feature create a pull request on [github](https://github.com/sigami/wp-embed-facebook).
63
 
64
  = Premium extension =
65
+ * "Elegant" custom embeds theme
66
  * Embed full event shortcode
67
  * Embed full fan page shortcode
68
  * Embed events with address and admins
73
  * Shortcode creator
74
  * Special templates for albums and pages
75
 
76
+ **[Live Demo](http://www.wpembedfb.com/demo/)**
 
77
 
78
  == Installation ==
79
 
80
+ 1. Download wp embed facebook plugin from [WordPress](http://wordpress.org/plugins/wp-embed-facebook)
81
  1. Extract to /wp-content/plugins/ folder, and activate the plugin in /wp-admin/.
82
+ 1. Create a Facebook App follow the [step by step guide](http://www.wpembedfb.com/creating-a-facebook-app-the-step-by-step-guide/).
83
+ 1. Copy the App Id and App Secret to the “Embed Facebook” page under the Settings section.
84
+ 1. Change settings to your liking.
85
  1. Enjoy and tell someone !
86
 
87
  == Frequently Asked Questions ==
88
 
89
  = How can I change the way an embed looks? =
90
 
91
+ You can overwrite the embed template with a custom one.
92
+
93
+ 1. Create a folder on **your theme** named "plugins".
94
+ 1. Inside that folder create a new one named "wp-embed-facebook".
95
+ 1. Inside that folder create a new one named "default".
96
+ 1. Copy the contents of “wp-embed-facebook/templates/default/” to “your-theme/plugins/wp-embed-facebook/default”
97
+ 1. Change the template files to what you want. Inside each file you can access the `$fb_data` array that contains the information retrieved from facebook.
98
 
99
  = How can I make my page load faster ? =
100
 
101
+ Social plugins will load at its own time via JavaScript so you just have to wait on them, for custom embeds a cache plugin will greatly increase performance.
102
+
103
+ = Why can't I embed a certain fan page getting error code 100 ? =
104
+
105
+ The Facebook page your are trying to embed is not available to users logged out from Facebook.
106
 
107
  = I cannot embed my photo stream =
108
 
109
+ This plugin only works for embedding **albums**. Alternatives are being tested and they will be available very soon.
110
 
111
  = Is there a way to embed an album with more than 100 photos ? =
112
 
113
+ Change the number of embedded photos on settings or use the shortcode like this [facebook album_url photos=200 ] This can only be achieved using the premium version.
114
 
115
+ = How I can guarantee that this software is kept up to date? =
116
+
117
+ Buying the premium extensions helps to keep this project alive.
118
 
119
  == Screenshots ==
120
 
137
 
138
  == Changelog ==
139
 
140
+ = 2.1.5 =
141
+ * Added: new filter wef_lightbox_title
142
+ * Added: event time format option
143
+ * Added: single post time format option
144
+ * Added: single post now triggers photos in lightbox
145
+ * Fixed: single post caption link error
146
+ * Added: compatibility for custom embed templates css (pierreg_)
147
+ * Fixed: typos on readme file
148
+ * Improved: Lightbox css and option section
149
+ * Added: Facebook API v2.7
150
+ * Added: option to use lightbox on [gallery] shortcode (experimental)
151
+
152
  = 2.1.4 =
153
  * Added: new action 'wp_embed_fb' on WP_Embed_FB class
154
  * Added: compatibility for using href=, url=, uri=, link=, on [facebook] shortcode
179
  * Added: Extra FAQ
180
  * Added: Github for development https://github.com/sigami/wp-embed-facebook
181
 
 
182
  = 2.1 =
183
  * Removed: all options and moved them to a single one 'wpemfb_options'
184
  * Removed: resize cover javascript it is now done with css
185
  * Fixed: timezone bug custom post and events
186
  * Added option to only load scripts when an embed is present
187
  * Added option to reset all options
188
+ * Added JetPack Photon compatibility
189
+ * Added compatibility with some drag and drop themes
190
  * Added lightbox.sass for theme developers
191
  * Changed: d Lightbox script and style
192
  * Added Lightbox Option Album Label
207
  * Lightbox css improved
208
  * Fixed: cover css
209
 
210
+
211
  = 2.0.9 =
212
  * Fixed: css on footer when using different themes
213
  * Changed: d all.js to sdk.js (bryant1410)
218
  * Fixed: link underline in some themes
219
  * Fixed: several css and html structure nothing critical
220
 
 
221
  = 2.0.8 =
222
  * Fix Event title css
223
 
352
  * Better detection of video urls
353
  * FB js now loaded via jquery
354
  * More comprehensive admin section
355
+ * Fix album pictures not showing on chrome
356
 
357
  = 1.6.2 =
358
  * minor bugs
381
  * Support for filter 'wpemfb_category_template'
382
  * Follow buttons
383
  * Better photo embeds
384
+ * New website www.wpembedfb.com !
385
 
386
  = 1.3.1 =
387
  * Documentation and screenshots.
414
 
415
  == Upgrade Notice ==
416
 
417
+ = 2.1.5 =
418
+ Update to Facebook API v2.7 Improved Lightbox css.
templates/classic/album.php CHANGED
@@ -26,7 +26,7 @@
26
  foreach ($fb_data['photos']['data'] as $pic) {
27
  $data_title = isset($pic['name']) ? $pic['name'] : '';
28
  ?>
29
- <a href="<?php echo $pic['source'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo !empty($data_title) ? 'data-title="'.esc_attr(wp_rel_nofollow(make_clickable(str_replace(array('"',"'"),array('&#34;','&#39;'),$data_title)))).'"' : '' ?> >
30
  <img class="thumbnail" src="<?php echo $pic['picture'] ?>" />
31
  </a>
32
  <?php
26
  foreach ($fb_data['photos']['data'] as $pic) {
27
  $data_title = isset($pic['name']) ? $pic['name'] : '';
28
  ?>
29
+ <a href="<?php echo $pic['source'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo !empty($data_title) ? WP_Embed_FB_Plugin::lightbox_title($data_title) : '' ?> >
30
  <img class="thumbnail" src="<?php echo $pic['picture'] ?>" />
31
  </a>
32
  <?php
templates/classic/classic.css CHANGED
@@ -1 +1 @@
1
- .wef-classic{font:300 14px/20px Helvetica;padding:10px;display:block;border-width:1px;border-style:solid;border-color:#23487f;box-shadow:1px 1px 2px #23487f;width:100%;background-color:#fff}.wef-classic .row{margin-left:-10px;margin-right:-10px;display:table;width:100%}.wef-classic .col-1,.wef-classic .col-2,.wef-classic .col-3,.wef-classic .col-4,.wef-classic .col-5,.wef-classic .col-6,.wef-classic .col-7,.wef-classic .col-8,.wef-classic .col-9,.wef-classic .col-10,.wef-classic .col-11,.wef-classic .col-12{position:relative;min-height:1px;padding-left:10px;padding-right:10px;display:table-cell;vertical-align:middle;text-align:left}.wef-classic .col-12{width:100%}.wef-classic .col-11{width:91.66667%}.wef-classic .col-10{width:83.33333%}.wef-classic .col-9{width:75%}.wef-classic .col-8{width:66.66667%}.wef-classic .col-7{width:58.33333%}.wef-classic .col-6{width:50%}.wef-classic .col-5{width:41.66667%}.wef-classic .col-4{width:33.33333%}.wef-classic .col-3{width:25%}.wef-classic .col-2{width:16.66667%}.wef-classic .col-1{width:8.33333%}.wef-classic hr{margin-top:10px !important;margin-bottom:10px !important;margin-left:0 !important;margin-right:0 !important;float:none !important;border-top:1px;border-style:solid;border-color:#23487f;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0 !important;width:100% !important}.wef-classic img.icon{float:right;box-shadow:none;margin:0;padding:0;display:block}.wef-classic img.thumbnail{border:1px solid gray;border-radius:2px;height:60px !important;margin:1px;padding:2px;width:60px !important}.wef-classic .album-thumbs{line-height:1px !important}.wef-classic a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}.wef-classic a:focus,.wef-classic a:hover{color:#23487f;text-decoration:underline !important}.wef-classic a.post-likes{color:#6d84b4 !important;font-size:12px !important}.wef-classic a.road-trip{width:0 !important;height:0 !important}.wef-classic a img{display:inline-block !important;margin:0;padding:0}.wef-classic p{font:300 14px/20px Helvetica;padding:0 !important;margin:0 !important}.wef-classic p.post-time{font-style:italic;color:#8e8c8d;font-size:12px}.wef-classic p.caption-link{text-align:right;word-break:break-all}.wef-classic p.caption-link a{font-size:12px;color:#8e8c8d !important;text-transform:uppercase}.wef-classic p.caption-title{text-align:left}.wef-classic p.caption-title a{font-size:12px;font-weight:bold}.wef-classic iframe,.wef-classic embed,.wef-classic object,.wef-classic video,.wef-classic audio{width:100% !important;border:0 !important;margin:0 !important;padding:0 !important}.wef-classic .post-link{border-width:1px;border-style:solid;border-color:#d0d0d0;box-shadow:1px 1px 2px #b3b3b3}.wef-classic .post-link p{padding-left:10px !important;padding-right:10px !important}.wef-classic .text-center{text-align:center}.wef-classic .pl-none{padding-left:0 !important;word-break:break-all}.wef-classic .color{color:#23487f}.wef-classic .bold{font-weight:bold !important}.wef-classic .title{font-size:20px !important;font-weight:bold !important;word-break:break-all;display:inherit !important;height:100% !important;background-color:transparent !important;padding-top:5px !important}.wef-classic .pad-top{padding-top:5px}.wef-classic .page-post{left:2.6% !important}.wef-classic .caption-description p{color:#8e8c8d !important;font-style:italic !important;font-size:12px !important}.wef-classic .wef-measure{width:100%}.wef-classic .break-all{word-break:break-all}.wef-classic .event_address{color:#565656;font-size:12px}.wef-classic .relative-container{position:relative;display:block;height:0;overflow:hidden}.wef-classic .relative-container .relative,.wef-classic .relative-container .video iframe,.wef-classic .video .relative-container iframe,.wef-classic .relative-container .video embed,.wef-classic .video .relative-container embed,.wef-classic .relative-container .video object,.wef-classic .video .relative-container object,.wef-classic .relative-container .video video,.wef-classic .video .relative-container video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0;margin:0;padding:0}.wef-classic .video{padding:0 0 56.25%}.wef-classic .fbpost-image{padding:0 0 52.34%}.wef-classic .fbpost-image div{cursor:pointer;background-size:cover;background-position:50% 50%}.wef-classic .cover{padding:0 0 36.86%}.wef-classic .cover div{background-size:100% !important;background-position-x:0;cursor:pointer}.wef-video-link{margin:0 !important;padding:0 !important}.wef-video-link a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}
1
+ .wef-classic{font:300 14px/20px Helvetica;padding:10px;display:block;border-width:1px;border-style:solid;border-color:#23487f;box-shadow:1px 1px 2px #23487f;width:100%;background-color:#fff}.wef-classic .row{margin-left:-10px;margin-right:-10px;display:table;width:100%}.wef-classic .col-1,.wef-classic .col-2,.wef-classic .col-3,.wef-classic .col-4,.wef-classic .col-5,.wef-classic .col-6,.wef-classic .col-7,.wef-classic .col-8,.wef-classic .col-9,.wef-classic .col-10,.wef-classic .col-11,.wef-classic .col-12{position:relative;min-height:1px;padding-left:10px;padding-right:10px;display:table-cell;vertical-align:middle;text-align:left}.wef-classic .col-12{width:100%}.wef-classic .col-11{width:91.66667%}.wef-classic .col-10{width:83.33333%}.wef-classic .col-9{width:75%}.wef-classic .col-8{width:66.66667%}.wef-classic .col-7{width:58.33333%}.wef-classic .col-6{width:50%}.wef-classic .col-5{width:41.66667%}.wef-classic .col-4{width:33.33333%}.wef-classic .col-3{width:25%}.wef-classic .col-2{width:16.66667%}.wef-classic .col-1{width:8.33333%}.wef-classic hr{margin-top:10px !important;margin-bottom:10px !important;margin-left:0 !important;margin-right:0 !important;float:none !important;border-top:1px;border-style:solid;border-color:#23487f;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0 !important;width:100% !important}.wef-classic img.icon{float:right;box-shadow:none;margin:0;padding:0;display:block}.wef-classic img.thumbnail{border:1px solid gray;border-radius:2px;height:60px !important;margin:1px;padding:2px;width:60px !important}.wef-classic .album-thumbs{line-height:1px !important}.wef-classic a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}.wef-classic a:focus,.wef-classic a:hover{color:#23487f;text-decoration:underline !important}.wef-classic a.post-likes{color:#6d84b4 !important;font-size:12px !important}.wef-classic a.road-trip{width:0 !important;height:0 !important}.wef-classic a img{display:inline-block !important;margin:0;padding:0}.wef-classic p{font:300 14px/20px Helvetica;padding:0 !important;margin:0 !important}.wef-classic p.post-time{font-style:italic;color:#8e8c8d;font-size:12px}.wef-classic p.caption-link{text-align:right;word-break:break-all}.wef-classic p.caption-link a{font-size:12px;color:#8e8c8d !important;text-transform:uppercase}.wef-classic p.caption-title{text-align:left}.wef-classic p.caption-title a{font-size:12px;font-weight:bold}.wef-classic iframe,.wef-classic embed,.wef-classic object,.wef-classic video,.wef-classic audio{width:100% !important;border:0 !important;margin:0 !important;padding:0 !important}.wef-classic .post-link{border-width:1px;border-style:solid;border-color:#d0d0d0;box-shadow:1px 1px 2px #b3b3b3}.wef-classic .post-link p{padding-left:10px !important;padding-right:10px !important}.wef-classic .text-center{text-align:center}.wef-classic .pl-none{padding-left:0 !important;word-break:break-all}.wef-classic .color{color:#23487f}.wef-classic .bold{font-weight:bold !important}.wef-classic .title{font-size:20px !important;font-weight:bold !important;word-break:break-all;display:inherit !important;height:100% !important;background-color:transparent !important;padding-top:5px !important}.wef-classic .pad-top{padding-top:5px}.wef-classic .page-post{left:2.6% !important}.wef-classic .caption-description p{color:#8e8c8d !important;font-style:italic !important;font-size:12px !important}.wef-classic .wef-measure{width:100%}.wef-classic .break-all{word-break:break-all}.wef-classic .event_address{color:#565656;font-size:12px}.wef-classic .relative-container{position:relative;display:block;height:0;overflow:hidden}.wef-classic .relative-container .relative,.wef-classic .relative-container .video iframe,.wef-classic .video .relative-container iframe,.wef-classic .relative-container .video embed,.wef-classic .video .relative-container embed,.wef-classic .relative-container .video object,.wef-classic .video .relative-container object,.wef-classic .relative-container .video video,.wef-classic .video .relative-container video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0;margin:0;padding:0}.wef-classic .video{padding:0 0 56.25%}.wef-classic .fbpost-image{padding:0 0 75%}.wef-classic .fbpost-image div{cursor:pointer;background-size:cover;background-position:50% 50%}.wef-classic .cover{padding:0 0 36.86%}.wef-classic .cover div{background-size:100% !important;background-position-x:0;cursor:pointer}.wef-video-link{margin:0 !important;padding:0 !important}.wef-video-link a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}
templates/classic/classic.sass CHANGED
@@ -190,7 +190,7 @@
190
  iframe, embed, object, video
191
  @extend .relative
192
  .fbpost-image
193
- padding: 0 0 52.34%
194
  div
195
  cursor: pointer
196
  background:
190
  iframe, embed, object, video
191
  @extend .relative
192
  .fbpost-image
193
+ padding: 0 0 75%
194
  div
195
  cursor: pointer
196
  background:
templates/classic/event.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $start_time_format = 'l, j F Y g:i a';
3
  $old_time_zone = date_default_timezone_get();
4
  if(WP_Embed_FB_Plugin::get_option('ev_local_tz') == 'true'){
5
  $timezone = WP_Embed_FB_Plugin::get_timezone();
1
  <?php
2
+ $start_time_format = WP_Embed_FB_Plugin::get_option('event_start_time_format');
3
  $old_time_zone = date_default_timezone_get();
4
  if(WP_Embed_FB_Plugin::get_option('ev_local_tz') == 'true'){
5
  $timezone = WP_Embed_FB_Plugin::get_timezone();
templates/classic/single-post.php CHANGED
@@ -1,43 +1,58 @@
1
  <?php
2
- $fb_post['link'] = isset($fb_post['link']) ? $fb_post['link'] : '';
3
- $link = explode("_", $fb_post['id']);
4
- $picture_link = isset($fb_post['link']) ? $fb_post['link'] : "https://www.facebook.com/".$link[0]."/posts/".$link[1];
5
- $message = null;
6
- $description = isset($fb_post['description']) && !empty($fb_post['description']) ? WP_Embed_FB::make_clickable($fb_post['description']) : null ;
7
- $caption = isset($fb_post['caption']) && !empty($fb_post['caption']) ? $fb_post['caption'] : null ;
8
- $name = isset($fb_post['name']) && !empty($fb_post['name']) ? $fb_post['name'] : null ;
9
- $is_fb_link = strpos($fb_post['link'],'facebook.com') !== false;
10
- $video_ratio = (WP_Embed_FB_Plugin::get_option('video_ratio') == 'true') ? true : false;
11
- if(isset($fb_post['message']) && !empty($fb_post['message'])) :
12
- $message = str_replace($fb_post['link'],'',$fb_post['message']);
13
- $message = WP_Embed_FB::make_clickable($message);
14
- endif;
15
- $name = $name ? '<p class="caption-title"><a href="'.$name.'" title="'.$name.'" target="_blank" rel="nofollow">'.$name.'</a></p>':'';
16
- $description = $description ? '<div class="caption-description">'.$description.'</div>':'';
17
- $caption = $caption ? '<p class="caption-link"><a href="'.$fb_post["link"].'" rel="nofollow">'.$caption.'</a></p>':'';
18
- $link_info = $name.$description.$caption;
19
- $icon = isset($fb_post["icon"]) ? '<img class="icon" src="'.$fb_post["icon"].'">' : '';
20
  $old_time_zone = date_default_timezone_get();
21
  date_default_timezone_set(WP_Embed_FB_Plugin::get_timezone());
22
- $post_time = $icon.date_i18n('l, j F Y g:s a', strtotime($fb_post['created_time'])) ;
23
  date_default_timezone_set($old_time_zone);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ?>
25
  <hr>
26
  <div class="row">
27
  <div class="col-12 page-post">
28
  <?php //echo '<pre>'.wpautop(print_r($fb_post,true)).'</pre>'; ?>
29
- <?php echo isset($fb_post['story']) ? '<p>'.$fb_post['story'].'</p>' : '';?>
30
- <p class="post-time" ><?php echo $post_time ?></p>
31
  <?php
32
- echo $message ? '<p>'.$message.'</p>':'';
33
- switch($fb_post["type"]) :
34
  case 'video':
35
- if($is_fb_link){
36
  $raw = WP_Embed_FB::$raw;
37
  $width_r = WP_Embed_FB::$width;
38
  WP_Embed_FB::$raw = true;
39
- WP_Embed_FB::$width = $width-40;
40
- echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
41
  WP_Embed_FB::$raw = $raw;
42
  WP_Embed_FB::$width = $width_r;
43
  echo $link_info;
@@ -45,21 +60,25 @@ date_default_timezone_set($old_time_zone);
45
  $use_ratio = (WP_Embed_FB_Plugin::get_option('video_ratio') == 'true');
46
  echo '<div class="post-link">';
47
  echo $use_ratio ? '<div class="video">' : '';
48
- echo $wp_embed->shortcode(array('src'=>$fb_post['link'], 'width'=>$width - 20));
49
  echo $use_ratio ? '</div>' : '';
50
  echo $link_info;
51
  echo '</div>';
52
  }
53
  break;
54
  case 'event':
55
- WP_Embed_FB::$width = $width-40;
56
- echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
57
  WP_Embed_FB::$width = $width;
58
  break;
59
  case 'photo':
60
  ?>
61
- <a href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?>" rel="nofollow" target="_blank">
62
- <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
 
 
 
 
63
  </a>
64
  <?php echo $link_info; ?>
65
  <?php
@@ -67,13 +86,15 @@ date_default_timezone_set($old_time_zone);
67
  case 'music':
68
  case 'link':
69
  ?>
70
- <div class="post-link" style="max-width: <?php echo $width?>px;">
71
- <?php if(isset($fb_post['full_picture']) && !empty($fb_post['full_picture'])) : ?>
72
- <div class="relative-container fbpost-image">
73
- <div class="relative" style="background-image: url('<?php echo $fb_post['full_picture'] ?>');" onclick="window.open('<?php echo $fb_post['link'] ?>', '_blank')"></div>
74
- </div>
 
 
75
  <?php endif ?>
76
- <?php if($fb_post["type"] == 'music') : ?>
77
  <p>
78
  <audio controls>
79
  <source src="<?php echo $fb_post['source'] ?>" type="audio/mpeg">
@@ -87,20 +108,35 @@ date_default_timezone_set($old_time_zone);
87
  case 'status':
88
  default:
89
  ?>
90
- <?php if(isset($fb_post['full_picture'],$fb_post['link']) && !empty($fb_post['full_picture']) && !empty($fb_post['link'])) : ?>
91
- <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
92
- <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
93
- </a>
94
- <?php endif; ?>
 
 
 
95
  <?php echo $link_info; ?>
96
  <?php
97
  break;
98
  endswitch;
 
 
 
 
 
 
 
 
 
 
99
  ?><br>
100
- <a class="post-likes" href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?> " target="_blank" rel="nofollow">
101
- <?php echo isset($fb_post['likes']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y6/r/l9Fe9Ugss0S.gif" />'.$fb_post['likes']['summary']['total_count'].' ' : "" ?>
102
- <?php echo isset($fb_post['comments']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yg/r/V8Yrm0eKZpi.gif" />'.$fb_post['comments']['summary']['total_count'].' ' : "" ?>
103
- <?php echo isset($fb_post['shares']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y2/r/o19N6EzzbUm.png" />'.$fb_post['shares']['count'].' ' : "" ?>
 
 
104
  </a>
105
  </div>
106
  </div>
1
  <?php
2
+
3
+
4
+ $story = isset($fb_post['story']) ? '<p>' . $fb_post['story'] . '</p>' : '';
5
+
6
+ $icon = isset($fb_post["icon"]) ? '<img class="icon" title="Facebook ' . $fb_post["type"] . '" src="' . $fb_post["icon"] . '">' : '';
7
+
 
 
 
 
 
 
 
 
 
 
 
 
8
  $old_time_zone = date_default_timezone_get();
9
  date_default_timezone_set(WP_Embed_FB_Plugin::get_timezone());
10
+ $time = $icon . date_i18n(WP_Embed_FB_Plugin::get_option('single_post_time_format'), strtotime($fb_post['created_time']));
11
  date_default_timezone_set($old_time_zone);
12
+
13
+ $description = isset($fb_post['description']) && !empty($fb_post['description']) ? WP_Embed_FB::make_clickable($fb_post['description']) : '';
14
+
15
+ $linkArray = explode("_", $fb_post['id']);
16
+ $link = (isset($fb_post['link']) && !empty($fb_post['link'])) ? $fb_post['link'] : "https://www.facebook.com/" . $linkArray[0] . "/posts/" . $linkArray[1];
17
+
18
+ $message = (isset($fb_post['message']) && !empty($fb_post['message'])) ? $fb_post['message'] : '';
19
+
20
+ $caption = isset($fb_post['caption']) && !empty($fb_post['caption']) ? $fb_post['caption'] : '';
21
+
22
+ $name = isset($fb_post['name']) && !empty($fb_post['name']) ? $fb_post['name'] : '';
23
+
24
+
25
+ if ($caption == $message) {
26
+ $caption = '';
27
+ }
28
+
29
+ $message = WP_Embed_FB::make_clickable($message);
30
+
31
+
32
+ $name = empty($name) ? '' : "<p class=\"caption-title\"><a href=\"$link\" title=\"$name\" target=\"_blank\" rel=\"nofollow\">$name</a></p>";
33
+
34
+ $description = empty($description) ? '' : "<div class=\"caption-description\">$description</div>";
35
+
36
+ $caption = empty($caption) ? '' : "<p class=\"caption-link\"><a href=\"$link\" target=\"_blank\" rel=\"nofollow\"></a>$caption</p>";
37
+
38
+ $link_info = $name . $description . $caption;
39
  ?>
40
  <hr>
41
  <div class="row">
42
  <div class="col-12 page-post">
43
  <?php //echo '<pre>'.wpautop(print_r($fb_post,true)).'</pre>'; ?>
44
+ <?php echo $story ?>
45
+ <p class="post-time"><?php echo $time ?></p>
46
  <?php
47
+ echo $message ? '<p>' . $message . '</p>' : '';
48
+ switch ($fb_post["type"]) :
49
  case 'video':
50
+ if (strpos($link, 'facebook.com') !== false) {
51
  $raw = WP_Embed_FB::$raw;
52
  $width_r = WP_Embed_FB::$width;
53
  WP_Embed_FB::$raw = true;
54
+ WP_Embed_FB::$width = $width - 40;
55
+ echo $wp_embed->shortcode(array('src' => $link));
56
  WP_Embed_FB::$raw = $raw;
57
  WP_Embed_FB::$width = $width_r;
58
  echo $link_info;
60
  $use_ratio = (WP_Embed_FB_Plugin::get_option('video_ratio') == 'true');
61
  echo '<div class="post-link">';
62
  echo $use_ratio ? '<div class="video">' : '';
63
+ echo $wp_embed->shortcode(array('src' => $link, 'width' => $width - 20));
64
  echo $use_ratio ? '</div>' : '';
65
  echo $link_info;
66
  echo '</div>';
67
  }
68
  break;
69
  case 'event':
70
+ WP_Embed_FB::$width = $width - 40;
71
+ echo $wp_embed->shortcode(array('src' => $link));
72
  WP_Embed_FB::$width = $width;
73
  break;
74
  case 'photo':
75
  ?>
76
+
77
+ <a href="<?php echo $fb_post['full_picture'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo $message ? WP_Embed_FB_Plugin::lightbox_title($message) : '' ?> >
78
+ <div class="relative-container fbpost-image">
79
+ <div class="relative"
80
+ style="background-image: url('<?php echo $fb_post['full_picture'] ?>');"></div>
81
+ </div>
82
  </a>
83
  <?php echo $link_info; ?>
84
  <?php
86
  case 'music':
87
  case 'link':
88
  ?>
89
+ <div class="post-link" style="max-width: <?php echo $width ?>px;">
90
+ <?php if (isset($fb_post['full_picture']) && !empty($fb_post['full_picture'])) : ?>
91
+ <div class="relative-container fbpost-image">
92
+ <div class="relative"
93
+ style="background-image: url('<?php echo $fb_post['full_picture'] ?>');"
94
+ onclick="window.open('<?php echo $link ?>', '_blank')"></div>
95
+ </div>
96
  <?php endif ?>
97
+ <?php if ($fb_post["type"] == 'music') : ?>
98
  <p>
99
  <audio controls>
100
  <source src="<?php echo $fb_post['source'] ?>" type="audio/mpeg">
108
  case 'status':
109
  default:
110
  ?>
111
+ <?php if (isset($fb_post['full_picture'], $link) && !empty($fb_post['full_picture']) && !empty($link)) : ?>
112
+ <a href="<?php echo $fb_post['full_picture'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo $message ? WP_Embed_FB_Plugin::lightbox_title($message) : '' ?> >
113
+ <div class="relative-container fbpost-image">
114
+ <div class="relative"
115
+ style="background-image: url('<?php echo $fb_post['full_picture'] ?>');"></div>
116
+ </div>
117
+ </a>
118
+ <?php endif; ?>
119
  <?php echo $link_info; ?>
120
  <?php
121
  break;
122
  endswitch;
123
+ $title_count = '';
124
+ if (isset($fb_post['likes'])) {
125
+ $title_count .= $fb_post['likes']['summary']['total_count'] . ' ' . __('likes', 'wp-embed-facebook') . ' ';
126
+ }
127
+ if (isset($fb_post['comments'])) {
128
+ $title_count .= $fb_post['comments']['summary']['total_count'] . ' ' . __('comments', 'wp-embed-facebook') . ' ';
129
+ }
130
+ if (isset($fb_post['shares'])) {
131
+ $title_count .= $fb_post['shares']['count'] . ' ' . __('shares', 'wp-embed-facebook') . ' ';
132
+ }
133
  ?><br>
134
+ <a class="post-likes"
135
+ href="<?php echo "https://www.facebook.com/" . $linkArray[0] . "/posts/" . $linkArray[1] ?> "
136
+ target="_blank" rel="nofollow" title="<?php echo esc_attr($title_count) ?>">
137
+ <?php echo isset($fb_post['likes']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y6/r/l9Fe9Ugss0S.gif" />' . $fb_post['likes']['summary']['total_count'] . ' ' : "" ?>
138
+ <?php echo isset($fb_post['comments']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yg/r/V8Yrm0eKZpi.gif" />' . $fb_post['comments']['summary']['total_count'] . ' ' : "" ?>
139
+ <?php echo isset($fb_post['shares']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y2/r/o19N6EzzbUm.png" />' . $fb_post['shares']['count'] . ' ' : "" ?>
140
  </a>
141
  </div>
142
  </div>
templates/default/album.php CHANGED
@@ -26,7 +26,7 @@
26
  foreach ($fb_data['photos']['data'] as $pic) {
27
  $data_title = isset($pic['name']) ? $pic['name'] : '';
28
  ?>
29
- <a href="<?php echo $pic['source'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo !empty($data_title) ? 'data-title="'.esc_attr(wp_rel_nofollow(make_clickable(str_replace(array('"',"'"),array('&#34;','&#39;'),$data_title)))).'"' : '' ?> >
30
  <img class="thumbnail" src="<?php echo $pic['picture'] ?>" />
31
  </a>
32
  <?php
26
  foreach ($fb_data['photos']['data'] as $pic) {
27
  $data_title = isset($pic['name']) ? $pic['name'] : '';
28
  ?>
29
+ <a href="<?php echo $pic['source'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo !empty($data_title) ? WP_Embed_FB_Plugin::lightbox_title($data_title) : '' ?> >
30
  <img class="thumbnail" src="<?php echo $pic['picture'] ?>" />
31
  </a>
32
  <?php
templates/default/default.css CHANGED
@@ -1 +1 @@
1
- .wef-default{font:300 14px/20px Helvetica;padding:10px;display:inline-block;border-width:1px;border-style:solid;border-color:#dedede;border-radius:2px;width:100%;background-color:#fff}.wef-default .row{margin-left:-10px;margin-right:-10px;display:table;width:100%}.wef-default .col-1,.wef-default .col-2,.wef-default .col-3,.wef-default .col-4,.wef-default .col-5,.wef-default .col-6,.wef-default .col-7,.wef-default .col-8,.wef-default .col-9,.wef-default .col-10,.wef-default .col-11,.wef-default .col-12{position:relative;min-height:1px;padding-left:10px;padding-right:10px;display:table-cell;vertical-align:middle;text-align:left}.wef-default .col-12{width:100%}.wef-default .col-11{width:91.66667%}.wef-default .col-10{width:83.33333%}.wef-default .col-9{width:75%}.wef-default .col-8{width:66.66667%}.wef-default .col-7{width:58.33333%}.wef-default .col-6{width:50%}.wef-default .col-5{width:41.66667%}.wef-default .col-4{width:33.33333%}.wef-default .col-3{width:25%}.wef-default .col-2{width:16.66667%}.wef-default .col-1{width:8.33333%}.wef-default hr{margin-top:10px !important;margin-bottom:10px !important;margin-left:0 !important;margin-right:0 !important;float:none !important;border-top:1px;border-style:solid;border-color:#dedede;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0 !important;width:100% !important}.wef-default img.icon{float:right;box-shadow:none;margin:0;padding:0;display:block}.wef-default img.thumbnail{border:1px solid gray;border-radius:2px;height:60px !important;margin:1px;padding:2px;width:60px !important}.wef-default .album-thumbs{line-height:1px !important}.wef-default a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}.wef-default a:focus,.wef-default a:hover{color:#23487f;text-decoration:underline !important}.wef-default a.post-likes{color:#6d84b4 !important;font-size:12px !important}.wef-default a.road-trip{width:0 !important;height:0 !important}.wef-default a img{display:inline-block !important;margin:0;padding:0}.wef-default p{font:300 14px/20px Helvetica;padding:0 !important;margin:0 !important}.wef-default p.post-time{font-style:italic;color:#8e8c8d;font-size:12px}.wef-default p.caption-link{text-align:right;word-break:break-all}.wef-default p.caption-link a{font-size:12px;color:#8e8c8d !important;text-transform:uppercase}.wef-default p.caption-title{text-align:left}.wef-default p.caption-title a{font-size:12px;font-weight:bold}.wef-default iframe,.wef-default embed,.wef-default object,.wef-default video,.wef-default audio{width:100% !important;border:0 !important;margin:0 !important;padding:0 !important}.wef-default .post-link{border-width:1px;border-style:solid;border-color:#d0d0d0;box-shadow:1px 1px 2px #b3b3b3}.wef-default .post-link p{padding-left:10px !important;padding-right:10px !important}.wef-default .text-center{text-align:center}.wef-default .pl-none{padding-left:0 !important;word-break:break-all}.wef-default .color{color:#23487f}.wef-default .bold{font-weight:bold !important}.wef-default .title{font-size:20px !important;font-weight:bold !important;word-break:break-all;display:inherit !important;height:100% !important;background-color:transparent !important;padding-top:5px !important}.wef-default .pad-top{padding-top:5px}.wef-default .page-post{left:2.6% !important}.wef-default .caption-description p{color:#8e8c8d !important;font-style:italic !important;font-size:12px !important}.wef-default .wef-measure{width:100%}.wef-default .break-all{word-break:break-all}.wef-default .event_address{color:#565656;font-size:12px}.wef-default .relative-container{position:relative;display:block;height:0;overflow:hidden}.wef-default .relative-container .relative,.wef-default .relative-container .video iframe,.wef-default .video .relative-container iframe,.wef-default .relative-container .video embed,.wef-default .video .relative-container embed,.wef-default .relative-container .video object,.wef-default .video .relative-container object,.wef-default .relative-container .video video,.wef-default .video .relative-container video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0;margin:0;padding:0}.wef-default .video{padding:0 0 56.25%}.wef-default .fbpost-image{padding:0 0 52.34%}.wef-default .fbpost-image div{cursor:pointer;background-size:cover;background-position:50% 50%}.wef-default .cover{padding:0 0 36.86%}.wef-default .cover div{background-size:100% !important;background-position-x:0;cursor:pointer}.wef-video-link{margin:0 !important;padding:0 !important}.wef-video-link a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}
1
+ .wef-default{font:300 14px/20px Helvetica;padding:10px;display:inline-block;border-width:1px;border-style:solid;border-color:#dedede;border-radius:2px;width:100%;background-color:#fff}.wef-default .row{margin-left:-10px;margin-right:-10px;display:table;width:100%}.wef-default .col-1,.wef-default .col-2,.wef-default .col-3,.wef-default .col-4,.wef-default .col-5,.wef-default .col-6,.wef-default .col-7,.wef-default .col-8,.wef-default .col-9,.wef-default .col-10,.wef-default .col-11,.wef-default .col-12{position:relative;min-height:1px;padding-left:10px;padding-right:10px;display:table-cell;vertical-align:middle;text-align:left}.wef-default .col-12{width:100%}.wef-default .col-11{width:91.66667%}.wef-default .col-10{width:83.33333%}.wef-default .col-9{width:75%}.wef-default .col-8{width:66.66667%}.wef-default .col-7{width:58.33333%}.wef-default .col-6{width:50%}.wef-default .col-5{width:41.66667%}.wef-default .col-4{width:33.33333%}.wef-default .col-3{width:25%}.wef-default .col-2{width:16.66667%}.wef-default .col-1{width:8.33333%}.wef-default hr{margin-top:10px !important;margin-bottom:10px !important;margin-left:0 !important;margin-right:0 !important;float:none !important;border-top:1px;border-style:solid;border-color:#dedede;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0 !important;width:100% !important}.wef-default img.icon{float:right;box-shadow:none;margin:0;padding:0;display:block}.wef-default img.thumbnail{border:1px solid gray;border-radius:2px;height:60px !important;margin:1px;padding:2px;width:60px !important}.wef-default .album-thumbs{line-height:1px !important}.wef-default a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}.wef-default a:focus,.wef-default a:hover{color:#23487f;text-decoration:underline !important}.wef-default a.post-likes{color:#6d84b4 !important;font-size:12px !important}.wef-default a.road-trip{width:0 !important;height:0 !important}.wef-default a img{display:inline-block !important;margin:0;padding:0}.wef-default p{font:300 14px/20px Helvetica;padding:0 !important;margin:0 !important}.wef-default p.post-time{font-style:italic;color:#8e8c8d;font-size:12px}.wef-default p.caption-link{text-align:right;word-break:break-all}.wef-default p.caption-link a{font-size:12px;color:#8e8c8d !important;text-transform:uppercase}.wef-default p.caption-title{text-align:left}.wef-default p.caption-title a{font-size:12px;font-weight:bold}.wef-default iframe,.wef-default embed,.wef-default object,.wef-default video,.wef-default audio{width:100% !important;border:0 !important;margin:0 !important;padding:0 !important}.wef-default .post-link{border-width:1px;border-style:solid;border-color:#d0d0d0;box-shadow:1px 1px 2px #b3b3b3}.wef-default .post-link p{padding-left:10px !important;padding-right:10px !important}.wef-default .text-center{text-align:center}.wef-default .pl-none{padding-left:0 !important;word-break:break-all}.wef-default .color{color:#23487f}.wef-default .bold{font-weight:bold !important}.wef-default .title{font-size:20px !important;font-weight:bold !important;word-break:break-all;display:inherit !important;height:100% !important;background-color:transparent !important;padding-top:5px !important}.wef-default .pad-top{padding-top:5px}.wef-default .page-post{left:2.6% !important}.wef-default .caption-description p{color:#8e8c8d !important;font-style:italic !important;font-size:12px !important}.wef-default .wef-measure{width:100%}.wef-default .break-all{word-break:break-all}.wef-default .event_address{color:#565656;font-size:12px}.wef-default .relative-container{position:relative;display:block;height:0;overflow:hidden}.wef-default .relative-container .relative,.wef-default .relative-container .video iframe,.wef-default .video .relative-container iframe,.wef-default .relative-container .video embed,.wef-default .video .relative-container embed,.wef-default .relative-container .video object,.wef-default .video .relative-container object,.wef-default .relative-container .video video,.wef-default .video .relative-container video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0;margin:0;padding:0}.wef-default .video{padding:0 0 56.25%}.wef-default .fbpost-image{padding:0 0 75%}.wef-default .fbpost-image div{cursor:pointer;background-size:cover;background-position:50% 50%}.wef-default .cover{padding:0 0 36.86%}.wef-default .cover div{background-size:100% !important;background-position-x:0;cursor:pointer}.wef-video-link{margin:0 !important;padding:0 !important}.wef-video-link a{font:300 14px/20px Helvetica;color:#23487f !important;text-decoration:none !important;border:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important}
templates/default/default.sass CHANGED
@@ -190,7 +190,7 @@
190
  iframe, embed, object, video
191
  @extend .relative
192
  .fbpost-image
193
- padding: 0 0 52.34%
194
  div
195
  cursor: pointer
196
  background:
190
  iframe, embed, object, video
191
  @extend .relative
192
  .fbpost-image
193
+ padding: 0 0 75%
194
  div
195
  cursor: pointer
196
  background:
templates/default/event.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $start_time_format = 'l, j F Y g:i a';
3
  $old_time_zone = date_default_timezone_get();
4
  if(WP_Embed_FB_Plugin::get_option('ev_local_tz') == 'true'){
5
  $timezone = WP_Embed_FB_Plugin::get_timezone();
1
  <?php
2
+ $start_time_format = WP_Embed_FB_Plugin::get_option('event_start_time_format');
3
  $old_time_zone = date_default_timezone_get();
4
  if(WP_Embed_FB_Plugin::get_option('ev_local_tz') == 'true'){
5
  $timezone = WP_Embed_FB_Plugin::get_timezone();
templates/default/post.php CHANGED
@@ -1,5 +1,8 @@
1
  <?php $fb_post = /** @noinspection PhpUndefinedVariableInspection */
2
- $fb_data ?>
 
 
 
3
  <div class="wef-default" style="max-width: <?php echo $width ?>px" >
4
  <div class="col-3 text-center">
5
  <a href="https://www.facebook.com/<?php echo $fb_post['from']['id'] ?>" target="_blank" rel="nofollow">
@@ -12,16 +15,6 @@
12
  <span class="title"><?php echo $fb_post['from']['name'] ?></span>
13
  </a>
14
  </p>
15
- <div>
16
- <?php
17
- $opt = WP_Embed_FB_Plugin::get_option('show_like');
18
- if($opt === 'true') :
19
- echo WEF_Social_Plugins::get('like',array('href'=>'https://www.facebook.com/'.$fb_data['id'],'share'=>'true','layout'=>'button_count'));
20
- else :
21
- printf( __( '%d people like this.', 'wp-embed-facebook' ), $fb_post['likes'] );
22
- endif;
23
- ?>
24
- </div>
25
  </div>
26
  <?php if(isset($fb_post['picture']) || isset($fb_post['message'])) : ?>
27
  <?php
1
  <?php $fb_post = /** @noinspection PhpUndefinedVariableInspection */
2
+ $fb_data;
3
+ $linkArray = explode('_',$fb_post['id']);
4
+
5
+ ?>
6
  <div class="wef-default" style="max-width: <?php echo $width ?>px" >
7
  <div class="col-3 text-center">
8
  <a href="https://www.facebook.com/<?php echo $fb_post['from']['id'] ?>" target="_blank" rel="nofollow">
15
  <span class="title"><?php echo $fb_post['from']['name'] ?></span>
16
  </a>
17
  </p>
 
 
 
 
 
 
 
 
 
 
18
  </div>
19
  <?php if(isset($fb_post['picture']) || isset($fb_post['message'])) : ?>
20
  <?php
templates/default/single-post.php CHANGED
@@ -1,43 +1,58 @@
1
  <?php
2
- $fb_post['link'] = isset($fb_post['link']) ? $fb_post['link'] : '';
3
- $link = explode("_", $fb_post['id']);
4
- $picture_link = isset($fb_post['link']) ? $fb_post['link'] : "https://www.facebook.com/".$link[0]."/posts/".$link[1];
5
- $message = null;
6
- $description = isset($fb_post['description']) && !empty($fb_post['description']) ? WP_Embed_FB::make_clickable($fb_post['description']) : null ;
7
- $caption = isset($fb_post['caption']) && !empty($fb_post['caption']) ? $fb_post['caption'] : null ;
8
- $name = isset($fb_post['name']) && !empty($fb_post['name']) ? $fb_post['name'] : null ;
9
- $is_fb_link = strpos($fb_post['link'],'facebook.com') !== false;
10
- $video_ratio = (WP_Embed_FB_Plugin::get_option('video_ratio') == 'true') ? true : false;
11
- if(isset($fb_post['message']) && !empty($fb_post['message'])) :
12
- $message = str_replace($fb_post['link'],'',$fb_post['message']);
13
- $message = WP_Embed_FB::make_clickable($message);
14
- endif;
15
- $name = $name ? '<p class="caption-title"><a href="'.$name.'" title="'.$name.'" target="_blank" rel="nofollow">'.$name.'</a></p>':'';
16
- $description = $description ? '<div class="caption-description">'.$description.'</div>':'';
17
- $caption = $caption ? '<p class="caption-link"><a href="'.$fb_post["link"].'" rel="nofollow">'.$caption.'</a></p>':'';
18
- $link_info = $name.$description.$caption;
19
- $icon = isset($fb_post["icon"]) ? '<img class="icon" src="'.$fb_post["icon"].'">' : '';
20
  $old_time_zone = date_default_timezone_get();
21
  date_default_timezone_set(WP_Embed_FB_Plugin::get_timezone());
22
- $post_time = $icon.date_i18n('l, j F Y g:s a', strtotime($fb_post['created_time'])) ;
23
  date_default_timezone_set($old_time_zone);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ?>
25
  <hr>
26
  <div class="row">
27
  <div class="col-12 page-post">
28
  <?php //echo '<pre>'.wpautop(print_r($fb_post,true)).'</pre>'; ?>
29
- <?php echo isset($fb_post['story']) ? '<p>'.$fb_post['story'].'</p>' : '';?>
30
- <p class="post-time" ><?php echo $post_time ?></p>
31
  <?php
32
- echo $message ? '<p>'.$message.'</p>':'';
33
- switch($fb_post["type"]) :
34
  case 'video':
35
- if($is_fb_link){
36
  $raw = WP_Embed_FB::$raw;
37
  $width_r = WP_Embed_FB::$width;
38
  WP_Embed_FB::$raw = true;
39
- WP_Embed_FB::$width = $width-40;
40
- echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
41
  WP_Embed_FB::$raw = $raw;
42
  WP_Embed_FB::$width = $width_r;
43
  echo $link_info;
@@ -45,21 +60,25 @@ date_default_timezone_set($old_time_zone);
45
  $use_ratio = (WP_Embed_FB_Plugin::get_option('video_ratio') == 'true');
46
  echo '<div class="post-link">';
47
  echo $use_ratio ? '<div class="video">' : '';
48
- echo $wp_embed->shortcode(array('src'=>$fb_post['link'], 'width'=>$width - 20));
49
  echo $use_ratio ? '</div>' : '';
50
  echo $link_info;
51
  echo '</div>';
52
  }
53
  break;
54
  case 'event':
55
- WP_Embed_FB::$width = $width-40;
56
- echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
57
  WP_Embed_FB::$width = $width;
58
  break;
59
  case 'photo':
60
  ?>
61
- <a href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?>" rel="nofollow" target="_blank">
62
- <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
 
 
 
 
63
  </a>
64
  <?php echo $link_info; ?>
65
  <?php
@@ -67,13 +86,15 @@ date_default_timezone_set($old_time_zone);
67
  case 'music':
68
  case 'link':
69
  ?>
70
- <div class="post-link" style="max-width: <?php echo $width?>px;">
71
- <?php if(isset($fb_post['full_picture']) && !empty($fb_post['full_picture'])) : ?>
72
- <div class="relative-container fbpost-image">
73
- <div class="relative" style="background-image: url('<?php echo $fb_post['full_picture'] ?>');" onclick="window.open('<?php echo $fb_post['link'] ?>', '_blank')"></div>
74
- </div>
 
 
75
  <?php endif ?>
76
- <?php if($fb_post["type"] == 'music') : ?>
77
  <p>
78
  <audio controls>
79
  <source src="<?php echo $fb_post['source'] ?>" type="audio/mpeg">
@@ -87,20 +108,35 @@ date_default_timezone_set($old_time_zone);
87
  case 'status':
88
  default:
89
  ?>
90
- <?php if(isset($fb_post['full_picture'],$fb_post['link']) && !empty($fb_post['full_picture']) && !empty($fb_post['link'])) : ?>
91
- <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
92
- <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
93
- </a>
94
- <?php endif; ?>
 
 
 
95
  <?php echo $link_info; ?>
96
  <?php
97
  break;
98
  endswitch;
 
 
 
 
 
 
 
 
 
 
99
  ?><br>
100
- <a class="post-likes" href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?> " target="_blank" rel="nofollow">
101
- <?php echo isset($fb_post['likes']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y6/r/l9Fe9Ugss0S.gif" />'.$fb_post['likes']['summary']['total_count'].' ' : "" ?>
102
- <?php echo isset($fb_post['comments']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yg/r/V8Yrm0eKZpi.gif" />'.$fb_post['comments']['summary']['total_count'].' ' : "" ?>
103
- <?php echo isset($fb_post['shares']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y2/r/o19N6EzzbUm.png" />'.$fb_post['shares']['count'].' ' : "" ?>
 
 
104
  </a>
105
  </div>
106
  </div>
1
  <?php
2
+
3
+
4
+ $story = isset($fb_post['story']) ? '<p>' . $fb_post['story'] . '</p>' : '';
5
+
6
+ $icon = isset($fb_post["icon"]) ? '<img class="icon" title="Facebook ' . $fb_post["type"] . '" src="' . $fb_post["icon"] . '">' : '';
7
+
 
 
 
 
 
 
 
 
 
 
 
 
8
  $old_time_zone = date_default_timezone_get();
9
  date_default_timezone_set(WP_Embed_FB_Plugin::get_timezone());
10
+ $time = $icon . date_i18n(WP_Embed_FB_Plugin::get_option('single_post_time_format'), strtotime($fb_post['created_time']));
11
  date_default_timezone_set($old_time_zone);
12
+
13
+ $description = isset($fb_post['description']) && !empty($fb_post['description']) ? WP_Embed_FB::make_clickable($fb_post['description']) : '';
14
+
15
+ $linkArray = explode("_", $fb_post['id']);
16
+ $link = (isset($fb_post['link']) && !empty($fb_post['link'])) ? $fb_post['link'] : "https://www.facebook.com/" . $linkArray[0] . "/posts/" . $linkArray[1];
17
+
18
+ $message = (isset($fb_post['message']) && !empty($fb_post['message'])) ? $fb_post['message'] : '';
19
+
20
+ $caption = isset($fb_post['caption']) && !empty($fb_post['caption']) ? $fb_post['caption'] : '';
21
+
22
+ $name = isset($fb_post['name']) && !empty($fb_post['name']) ? $fb_post['name'] : '';
23
+
24
+
25
+ if ($caption == $message) {
26
+ $caption = '';
27
+ }
28
+
29
+ $message = WP_Embed_FB::make_clickable($message);
30
+
31
+
32
+ $name = empty($name) ? '' : "<p class=\"caption-title\"><a href=\"$link\" title=\"$name\" target=\"_blank\" rel=\"nofollow\">$name</a></p>";
33
+
34
+ $description = empty($description) ? '' : "<div class=\"caption-description\">$description</div>";
35
+
36
+ $caption = empty($caption) ? '' : "<p class=\"caption-link\"><a href=\"$link\" target=\"_blank\" rel=\"nofollow\"></a>$caption</p>";
37
+
38
+ $link_info = $name . $description . $caption;
39
  ?>
40
  <hr>
41
  <div class="row">
42
  <div class="col-12 page-post">
43
  <?php //echo '<pre>'.wpautop(print_r($fb_post,true)).'</pre>'; ?>
44
+ <?php echo $story ?>
45
+ <p class="post-time"><?php echo $time ?></p>
46
  <?php
47
+ echo $message ? '<p>' . $message . '</p>' : '';
48
+ switch ($fb_post["type"]) :
49
  case 'video':
50
+ if (strpos($link, 'facebook.com') !== false) {
51
  $raw = WP_Embed_FB::$raw;
52
  $width_r = WP_Embed_FB::$width;
53
  WP_Embed_FB::$raw = true;
54
+ WP_Embed_FB::$width = $width - 40;
55
+ echo $wp_embed->shortcode(array('src' => $link));
56
  WP_Embed_FB::$raw = $raw;
57
  WP_Embed_FB::$width = $width_r;
58
  echo $link_info;
60
  $use_ratio = (WP_Embed_FB_Plugin::get_option('video_ratio') == 'true');
61
  echo '<div class="post-link">';
62
  echo $use_ratio ? '<div class="video">' : '';
63
+ echo $wp_embed->shortcode(array('src' => $link, 'width' => $width - 20));
64
  echo $use_ratio ? '</div>' : '';
65
  echo $link_info;
66
  echo '</div>';
67
  }
68
  break;
69
  case 'event':
70
+ WP_Embed_FB::$width = $width - 40;
71
+ echo $wp_embed->shortcode(array('src' => $link));
72
  WP_Embed_FB::$width = $width;
73
  break;
74
  case 'photo':
75
  ?>
76
+
77
+ <a href="<?php echo $fb_post['full_picture'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo $message ? WP_Embed_FB_Plugin::lightbox_title($message) : '' ?> >
78
+ <div class="relative-container fbpost-image">
79
+ <div class="relative"
80
+ style="background-image: url('<?php echo $fb_post['full_picture'] ?>');"></div>
81
+ </div>
82
  </a>
83
  <?php echo $link_info; ?>
84
  <?php
86
  case 'music':
87
  case 'link':
88
  ?>
89
+ <div class="post-link" style="max-width: <?php echo $width ?>px;">
90
+ <?php if (isset($fb_post['full_picture']) && !empty($fb_post['full_picture'])) : ?>
91
+ <div class="relative-container fbpost-image">
92
+ <div class="relative"
93
+ style="background-image: url('<?php echo $fb_post['full_picture'] ?>');"
94
+ onclick="window.open('<?php echo $link ?>', '_blank')"></div>
95
+ </div>
96
  <?php endif ?>
97
+ <?php if ($fb_post["type"] == 'music') : ?>
98
  <p>
99
  <audio controls>
100
  <source src="<?php echo $fb_post['source'] ?>" type="audio/mpeg">
108
  case 'status':
109
  default:
110
  ?>
111
+ <?php if (isset($fb_post['full_picture'], $link) && !empty($fb_post['full_picture']) && !empty($link)) : ?>
112
+ <a href="<?php echo $fb_post['full_picture'] ?>" <?php echo WP_Embed_FB_Plugin::get_option('lightbox_att') ?> <?php echo $message ? WP_Embed_FB_Plugin::lightbox_title($message) : '' ?> >
113
+ <div class="relative-container fbpost-image">
114
+ <div class="relative"
115
+ style="background-image: url('<?php echo $fb_post['full_picture'] ?>');"></div>
116
+ </div>
117
+ </a>
118
+ <?php endif; ?>
119
  <?php echo $link_info; ?>
120
  <?php
121
  break;
122
  endswitch;
123
+ $title_count = '';
124
+ if (isset($fb_post['likes'])) {
125
+ $title_count .= $fb_post['likes']['summary']['total_count'] . ' ' . __('likes', 'wp-embed-facebook') . ' ';
126
+ }
127
+ if (isset($fb_post['comments'])) {
128
+ $title_count .= $fb_post['comments']['summary']['total_count'] . ' ' . __('comments', 'wp-embed-facebook') . ' ';
129
+ }
130
+ if (isset($fb_post['shares'])) {
131
+ $title_count .= $fb_post['shares']['count'] . ' ' . __('shares', 'wp-embed-facebook') . ' ';
132
+ }
133
  ?><br>
134
+ <a class="post-likes"
135
+ href="<?php echo "https://www.facebook.com/" . $linkArray[0] . "/posts/" . $linkArray[1] ?> "
136
+ target="_blank" rel="nofollow" title="<?php echo esc_attr($title_count) ?>">
137
+ <?php echo isset($fb_post['likes']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y6/r/l9Fe9Ugss0S.gif" />' . $fb_post['likes']['summary']['total_count'] . ' ' : "" ?>
138
+ <?php echo isset($fb_post['comments']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yg/r/V8Yrm0eKZpi.gif" />' . $fb_post['comments']['summary']['total_count'] . ' ' : "" ?>
139
+ <?php echo isset($fb_post['shares']) ? '<img src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y2/r/o19N6EzzbUm.png" />' . $fb_post['shares']['count'] . ' ' : "" ?>
140
  </a>
141
  </div>
142
  </div>
wp-embed-facebook.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Embed Facebook
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed any public Facebook video, photo, album, event, page, comment, profile, or post. Add Facebook comments to all your site, insert facebook social plugins (like, save, send, share, follow, quote, comments) anywhere on your site. View the <a href="http://www.wpembedfb.com/demo-site/" title="plugin website" target="_blank">demo site</a>.
6
  Author: Miguel Sirvent
7
- Version: 2.1.4
8
  Author URI: http://www.wpembedfb.com
9
  Text Domain: wp-embed-facebook
10
  Domain Path: /lang
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed any public Facebook video, photo, album, event, page, comment, profile, or post. Add Facebook comments to all your site, insert facebook social plugins (like, save, send, share, follow, quote, comments) anywhere on your site. View the <a href="http://www.wpembedfb.com/demo-site/" title="plugin website" target="_blank">demo site</a>.
6
  Author: Miguel Sirvent
7
+ Version: 2.1.5
8
  Author URI: http://www.wpembedfb.com
9
  Text Domain: wp-embed-facebook
10
  Domain Path: /lang