Version Description
Download this release
Release Info
| Developer | 10web |
| Plugin | |
| Version | 1.2.6 |
| Comparing to | |
| See all releases | |
Code changes from version 1.2.5 to 1.2.6
- admin/controllers/FFWDControllerOptions_ffwd.php +0 -6
- admin/models/FFWDModelInfo_ffwd.php +1 -115
- admin/models/FFWDModelOptions_ffwd.php +2 -116
- admin/views/FFWDViewOptions_ffwd.php +1 -10
- facebook-feed-wd.php +2 -12
- framework/WDFacebookFeed.php +199 -25
- framework/WDW_FFWD_Library.php +0 -19
- frontend/models/FFWDModelBlog_style.php +1 -6
- js/ffwd.js +9 -4
- js/ffwd_cache.js +2 -1
- js/ffwd_frontend.js +2 -4
- js/ffwd_gallery_box.js +1 -1
- js/tw-gb/block.js +3 -3
- readme.txt +5 -4
admin/controllers/FFWDControllerOptions_ffwd.php
CHANGED
|
@@ -59,11 +59,6 @@ class FFWDControllerOptions_ffwd {
|
|
| 59 |
$autoupdate_interval = ($autoupdate_interval >= 1 ? $autoupdate_interval : 1 );
|
| 60 |
$facebook_app_id = (isset($_POST[WD_FB_PREFIX . '_app_id']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_app_id'])) : '');
|
| 61 |
$facebook_app_secret = (isset($_POST[ WD_FB_PREFIX . '_app_secret']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_app_secret'])) : '');
|
| 62 |
-
$timezone_lists = WDW_FFWD_Library::getTimezoneList();
|
| 63 |
-
$date_timezone = (isset($_POST[ WD_FB_PREFIX . '_date_timezone']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_date_timezone'])) : 'Pacific/Midway');
|
| 64 |
-
if ( !empty($date_timezone) && !empty($timezone_lists) && !in_array($date_timezone, $timezone_lists) ) {
|
| 65 |
-
$date_timezone = '';
|
| 66 |
-
}
|
| 67 |
$post_date_format = (isset($_POST[WD_FB_PREFIX . '_post_date_format']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_post_date_format'])) : 'ago');
|
| 68 |
$event_date_format = (isset($_POST[WD_FB_PREFIX . '_event_date_format']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_event_date_format'])) : 'F j, Y, g:i a');
|
| 69 |
|
|
@@ -71,7 +66,6 @@ class FFWDControllerOptions_ffwd {
|
|
| 71 |
'autoupdate_interval' => $autoupdate_interval,
|
| 72 |
'app_id' => $facebook_app_id,
|
| 73 |
'app_secret' => $facebook_app_secret,
|
| 74 |
-
'date_timezone' => $date_timezone,
|
| 75 |
'post_date_format' => $post_date_format,
|
| 76 |
'event_date_format' => $event_date_format,
|
| 77 |
);
|
| 59 |
$autoupdate_interval = ($autoupdate_interval >= 1 ? $autoupdate_interval : 1 );
|
| 60 |
$facebook_app_id = (isset($_POST[WD_FB_PREFIX . '_app_id']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_app_id'])) : '');
|
| 61 |
$facebook_app_secret = (isset($_POST[ WD_FB_PREFIX . '_app_secret']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_app_secret'])) : '');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
$post_date_format = (isset($_POST[WD_FB_PREFIX . '_post_date_format']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_post_date_format'])) : 'ago');
|
| 63 |
$event_date_format = (isset($_POST[WD_FB_PREFIX . '_event_date_format']) ? sanitize_text_field(stripslashes($_POST[WD_FB_PREFIX . '_event_date_format'])) : 'F j, Y, g:i a');
|
| 64 |
|
| 66 |
'autoupdate_interval' => $autoupdate_interval,
|
| 67 |
'app_id' => $facebook_app_id,
|
| 68 |
'app_secret' => $facebook_app_secret,
|
|
|
|
| 69 |
'post_date_format' => $post_date_format,
|
| 70 |
'event_date_format' => $event_date_format,
|
| 71 |
);
|
admin/models/FFWDModelInfo_ffwd.php
CHANGED
|
@@ -8,120 +8,6 @@ class FFWDModelInfo_ffwd {
|
|
| 8 |
private $app_secret;
|
| 9 |
private $access_token;
|
| 10 |
public $ffwd_objects;
|
| 11 |
-
public $date_timezones = array(
|
| 12 |
-
'Pacific/Midway' => "(GMT-11:00) Midway Island",
|
| 13 |
-
'US/Samoa' => "(GMT-11:00) Samoa",
|
| 14 |
-
'US/Hawaii' => "(GMT-10:00) Hawaii",
|
| 15 |
-
'US/Alaska' => "(GMT-09:00) Alaska",
|
| 16 |
-
'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)",
|
| 17 |
-
'America/Tijuana' => "(GMT-08:00) Tijuana",
|
| 18 |
-
'US/Arizona' => "(GMT-07:00) Arizona",
|
| 19 |
-
'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)",
|
| 20 |
-
'America/Chihuahua' => "(GMT-07:00) Chihuahua",
|
| 21 |
-
'America/Mazatlan' => "(GMT-07:00) Mazatlan",
|
| 22 |
-
'America/Mexico_City' => "(GMT-06:00) Mexico City",
|
| 23 |
-
'America/Monterrey' => "(GMT-06:00) Monterrey",
|
| 24 |
-
'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan",
|
| 25 |
-
'US/Central' => "(GMT-06:00) Central Time (US & Canada)",
|
| 26 |
-
'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)",
|
| 27 |
-
'US/East-Indiana' => "(GMT-05:00) Indiana (East)",
|
| 28 |
-
'America/Bogota' => "(GMT-05:00) Bogota",
|
| 29 |
-
'America/Lima' => "(GMT-05:00) Lima",
|
| 30 |
-
'America/Caracas' => "(GMT-04:30) Caracas",
|
| 31 |
-
'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)",
|
| 32 |
-
'America/La_Paz' => "(GMT-04:00) La Paz",
|
| 33 |
-
'America/Santiago' => "(GMT-04:00) Santiago",
|
| 34 |
-
'Canada/Newfoundland' => "(GMT-03:30) Newfoundland",
|
| 35 |
-
'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires",
|
| 36 |
-
'Greenland' => "(GMT-03:00) Greenland",
|
| 37 |
-
'Atlantic/Stanley' => "(GMT-02:00) Stanley",
|
| 38 |
-
'Atlantic/Azores' => "(GMT-01:00) Azores",
|
| 39 |
-
'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.",
|
| 40 |
-
'Africa/Casablanca' => "(GMT) Casablanca",
|
| 41 |
-
'Europe/Dublin' => "(GMT) Dublin",
|
| 42 |
-
'Europe/Lisbon' => "(GMT) Lisbon",
|
| 43 |
-
'Europe/London' => "(GMT) London",
|
| 44 |
-
'Africa/Monrovia' => "(GMT) Monrovia",
|
| 45 |
-
'Europe/Amsterdam' => "(GMT+01:00) Amsterdam",
|
| 46 |
-
'Europe/Belgrade' => "(GMT+01:00) Belgrade",
|
| 47 |
-
'Europe/Berlin' => "(GMT+01:00) Berlin",
|
| 48 |
-
'Europe/Bratislava' => "(GMT+01:00) Bratislava",
|
| 49 |
-
'Europe/Brussels' => "(GMT+01:00) Brussels",
|
| 50 |
-
'Europe/Budapest' => "(GMT+01:00) Budapest",
|
| 51 |
-
'Europe/Copenhagen' => "(GMT+01:00) Copenhagen",
|
| 52 |
-
'Europe/Ljubljana' => "(GMT+01:00) Ljubljana",
|
| 53 |
-
'Europe/Madrid' => "(GMT+01:00) Madrid",
|
| 54 |
-
'Europe/Paris' => "(GMT+01:00) Paris",
|
| 55 |
-
'Europe/Prague' => "(GMT+01:00) Prague",
|
| 56 |
-
'Europe/Rome' => "(GMT+01:00) Rome",
|
| 57 |
-
'Europe/Sarajevo' => "(GMT+01:00) Sarajevo",
|
| 58 |
-
'Europe/Skopje' => "(GMT+01:00) Skopje",
|
| 59 |
-
'Europe/Stockholm' => "(GMT+01:00) Stockholm",
|
| 60 |
-
'Europe/Vienna' => "(GMT+01:00) Vienna",
|
| 61 |
-
'Europe/Warsaw' => "(GMT+01:00) Warsaw",
|
| 62 |
-
'Europe/Zagreb' => "(GMT+01:00) Zagreb",
|
| 63 |
-
'Europe/Athens' => "(GMT+02:00) Athens",
|
| 64 |
-
'Europe/Bucharest' => "(GMT+02:00) Bucharest",
|
| 65 |
-
'Africa/Cairo' => "(GMT+02:00) Cairo",
|
| 66 |
-
'Africa/Harare' => "(GMT+02:00) Harare",
|
| 67 |
-
'Europe/Helsinki' => "(GMT+02:00) Helsinki",
|
| 68 |
-
'Europe/Istanbul' => "(GMT+02:00) Istanbul",
|
| 69 |
-
'Asia/Jerusalem' => "(GMT+02:00) Jerusalem",
|
| 70 |
-
'Europe/Kiev' => "(GMT+02:00) Kyiv",
|
| 71 |
-
'Europe/Minsk' => "(GMT+02:00) Minsk",
|
| 72 |
-
'Europe/Riga' => "(GMT+02:00) Riga",
|
| 73 |
-
'Europe/Sofia' => "(GMT+02:00) Sofia",
|
| 74 |
-
'Europe/Tallinn' => "(GMT+02:00) Tallinn",
|
| 75 |
-
'Europe/Vilnius' => "(GMT+02:00) Vilnius",
|
| 76 |
-
'Asia/Baghdad' => "(GMT+03:00) Baghdad",
|
| 77 |
-
'Asia/Kuwait' => "(GMT+03:00) Kuwait",
|
| 78 |
-
'Africa/Nairobi' => "(GMT+03:00) Nairobi",
|
| 79 |
-
'Asia/Riyadh' => "(GMT+03:00) Riyadh",
|
| 80 |
-
'Europe/Moscow' => "(GMT+03:00) Moscow",
|
| 81 |
-
'Asia/Tehran' => "(GMT+03:30) Tehran",
|
| 82 |
-
'Asia/Baku' => "(GMT+04:00) Baku",
|
| 83 |
-
'Europe/Volgograd' => "(GMT+04:00) Volgograd",
|
| 84 |
-
'Asia/Muscat' => "(GMT+04:00) Muscat",
|
| 85 |
-
'Asia/Tbilisi' => "(GMT+04:00) Tbilisi",
|
| 86 |
-
'Asia/Yerevan' => "(GMT+04:00) Yerevan",
|
| 87 |
-
'Asia/Kabul' => "(GMT+04:30) Kabul",
|
| 88 |
-
'Asia/Karachi' => "(GMT+05:00) Karachi",
|
| 89 |
-
'Asia/Tashkent' => "(GMT+05:00) Tashkent",
|
| 90 |
-
'Asia/Kolkata' => "(GMT+05:30) Kolkata",
|
| 91 |
-
'Asia/Kathmandu' => "(GMT+05:45) Kathmandu",
|
| 92 |
-
'Asia/Yekaterinburg' => "(GMT+06:00) Ekaterinburg",
|
| 93 |
-
'Asia/Almaty' => "(GMT+06:00) Almaty",
|
| 94 |
-
'Asia/Dhaka' => "(GMT+06:00) Dhaka",
|
| 95 |
-
'Asia/Novosibirsk' => "(GMT+07:00) Novosibirsk",
|
| 96 |
-
'Asia/Bangkok' => "(GMT+07:00) Bangkok",
|
| 97 |
-
'Asia/Jakarta' => "(GMT+07:00) Jakarta",
|
| 98 |
-
'Asia/Krasnoyarsk' => "(GMT+08:00) Krasnoyarsk",
|
| 99 |
-
'Asia/Chongqing' => "(GMT+08:00) Chongqing",
|
| 100 |
-
'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong",
|
| 101 |
-
'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur",
|
| 102 |
-
'Australia/Perth' => "(GMT+08:00) Perth",
|
| 103 |
-
'Asia/Singapore' => "(GMT+08:00) Singapore",
|
| 104 |
-
'Asia/Taipei' => "(GMT+08:00) Taipei",
|
| 105 |
-
'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar",
|
| 106 |
-
'Asia/Urumqi' => "(GMT+08:00) Urumqi",
|
| 107 |
-
'Asia/Irkutsk' => "(GMT+09:00) Irkutsk",
|
| 108 |
-
'Asia/Seoul' => "(GMT+09:00) Seoul",
|
| 109 |
-
'Asia/Tokyo' => "(GMT+09:00) Tokyo",
|
| 110 |
-
'Australia/Adelaide' => "(GMT+09:30) Adelaide",
|
| 111 |
-
'Australia/Darwin' => "(GMT+09:30) Darwin",
|
| 112 |
-
'Asia/Yakutsk' => "(GMT+10:00) Yakutsk",
|
| 113 |
-
'Australia/Brisbane' => "(GMT+10:00) Brisbane",
|
| 114 |
-
'Australia/Canberra' => "(GMT+10:00) Canberra",
|
| 115 |
-
'Pacific/Guam' => "(GMT+10:00) Guam",
|
| 116 |
-
'Australia/Hobart' => "(GMT+10:00) Hobart",
|
| 117 |
-
'Australia/Melbourne' => "(GMT+10:00) Melbourne",
|
| 118 |
-
'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby",
|
| 119 |
-
'Australia/Sydney' => "(GMT+10:00) Sydney",
|
| 120 |
-
'Asia/Vladivostok' => "(GMT+11:00) Vladivostok",
|
| 121 |
-
'Asia/Magadan' => "(GMT+12:00) Magadan",
|
| 122 |
-
'Pacific/Auckland' => "(GMT+12:00) Auckland",
|
| 123 |
-
'Pacific/Fiji' => "(GMT+12:00) Fiji",
|
| 124 |
-
);
|
| 125 |
public $date_formats = array(
|
| 126 |
"ago" => "2 days ago",
|
| 127 |
"F j, Y, g:i a" => "March 10, 2015, 5:16 pm",
|
|
@@ -317,7 +203,7 @@ class FFWDModelInfo_ffwd {
|
|
| 317 |
$row->post_text_length= 200;
|
| 318 |
$row->post_date_format= 'ago';
|
| 319 |
$row->fb_view_type= '';
|
| 320 |
-
$row->date_timezone= '
|
| 321 |
$row->event_street= 1;
|
| 322 |
$row->event_city= 1;
|
| 323 |
$row->event_country= 1;
|
| 8 |
private $app_secret;
|
| 9 |
private $access_token;
|
| 10 |
public $ffwd_objects;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
public $date_formats = array(
|
| 12 |
"ago" => "2 days ago",
|
| 13 |
"F j, Y, g:i a" => "March 10, 2015, 5:16 pm",
|
| 203 |
$row->post_text_length= 200;
|
| 204 |
$row->post_date_format= 'ago';
|
| 205 |
$row->fb_view_type= '';
|
| 206 |
+
$row->date_timezone= '';
|
| 207 |
$row->event_street= 1;
|
| 208 |
$row->event_city= 1;
|
| 209 |
$row->event_country= 1;
|
admin/models/FFWDModelOptions_ffwd.php
CHANGED
|
@@ -6,121 +6,7 @@ class FFWDModelOptions_ffwd {
|
|
| 6 |
private $app_id;
|
| 7 |
private $app_secret;
|
| 8 |
private $access_token;
|
| 9 |
-
|
| 10 |
-
'Pacific/Midway' => "(GMT-11:00) Midway Island",
|
| 11 |
-
'US/Samoa' => "(GMT-11:00) Samoa",
|
| 12 |
-
'US/Hawaii' => "(GMT-10:00) Hawaii",
|
| 13 |
-
'US/Alaska' => "(GMT-09:00) Alaska",
|
| 14 |
-
'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)",
|
| 15 |
-
'America/Tijuana' => "(GMT-08:00) Tijuana",
|
| 16 |
-
'US/Arizona' => "(GMT-07:00) Arizona",
|
| 17 |
-
'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)",
|
| 18 |
-
'America/Chihuahua' => "(GMT-07:00) Chihuahua",
|
| 19 |
-
'America/Mazatlan' => "(GMT-07:00) Mazatlan",
|
| 20 |
-
'America/Mexico_City' => "(GMT-06:00) Mexico City",
|
| 21 |
-
'America/Monterrey' => "(GMT-06:00) Monterrey",
|
| 22 |
-
'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan",
|
| 23 |
-
'US/Central' => "(GMT-06:00) Central Time (US & Canada)",
|
| 24 |
-
'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)",
|
| 25 |
-
'US/East-Indiana' => "(GMT-05:00) Indiana (East)",
|
| 26 |
-
'America/Bogota' => "(GMT-05:00) Bogota",
|
| 27 |
-
'America/Lima' => "(GMT-05:00) Lima",
|
| 28 |
-
'America/Caracas' => "(GMT-04:30) Caracas",
|
| 29 |
-
'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)",
|
| 30 |
-
'America/La_Paz' => "(GMT-04:00) La Paz",
|
| 31 |
-
'America/Santiago' => "(GMT-04:00) Santiago",
|
| 32 |
-
'Canada/Newfoundland' => "(GMT-03:30) Newfoundland",
|
| 33 |
-
'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires",
|
| 34 |
-
'Greenland' => "(GMT-03:00) Greenland",
|
| 35 |
-
'Atlantic/Stanley' => "(GMT-02:00) Stanley",
|
| 36 |
-
'Atlantic/Azores' => "(GMT-01:00) Azores",
|
| 37 |
-
'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.",
|
| 38 |
-
'Africa/Casablanca' => "(GMT) Casablanca",
|
| 39 |
-
'Europe/Dublin' => "(GMT) Dublin",
|
| 40 |
-
'Europe/Lisbon' => "(GMT) Lisbon",
|
| 41 |
-
'Europe/London' => "(GMT) London",
|
| 42 |
-
'Africa/Monrovia' => "(GMT) Monrovia",
|
| 43 |
-
'Europe/Amsterdam' => "(GMT+01:00) Amsterdam",
|
| 44 |
-
'Europe/Belgrade' => "(GMT+01:00) Belgrade",
|
| 45 |
-
'Europe/Berlin' => "(GMT+01:00) Berlin",
|
| 46 |
-
'Europe/Bratislava' => "(GMT+01:00) Bratislava",
|
| 47 |
-
'Europe/Brussels' => "(GMT+01:00) Brussels",
|
| 48 |
-
'Europe/Budapest' => "(GMT+01:00) Budapest",
|
| 49 |
-
'Europe/Copenhagen' => "(GMT+01:00) Copenhagen",
|
| 50 |
-
'Europe/Ljubljana' => "(GMT+01:00) Ljubljana",
|
| 51 |
-
'Europe/Madrid' => "(GMT+01:00) Madrid",
|
| 52 |
-
'Europe/Paris' => "(GMT+01:00) Paris",
|
| 53 |
-
'Europe/Prague' => "(GMT+01:00) Prague",
|
| 54 |
-
'Europe/Rome' => "(GMT+01:00) Rome",
|
| 55 |
-
'Europe/Sarajevo' => "(GMT+01:00) Sarajevo",
|
| 56 |
-
'Europe/Skopje' => "(GMT+01:00) Skopje",
|
| 57 |
-
'Europe/Stockholm' => "(GMT+01:00) Stockholm",
|
| 58 |
-
'Europe/Vienna' => "(GMT+01:00) Vienna",
|
| 59 |
-
'Europe/Warsaw' => "(GMT+01:00) Warsaw",
|
| 60 |
-
'Europe/Zagreb' => "(GMT+01:00) Zagreb",
|
| 61 |
-
'Europe/Athens' => "(GMT+02:00) Athens",
|
| 62 |
-
'Europe/Bucharest' => "(GMT+02:00) Bucharest",
|
| 63 |
-
'Africa/Cairo' => "(GMT+02:00) Cairo",
|
| 64 |
-
'Africa/Harare' => "(GMT+02:00) Harare",
|
| 65 |
-
'Europe/Helsinki' => "(GMT+02:00) Helsinki",
|
| 66 |
-
'Europe/Istanbul' => "(GMT+02:00) Istanbul",
|
| 67 |
-
'Asia/Jerusalem' => "(GMT+02:00) Jerusalem",
|
| 68 |
-
'Europe/Kiev' => "(GMT+02:00) Kyiv",
|
| 69 |
-
'Europe/Minsk' => "(GMT+02:00) Minsk",
|
| 70 |
-
'Europe/Riga' => "(GMT+02:00) Riga",
|
| 71 |
-
'Europe/Sofia' => "(GMT+02:00) Sofia",
|
| 72 |
-
'Europe/Tallinn' => "(GMT+02:00) Tallinn",
|
| 73 |
-
'Europe/Vilnius' => "(GMT+02:00) Vilnius",
|
| 74 |
-
'Asia/Baghdad' => "(GMT+03:00) Baghdad",
|
| 75 |
-
'Asia/Kuwait' => "(GMT+03:00) Kuwait",
|
| 76 |
-
'Africa/Nairobi' => "(GMT+03:00) Nairobi",
|
| 77 |
-
'Asia/Riyadh' => "(GMT+03:00) Riyadh",
|
| 78 |
-
'Europe/Moscow' => "(GMT+03:00) Moscow",
|
| 79 |
-
'Asia/Tehran' => "(GMT+03:30) Tehran",
|
| 80 |
-
'Asia/Baku' => "(GMT+04:00) Baku",
|
| 81 |
-
'Europe/Volgograd' => "(GMT+04:00) Volgograd",
|
| 82 |
-
'Asia/Muscat' => "(GMT+04:00) Muscat",
|
| 83 |
-
'Asia/Tbilisi' => "(GMT+04:00) Tbilisi",
|
| 84 |
-
'Asia/Yerevan' => "(GMT+04:00) Yerevan",
|
| 85 |
-
'Asia/Kabul' => "(GMT+04:30) Kabul",
|
| 86 |
-
'Asia/Karachi' => "(GMT+05:00) Karachi",
|
| 87 |
-
'Asia/Tashkent' => "(GMT+05:00) Tashkent",
|
| 88 |
-
'Asia/Kolkata' => "(GMT+05:30) Kolkata",
|
| 89 |
-
'Asia/Kathmandu' => "(GMT+05:45) Kathmandu",
|
| 90 |
-
'Asia/Yekaterinburg' => "(GMT+06:00) Ekaterinburg",
|
| 91 |
-
'Asia/Almaty' => "(GMT+06:00) Almaty",
|
| 92 |
-
'Asia/Dhaka' => "(GMT+06:00) Dhaka",
|
| 93 |
-
'Asia/Novosibirsk' => "(GMT+07:00) Novosibirsk",
|
| 94 |
-
'Asia/Bangkok' => "(GMT+07:00) Bangkok",
|
| 95 |
-
'Asia/Jakarta' => "(GMT+07:00) Jakarta",
|
| 96 |
-
'Asia/Krasnoyarsk' => "(GMT+08:00) Krasnoyarsk",
|
| 97 |
-
'Asia/Chongqing' => "(GMT+08:00) Chongqing",
|
| 98 |
-
'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong",
|
| 99 |
-
'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur",
|
| 100 |
-
'Australia/Perth' => "(GMT+08:00) Perth",
|
| 101 |
-
'Asia/Singapore' => "(GMT+08:00) Singapore",
|
| 102 |
-
'Asia/Taipei' => "(GMT+08:00) Taipei",
|
| 103 |
-
'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar",
|
| 104 |
-
'Asia/Urumqi' => "(GMT+08:00) Urumqi",
|
| 105 |
-
'Asia/Irkutsk' => "(GMT+09:00) Irkutsk",
|
| 106 |
-
'Asia/Seoul' => "(GMT+09:00) Seoul",
|
| 107 |
-
'Asia/Tokyo' => "(GMT+09:00) Tokyo",
|
| 108 |
-
'Australia/Adelaide' => "(GMT+09:30) Adelaide",
|
| 109 |
-
'Australia/Darwin' => "(GMT+09:30) Darwin",
|
| 110 |
-
'Asia/Yakutsk' => "(GMT+10:00) Yakutsk",
|
| 111 |
-
'Australia/Brisbane' => "(GMT+10:00) Brisbane",
|
| 112 |
-
'Australia/Canberra' => "(GMT+10:00) Canberra",
|
| 113 |
-
'Pacific/Guam' => "(GMT+10:00) Guam",
|
| 114 |
-
'Australia/Hobart' => "(GMT+10:00) Hobart",
|
| 115 |
-
'Australia/Melbourne' => "(GMT+10:00) Melbourne",
|
| 116 |
-
'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby",
|
| 117 |
-
'Australia/Sydney' => "(GMT+10:00) Sydney",
|
| 118 |
-
'Asia/Vladivostok' => "(GMT+11:00) Vladivostok",
|
| 119 |
-
'Asia/Magadan' => "(GMT+12:00) Magadan",
|
| 120 |
-
'Pacific/Auckland' => "(GMT+12:00) Auckland",
|
| 121 |
-
'Pacific/Fiji' => "(GMT+12:00) Fiji",
|
| 122 |
-
);
|
| 123 |
-
|
| 124 |
public $date_formats = array(
|
| 125 |
"ago" => "2 days ago",
|
| 126 |
"F j, Y, g:i a" => "March 10, 2015, 5:16 pm",
|
|
@@ -304,7 +190,7 @@ class FFWDModelOptions_ffwd {
|
|
| 304 |
'autoupdate_interval' => $row->autoupdate_interval,
|
| 305 |
'app_id' => $row->app_id,
|
| 306 |
'app_secret' => $row->app_secret,
|
| 307 |
-
'date_timezone' =>
|
| 308 |
'post_date_format' => $row->post_date_format,
|
| 309 |
'event_date_format' => $row->event_date_format,
|
| 310 |
), array( 'id' => 1 ));
|
| 6 |
private $app_id;
|
| 7 |
private $app_secret;
|
| 8 |
private $access_token;
|
| 9 |
+
public $date_timezones = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
public $date_formats = array(
|
| 11 |
"ago" => "2 days ago",
|
| 12 |
"F j, Y, g:i a" => "March 10, 2015, 5:16 pm",
|
| 190 |
'autoupdate_interval' => $row->autoupdate_interval,
|
| 191 |
'app_id' => $row->app_id,
|
| 192 |
'app_secret' => $row->app_secret,
|
| 193 |
+
'date_timezone' => '',
|
| 194 |
'post_date_format' => $row->post_date_format,
|
| 195 |
'event_date_format' => $row->event_date_format,
|
| 196 |
), array( 'id' => 1 ));
|
admin/views/FFWDViewOptions_ffwd.php
CHANGED
|
@@ -92,16 +92,7 @@ class FFWDViewOptions_ffwd {
|
|
| 92 |
<div class="spider_div_options" id="div_content_1" style="">
|
| 93 |
<table style="width: 100%;">
|
| 94 |
<tbody>
|
| 95 |
-
|
| 96 |
-
<td class="spider_label_options">
|
| 97 |
-
<label><?php _e('Timezone:', 'ffwd'); ?></label>
|
| 98 |
-
</td>
|
| 99 |
-
<td>
|
| 100 |
-
<input type="text" value="<?php echo $row->date_timezone; ?>" name="<?php echo WD_FB_PREFIX; ?>_date_timezone">
|
| 101 |
-
<div class="spider_description"><?php _e('If left empty, the server timezone will be used. Example Europe/London.', 'ffwd'); ?></div>
|
| 102 |
-
</td>
|
| 103 |
-
</tr>
|
| 104 |
-
<tr>
|
| 105 |
<td class="spider_label_options">
|
| 106 |
<label><?php _e('Date format for posts:', 'ffwd'); ?></label>
|
| 107 |
</td>
|
| 92 |
<div class="spider_div_options" id="div_content_1" style="">
|
| 93 |
<table style="width: 100%;">
|
| 94 |
<tbody>
|
| 95 |
+
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
<td class="spider_label_options">
|
| 97 |
<label><?php _e('Date format for posts:', 'ffwd'); ?></label>
|
| 98 |
</td>
|
facebook-feed-wd.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: 10Web Social Feed
|
| 4 |
* Plugin URI: https://10web.io/plugins/wordpress-facebook-feed/?utm_source=facebook_feed&utm_medium=free_plugin
|
| 5 |
* Description: 10Web Social Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
| 6 |
-
* Version: 1.2.
|
| 7 |
* Author: 10Web
|
| 8 |
* Author URI: https://10web.io/plugins/?utm_source=facebook_feed&utm_medium=free_plugin
|
| 9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
|
@@ -16,7 +16,7 @@ define('WD_FB_PREFIX', 'ffwd');
|
|
| 16 |
define('WD_FB_IS_FREE', true);
|
| 17 |
define('WD_FB_TIMELINE_MAX_CALL_COUNT', 5);
|
| 18 |
if ( !defined('FFWD_VERSION') ) {
|
| 19 |
-
define('FFWD_VERSION', '1.2.
|
| 20 |
}
|
| 21 |
add_action( 'admin_init', 'ffwd_init' );
|
| 22 |
|
|
@@ -744,16 +744,6 @@ function ffwd_activate() {
|
|
| 744 |
) " . $charset_collate . ";";
|
| 745 |
$wpdb->query($wd_fb_option);
|
| 746 |
|
| 747 |
-
/*$ffwd_settings = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "ffwd_settings` (
|
| 748 |
-
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
| 749 |
-
`autoupdate_interval` int(4) NOT NULL,
|
| 750 |
-
`app_id` varchar(255) NOT NULL,
|
| 751 |
-
`app_secret` varchar(255) NOT NULL,
|
| 752 |
-
`date_timezone` varchar(64) NOT NULL,
|
| 753 |
-
PRIMARY KEY (`id`)
|
| 754 |
-
) DEFAULT CHARSET=utf8;";
|
| 755 |
-
$wpdb->query($ffwd_settings);*/
|
| 756 |
-
|
| 757 |
$wd_fb_theme = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "wd_fb_theme` (
|
| 758 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
| 759 |
`name` varchar(255) NOT NULL,
|
| 3 |
* Plugin Name: 10Web Social Feed
|
| 4 |
* Plugin URI: https://10web.io/plugins/wordpress-facebook-feed/?utm_source=facebook_feed&utm_medium=free_plugin
|
| 5 |
* Description: 10Web Social Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
| 6 |
+
* Version: 1.2.6
|
| 7 |
* Author: 10Web
|
| 8 |
* Author URI: https://10web.io/plugins/?utm_source=facebook_feed&utm_medium=free_plugin
|
| 9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
| 16 |
define('WD_FB_IS_FREE', true);
|
| 17 |
define('WD_FB_TIMELINE_MAX_CALL_COUNT', 5);
|
| 18 |
if ( !defined('FFWD_VERSION') ) {
|
| 19 |
+
define('FFWD_VERSION', '1.2.6');
|
| 20 |
}
|
| 21 |
add_action( 'admin_init', 'ffwd_init' );
|
| 22 |
|
| 744 |
) " . $charset_collate . ";";
|
| 745 |
$wpdb->query($wd_fb_option);
|
| 746 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 747 |
$wd_fb_theme = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "wd_fb_theme` (
|
| 748 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
| 749 |
`name` varchar(255) NOT NULL,
|
framework/WDFacebookFeed.php
CHANGED
|
@@ -45,6 +45,11 @@ class WDFacebookFeed {
|
|
| 45 |
|
| 46 |
public static $client_side_check = array();
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
public static function execute() {
|
| 49 |
if (function_exists('current_user_can')) {
|
| 50 |
if (!current_user_can('manage_options')) {
|
|
@@ -766,6 +771,8 @@ class WDFacebookFeed {
|
|
| 766 |
self::set_timeline_cache_data();
|
| 767 |
die;
|
| 768 |
}
|
|
|
|
|
|
|
| 769 |
|
| 770 |
self::$content = explode(',', self::get_content(self::$fb_id));
|
| 771 |
self::$content_type = self::get_content_type(self::$fb_id);
|
|
@@ -796,12 +803,16 @@ class WDFacebookFeed {
|
|
| 796 |
''
|
| 797 |
), self::$graph_url);
|
| 798 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 799 |
|
| 800 |
$data['data'] = self::complite_timeline($fb_graph_url, $iter);
|
| 801 |
self::$data = $data;
|
| 802 |
self::update_db();
|
| 803 |
|
| 804 |
-
if ( self::$timeline_max_call_count > intval($iter) && self::$next_page ) {
|
| 805 |
self::$timeline_max_call_count--;
|
| 806 |
echo json_encode(array("status" => "success", "next_page" => self::$next_page, "iter" => $iter, "fb_id" => self::$fb_id));
|
| 807 |
} else {
|
|
@@ -822,7 +833,7 @@ class WDFacebookFeed {
|
|
| 822 |
self::$fb_id = WDW_FFWD_Library::get('fb_id');
|
| 823 |
self::$content = explode(',', self::get_content(self::$fb_id));
|
| 824 |
self::$content_type = self::get_content_type(self::$fb_id);
|
| 825 |
-
|
| 826 |
self::$timeline_max_call_count = WD_FB_TIMELINE_MAX_CALL_COUNT;
|
| 827 |
self::set_timeline_type();
|
| 828 |
self::$complite_timeline_data = array();
|
|
@@ -851,6 +862,11 @@ class WDFacebookFeed {
|
|
| 851 |
if( defined('FFWD_NEED_UPDATE_CACHE') && FFWD_NEED_UPDATE_CACHE ) {
|
| 852 |
self::$auto_update_feed = 1;
|
| 853 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 854 |
if ( self::$auto_update_feed == 1 ) {
|
| 855 |
$id = self::$fb_id;
|
| 856 |
$update_ids = array();
|
|
@@ -873,7 +889,7 @@ class WDFacebookFeed {
|
|
| 873 |
self::$data = $data;
|
| 874 |
self::insert_wd_fb_data($data['data']);
|
| 875 |
}
|
| 876 |
-
if ( self::$timeline_max_call_count > intval($iter) && self::$next_page ) {
|
| 877 |
self::$timeline_max_call_count--;
|
| 878 |
echo json_encode(array("status" => "success", "next_page" => self::$next_page, "iter" => $iter, "fb_id" => self::$fb_id, "non_public_share_count" => self::$non_public_share_count));
|
| 879 |
} else {
|
|
@@ -1001,24 +1017,6 @@ class WDFacebookFeed {
|
|
| 1001 |
$paging = array_key_exists('paging', $data) ? $data['paging'] : array();
|
| 1002 |
self::$next_page = array_key_exists('next', $paging) ? $paging['next'] : 0;
|
| 1003 |
foreach ( $data['data'] as $key => $next ) {
|
| 1004 |
-
$object_id = $next['id'];
|
| 1005 |
-
// @TODO type is deprecated V3.3
|
| 1006 |
-
/*
|
| 1007 |
-
// check if content_type is timeline dont save wd_fb_data if
|
| 1008 |
-
// $content string not contain $next['type']
|
| 1009 |
-
if ( self::$content_type == 'timeline' ) {
|
| 1010 |
-
if ( strpos($content, $next['type']) === FALSE ) {
|
| 1011 |
-
continue;
|
| 1012 |
-
}
|
| 1013 |
-
$type = $next['type'];
|
| 1014 |
-
if ( self::$timeline_type == 'others' && self::$id == $next['from']['id'] ) {
|
| 1015 |
-
continue;
|
| 1016 |
-
}
|
| 1017 |
-
}
|
| 1018 |
-
else {
|
| 1019 |
-
$type = self::$content[0];
|
| 1020 |
-
}
|
| 1021 |
-
*/
|
| 1022 |
$type = '';
|
| 1023 |
$source = '';
|
| 1024 |
$main_url = '';
|
|
@@ -1214,9 +1212,17 @@ class WDFacebookFeed {
|
|
| 1214 |
'reactions' => $reactions,
|
| 1215 |
);
|
| 1216 |
|
| 1217 |
-
|
| 1218 |
if ( !isset($ids[$object_id]) ) {
|
|
|
|
|
|
|
|
|
|
| 1219 |
$wpdb->insert($wpdb->prefix . 'wd_fb_data', $feed_data, $format);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1220 |
} else {
|
| 1221 |
$wpdb->update($wpdb->prefix . 'wd_fb_data', $feed_data, array( 'id' => $ids[$object_id] ), $format);
|
| 1222 |
}
|
|
@@ -1298,7 +1304,154 @@ class WDFacebookFeed {
|
|
| 1298 |
* Check errors.
|
| 1299 |
*/
|
| 1300 |
public static function specific() {
|
| 1301 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1302 |
}
|
| 1303 |
|
| 1304 |
/**
|
|
@@ -1535,6 +1688,19 @@ class WDFacebookFeed {
|
|
| 1535 |
return $var;
|
| 1536 |
}
|
| 1537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1538 |
/**
|
| 1539 |
* Insert data from facebook response to DataBase
|
| 1540 |
*
|
|
@@ -1564,8 +1730,11 @@ class WDFacebookFeed {
|
|
| 1564 |
}
|
| 1565 |
array_multisort($start_time, SORT_DESC, $data);
|
| 1566 |
}
|
| 1567 |
-
|
| 1568 |
foreach ( $data as $key => $next ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1569 |
$type = '';
|
| 1570 |
$source = '';
|
| 1571 |
$main_url = '';
|
|
@@ -1786,6 +1955,11 @@ class WDFacebookFeed {
|
|
| 1786 |
);
|
| 1787 |
if ($save_fb_data !== false) {
|
| 1788 |
$success = 'success';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1789 |
}
|
| 1790 |
else {
|
| 1791 |
$success = 'error';
|
|
@@ -2075,7 +2249,7 @@ class WDFacebookFeed {
|
|
| 2075 |
'scope' => 'pages_show_list,pages_read_engagement,pages_read_user_content',
|
| 2076 |
), "https://www.facebook.com/dialog/oauth");
|
| 2077 |
|
| 2078 |
-
$fb_url .= '&scope=pages_read_engagement,
|
| 2079 |
|
| 2080 |
return $fb_url;
|
| 2081 |
}
|
| 45 |
|
| 46 |
public static $client_side_check = array();
|
| 47 |
|
| 48 |
+
/* this is count of media in DB for specific feed */
|
| 49 |
+
public static $media_db_current_count = 0;
|
| 50 |
+
/* this is specify if data in DB already exceed to post limit option */
|
| 51 |
+
public static $media_db_limit_full = false;
|
| 52 |
+
|
| 53 |
public static function execute() {
|
| 54 |
if (function_exists('current_user_can')) {
|
| 55 |
if (!current_user_can('manage_options')) {
|
| 771 |
self::set_timeline_cache_data();
|
| 772 |
die;
|
| 773 |
}
|
| 774 |
+
global $wpdb;
|
| 775 |
+
self::$fb_limit = $wpdb->get_var($wpdb->prepare('SELECT `limit` FROM ' . $wpdb->prefix . 'wd_fb_info WHERE id="%d"', self::$fb_id));
|
| 776 |
|
| 777 |
self::$content = explode(',', self::get_content(self::$fb_id));
|
| 778 |
self::$content_type = self::get_content_type(self::$fb_id);
|
| 803 |
''
|
| 804 |
), self::$graph_url);
|
| 805 |
}
|
| 806 |
+
self::$media_db_current_count = self::get_db_data_count( self::$fb_id );
|
| 807 |
+
if ( self::$media_db_current_count >= self::$fb_limit ) {
|
| 808 |
+
self::$media_db_limit_full = true;
|
| 809 |
+
}
|
| 810 |
|
| 811 |
$data['data'] = self::complite_timeline($fb_graph_url, $iter);
|
| 812 |
self::$data = $data;
|
| 813 |
self::update_db();
|
| 814 |
|
| 815 |
+
if ( self::$timeline_max_call_count > intval($iter) && self::$next_page && !self::$media_db_limit_full ) {
|
| 816 |
self::$timeline_max_call_count--;
|
| 817 |
echo json_encode(array("status" => "success", "next_page" => self::$next_page, "iter" => $iter, "fb_id" => self::$fb_id));
|
| 818 |
} else {
|
| 833 |
self::$fb_id = WDW_FFWD_Library::get('fb_id');
|
| 834 |
self::$content = explode(',', self::get_content(self::$fb_id));
|
| 835 |
self::$content_type = self::get_content_type(self::$fb_id);
|
| 836 |
+
self::$fb_limit = $wpdb->get_var($wpdb->prepare('SELECT `limit` FROM ' . $wpdb->prefix . 'wd_fb_info WHERE id="%d"', self::$fb_id));
|
| 837 |
self::$timeline_max_call_count = WD_FB_TIMELINE_MAX_CALL_COUNT;
|
| 838 |
self::set_timeline_type();
|
| 839 |
self::$complite_timeline_data = array();
|
| 862 |
if( defined('FFWD_NEED_UPDATE_CACHE') && FFWD_NEED_UPDATE_CACHE ) {
|
| 863 |
self::$auto_update_feed = 1;
|
| 864 |
}
|
| 865 |
+
|
| 866 |
+
self::$media_db_current_count = self::get_db_data_count( self::$fb_id );
|
| 867 |
+
if ( self::$media_db_current_count >= self::$fb_limit ) {
|
| 868 |
+
self::$media_db_limit_full = true;
|
| 869 |
+
}
|
| 870 |
if ( self::$auto_update_feed == 1 ) {
|
| 871 |
$id = self::$fb_id;
|
| 872 |
$update_ids = array();
|
| 889 |
self::$data = $data;
|
| 890 |
self::insert_wd_fb_data($data['data']);
|
| 891 |
}
|
| 892 |
+
if ( self::$timeline_max_call_count > intval($iter) && self::$next_page && !self::$media_db_limit_full ) {
|
| 893 |
self::$timeline_max_call_count--;
|
| 894 |
echo json_encode(array("status" => "success", "next_page" => self::$next_page, "iter" => $iter, "fb_id" => self::$fb_id, "non_public_share_count" => self::$non_public_share_count));
|
| 895 |
} else {
|
| 1017 |
$paging = array_key_exists('paging', $data) ? $data['paging'] : array();
|
| 1018 |
self::$next_page = array_key_exists('next', $paging) ? $paging['next'] : 0;
|
| 1019 |
foreach ( $data['data'] as $key => $next ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1020 |
$type = '';
|
| 1021 |
$source = '';
|
| 1022 |
$main_url = '';
|
| 1212 |
'reactions' => $reactions,
|
| 1213 |
);
|
| 1214 |
|
| 1215 |
+
/* Second argument : Case when media count in db is equal to option posts limit */
|
| 1216 |
if ( !isset($ids[$object_id]) ) {
|
| 1217 |
+
if ( self::$media_db_limit_full ) {
|
| 1218 |
+
continue;
|
| 1219 |
+
}
|
| 1220 |
$wpdb->insert($wpdb->prefix . 'wd_fb_data', $feed_data, $format);
|
| 1221 |
+
/* increment number of medias to keep equal with DB count */
|
| 1222 |
+
self::$media_db_current_count++;
|
| 1223 |
+
if( self::$media_db_current_count >= self::$fb_limit ) {
|
| 1224 |
+
self::$media_db_limit_full = true;
|
| 1225 |
+
}
|
| 1226 |
} else {
|
| 1227 |
$wpdb->update($wpdb->prefix . 'wd_fb_data', $feed_data, array( 'id' => $ids[$object_id] ), $format);
|
| 1228 |
}
|
| 1304 |
* Check errors.
|
| 1305 |
*/
|
| 1306 |
public static function specific() {
|
| 1307 |
+
self::$timeline_max_call_count = WD_FB_TIMELINE_MAX_CALL_COUNT;
|
| 1308 |
+
self::set_timeline_type();
|
| 1309 |
+
self::$complite_timeline_data = array();
|
| 1310 |
+
self::set_access_token();
|
| 1311 |
+
|
| 1312 |
+
if ( self::$save ) {
|
| 1313 |
+
$save_db = self::save_db();
|
| 1314 |
+
}
|
| 1315 |
+
else {
|
| 1316 |
+
if ( self::$edit_feed ) {
|
| 1317 |
+
$save_db = self::edit_feed();
|
| 1318 |
+
}
|
| 1319 |
+
else {
|
| 1320 |
+
if ( self::$updateOnVersionChange ) {
|
| 1321 |
+
$save_db = self::update_version();
|
| 1322 |
+
}
|
| 1323 |
+
else {
|
| 1324 |
+
$save_db = self::$fb_id;
|
| 1325 |
+
self::$ajax_cache_action = 'update_cache_data';
|
| 1326 |
+
/* self::update_db();*/
|
| 1327 |
+
}
|
| 1328 |
+
}
|
| 1329 |
+
}
|
| 1330 |
+
if ( $save_db === 'false' ) {
|
| 1331 |
+
echo self::$wd_fb_error_massage;
|
| 1332 |
+
} else {
|
| 1333 |
+
self::$ajax_cache_action = 'set_cache_data';
|
| 1334 |
+
echo json_encode(array(
|
| 1335 |
+
"status" => "success",
|
| 1336 |
+
"feed_id" => $save_db,
|
| 1337 |
+
"token"=>self::$access_token,
|
| 1338 |
+
"user_id" => self::$id,
|
| 1339 |
+
"ajax_action" => self::$ajax_cache_action));
|
| 1340 |
+
}
|
| 1341 |
+
die;
|
| 1342 |
+
}
|
| 1343 |
+
|
| 1344 |
+
/**
|
| 1345 |
+
* Insert specific cache data
|
| 1346 |
+
*/
|
| 1347 |
+
public static function set_specific_cache_data() {
|
| 1348 |
+
self::$timeline_max_call_count = WD_FB_TIMELINE_MAX_CALL_COUNT;
|
| 1349 |
+
global $wpdb;
|
| 1350 |
+
self::$timeline_type = '';
|
| 1351 |
+
$other = '';
|
| 1352 |
+
$iter = WDW_FFWD_Library::get('iter', 0);
|
| 1353 |
+
self::$fb_id = WDW_FFWD_Library::get('fb_id');
|
| 1354 |
+
self::$id = WDW_FFWD_Library::get('user_id');
|
| 1355 |
+
self::$access_token = WDW_FFWD_Library::get('page_access_token');
|
| 1356 |
+
self::$fb_limit = $wpdb->get_var($wpdb->prepare('SELECT `limit` FROM ' . $wpdb->prefix . 'wd_fb_info WHERE id="%d"', self::$fb_id));
|
| 1357 |
+
self::$content = explode(',', self::get_content(self::$fb_id));
|
| 1358 |
+
self::$content_type = self::get_content_type(self::$fb_id);
|
| 1359 |
+
/* TODO sanitise graph_url */
|
| 1360 |
+
$fb_graph_url = isset($_POST['graph_url']) ? $_POST['graph_url']: '';
|
| 1361 |
+
if( $fb_graph_url == '' ) {
|
| 1362 |
+
if ( self::$content[0] == 'albums' ) {
|
| 1363 |
+
$fields = 'fields=id,name,from{picture,name,link},link,count,created_time,updated_time&';
|
| 1364 |
+
}
|
| 1365 |
+
else {
|
| 1366 |
+
if ( self::$content[0] == 'photos' ) {
|
| 1367 |
+
$fields = 'fields=source,name,link,images,from{picture,name,link},created_time,updated_time&';
|
| 1368 |
+
}
|
| 1369 |
+
else {
|
| 1370 |
+
if ( self::$content[0] == 'videos' ) {
|
| 1371 |
+
$fields = 'fields=id,title,description,picture,permalink_url,format,from{picture,name,link},created_time,updated_time&';
|
| 1372 |
+
}
|
| 1373 |
+
else {
|
| 1374 |
+
if ( self::$content[0] == 'events' ) {
|
| 1375 |
+
if ( self::$upcoming_events == 1 ) {
|
| 1376 |
+
$fields = 'fields=comments.limit(25).summary(true){parent.fields(id),created_time,from,like_count,message,comment_count},name,start_time,end_time,event_times,description,cover,owner{picture,name,link},place&since=' . strtotime(date('Y-m-d')) . '&';
|
| 1377 |
+
}
|
| 1378 |
+
else {
|
| 1379 |
+
$fields = 'fields=comments.limit(25).summary(true){parent.fields(id),created_time,from,like_count,message,comment_count},name,start_time,end_time,event_times,description,cover,owner{picture,name,link},place&';
|
| 1380 |
+
}
|
| 1381 |
+
}
|
| 1382 |
+
else {
|
| 1383 |
+
$fields = 'fields=source,name,story,created_time,updated_time,from{picture,name,link},link&';
|
| 1384 |
+
}
|
| 1385 |
+
}
|
| 1386 |
+
}
|
| 1387 |
+
}
|
| 1388 |
+
if ( self::$content[0] == 'photos' || self::$content[0] == 'videos' ) {
|
| 1389 |
+
// @todo 'type=uploaded' dnon't work https://developers.facebook.com/support/bugs/135549845263767/?join_id=f28633b0543591
|
| 1390 |
+
// $other = 'type=uploaded';
|
| 1391 |
+
}
|
| 1392 |
+
$edge = self::$content[0];
|
| 1393 |
+
// @todo API V10.0 Temporary solution for photos!
|
| 1394 |
+
if ( self::$content[0] == 'photos' ) {
|
| 1395 |
+
$edge = 'posts';
|
| 1396 |
+
$fields = 'fields=id,status_type,message,message_tags,shares,place,story,story_tags,privacy,attachments{media_type,media,url},from{picture,name,link},created_time,updated_time&';
|
| 1397 |
+
}
|
| 1398 |
+
$fb_graph_url = str_replace(array(
|
| 1399 |
+
'{FB_ID}',
|
| 1400 |
+
'{EDGE}',
|
| 1401 |
+
'{ACCESS_TOKEN}',
|
| 1402 |
+
'{FIELDS}',
|
| 1403 |
+
'{LIMIT}',
|
| 1404 |
+
'{OTHER}',
|
| 1405 |
+
), array(
|
| 1406 |
+
self::$id,
|
| 1407 |
+
$edge,
|
| 1408 |
+
'access_token=' . self::$access_token . '&',
|
| 1409 |
+
$fields,
|
| 1410 |
+
'locale=' . get_locale() . '&',
|
| 1411 |
+
$other,
|
| 1412 |
+
), self::$graph_url);
|
| 1413 |
+
}
|
| 1414 |
+
if( defined('FFWD_NEED_UPDATE_CACHE') && FFWD_NEED_UPDATE_CACHE ) {
|
| 1415 |
+
self::$auto_update_feed = 1;
|
| 1416 |
+
}
|
| 1417 |
+
|
| 1418 |
+
self::$media_db_current_count = self::get_db_data_count( self::$fb_id );
|
| 1419 |
+
if( self::$media_db_current_count >= self::$fb_limit ) {
|
| 1420 |
+
self::$media_db_limit_full = true;
|
| 1421 |
+
}
|
| 1422 |
+
|
| 1423 |
+
if ( self::$auto_update_feed == 1 ) {
|
| 1424 |
+
$id = self::$fb_id;
|
| 1425 |
+
$update_ids = array();
|
| 1426 |
+
$rows = $wpdb->get_results($wpdb->prepare('SELECT object_id,id FROM ' . $wpdb->prefix . 'wd_fb_data WHERE fb_id="%d" ORDER BY `created_time_number` ASC ', $id));
|
| 1427 |
+
foreach ( $rows as $row ) {
|
| 1428 |
+
$update_ids[$row->object_id] = $row->id;
|
| 1429 |
+
}
|
| 1430 |
+
$fb_graph_url_update = $fb_graph_url;
|
| 1431 |
+
$update_data = self::decap_do_curl($fb_graph_url_update);
|
| 1432 |
+
$paging = array_key_exists('paging', $update_data) ? $update_data['paging'] : array();
|
| 1433 |
+
self::$next_page = array_key_exists('next', $paging) ? $paging['next'] : 0;
|
| 1434 |
+
self::update_wd_fb_data($update_data, $update_ids);
|
| 1435 |
+
}
|
| 1436 |
+
else {
|
| 1437 |
+
if( self::check_cache_exists(self::$fb_id) ) {
|
| 1438 |
+
echo json_encode(array("status" => "success", "next_page" => '', "iter" => 0, "fb_id" => self::$fb_id));
|
| 1439 |
+
die;
|
| 1440 |
+
}
|
| 1441 |
+
$data = self::decap_do_curl($fb_graph_url);
|
| 1442 |
+
$paging = array_key_exists('paging', $data) ? $data['paging'] : array();
|
| 1443 |
+
self::$next_page = array_key_exists('next', $paging) ? $paging['next'] : 0;
|
| 1444 |
+
self::$data = $data;
|
| 1445 |
+
self::insert_wd_fb_data($data['data']);
|
| 1446 |
+
}
|
| 1447 |
+
|
| 1448 |
+
if ( self::$timeline_max_call_count > intval($iter) && self::$next_page && !self::$media_db_limit_full ) {
|
| 1449 |
+
self::$timeline_max_call_count--;
|
| 1450 |
+
echo json_encode(array("status" => "success", "next_page" => self::$next_page, "iter" => $iter, "fb_id" => self::$fb_id));
|
| 1451 |
+
} else {
|
| 1452 |
+
echo json_encode(array( "status" => "success", "next_page" => '', "iter" => $iter, "fb_id" => self::$fb_id ));
|
| 1453 |
+
}
|
| 1454 |
+
die;
|
| 1455 |
}
|
| 1456 |
|
| 1457 |
/**
|
| 1688 |
return $var;
|
| 1689 |
}
|
| 1690 |
|
| 1691 |
+
/**
|
| 1692 |
+
* Get count of medias in DB for current feed
|
| 1693 |
+
*
|
| 1694 |
+
* @param $id int feed id
|
| 1695 |
+
*
|
| 1696 |
+
* return int
|
| 1697 |
+
*/
|
| 1698 |
+
public static function get_db_data_count( $id ) {
|
| 1699 |
+
global $wpdb;
|
| 1700 |
+
$count = $wpdb->get_var($wpdb->prepare('SELECT count(id) from ' . $wpdb->prefix . 'wd_fb_data WHERE fb_id = %d', $id));
|
| 1701 |
+
return $count;
|
| 1702 |
+
}
|
| 1703 |
+
|
| 1704 |
/**
|
| 1705 |
* Insert data from facebook response to DataBase
|
| 1706 |
*
|
| 1730 |
}
|
| 1731 |
array_multisort($start_time, SORT_DESC, $data);
|
| 1732 |
}
|
|
|
|
| 1733 |
foreach ( $data as $key => $next ) {
|
| 1734 |
+
/* Case when media count in db is equal to option posts limit */
|
| 1735 |
+
if ( self::$media_db_limit_full ) {
|
| 1736 |
+
break;
|
| 1737 |
+
}
|
| 1738 |
$type = '';
|
| 1739 |
$source = '';
|
| 1740 |
$main_url = '';
|
| 1955 |
);
|
| 1956 |
if ($save_fb_data !== false) {
|
| 1957 |
$success = 'success';
|
| 1958 |
+
/* increment number of medias to keep equal with DB count */
|
| 1959 |
+
self::$media_db_current_count++;
|
| 1960 |
+
if ( self::$media_db_current_count >= self::$fb_limit ) {
|
| 1961 |
+
self::$media_db_limit_full = true;
|
| 1962 |
+
}
|
| 1963 |
}
|
| 1964 |
else {
|
| 1965 |
$success = 'error';
|
| 2249 |
'scope' => 'pages_show_list,pages_read_engagement,pages_read_user_content',
|
| 2250 |
), "https://www.facebook.com/dialog/oauth");
|
| 2251 |
|
| 2252 |
+
$fb_url .= '&scope=pages_show_list,pages_read_engagement,pages_read_user_content&state=' . base64_encode(json_encode($state));
|
| 2253 |
|
| 2254 |
return $fb_url;
|
| 2255 |
}
|
framework/WDW_FFWD_Library.php
CHANGED
|
@@ -921,25 +921,6 @@ class WDW_FFWD_Library {
|
|
| 921 |
return $str;
|
| 922 |
}
|
| 923 |
|
| 924 |
-
/**
|
| 925 |
-
* Get timezone List.
|
| 926 |
-
*
|
| 927 |
-
* @return array
|
| 928 |
-
*/
|
| 929 |
-
public static function getTimezoneList() {
|
| 930 |
-
$out = array();
|
| 931 |
-
$tza = timezone_abbreviations_list();
|
| 932 |
-
foreach ( $tza as $zone ) {
|
| 933 |
-
foreach ( $zone as $item ) {
|
| 934 |
-
$out[$item['timezone_id']] = 1;
|
| 935 |
-
}
|
| 936 |
-
}
|
| 937 |
-
unset($out['']);
|
| 938 |
-
ksort($out);
|
| 939 |
-
|
| 940 |
-
return array_keys($out);
|
| 941 |
-
}
|
| 942 |
-
|
| 943 |
/**
|
| 944 |
* Remove all data from wd_fb_data table
|
| 945 |
*
|
| 921 |
return $str;
|
| 922 |
}
|
| 923 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 924 |
/**
|
| 925 |
* Remove all data from wd_fb_data table
|
| 926 |
*
|
frontend/models/FFWDModelBlog_style.php
CHANGED
|
@@ -115,10 +115,7 @@ class FFWDModelBlog_style extends FFWDModelMain {
|
|
| 115 |
public function ffwd_time($object_row, $ffwd,$event_date) {
|
| 116 |
$event_date_format = $this->options->event_date_format;
|
| 117 |
$post_date_format = $this->options->post_date_format;
|
| 118 |
-
$date_timezone =
|
| 119 |
-
if (!in_array($date_timezone, DateTimeZone::listIdentifiers())) {
|
| 120 |
-
$date_timezone = "UTC";
|
| 121 |
-
}
|
| 122 |
$date_create = new DateTime($object_row->created_time);
|
| 123 |
$date_create->setTimezone(new DateTimeZone($date_timezone));
|
| 124 |
$date_update = new DateTime($object_row->updated_time);
|
|
@@ -129,8 +126,6 @@ class FFWDModelBlog_style extends FFWDModelMain {
|
|
| 129 |
<div class="ffwd_from_time_event_<?php echo $ffwd; ?>" style="">
|
| 130 |
<?php
|
| 131 |
echo $date_create->format($event_date_format) . '<br>';
|
| 132 |
-
//echo 'Start - ' . $date_create->format($event_date_format) . '<br>' .
|
| 133 |
-
//'End - ' . $date_update->format($event_date_format);
|
| 134 |
?>
|
| 135 |
</div>
|
| 136 |
<?php
|
| 115 |
public function ffwd_time($object_row, $ffwd,$event_date) {
|
| 116 |
$event_date_format = $this->options->event_date_format;
|
| 117 |
$post_date_format = $this->options->post_date_format;
|
| 118 |
+
$date_timezone = wp_timezone_string();
|
|
|
|
|
|
|
|
|
|
| 119 |
$date_create = new DateTime($object_row->created_time);
|
| 120 |
$date_create->setTimezone(new DateTimeZone($date_timezone));
|
| 121 |
$date_update = new DateTime($object_row->updated_time);
|
| 126 |
<div class="ffwd_from_time_event_<?php echo $ffwd; ?>" style="">
|
| 127 |
<?php
|
| 128 |
echo $date_create->format($event_date_format) . '<br>';
|
|
|
|
|
|
|
| 129 |
?>
|
| 130 |
</div>
|
| 131 |
<?php
|
js/ffwd.js
CHANGED
|
@@ -272,13 +272,18 @@ function spider_ajax_save(wd_fb_prefix) {
|
|
| 272 |
}
|
| 273 |
}
|
| 274 |
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
jQuery(".ffwd_notice").html('<div class="notice notice-error is-dismissible">\n' +
|
| 276 |
-
' <p>'+
|
| 277 |
' </div>');
|
| 278 |
-
|
|
|
|
| 279 |
}
|
| 280 |
-
jQuery('#opacity_div').hide();
|
| 281 |
-
jQuery('#loading_div').hide();
|
| 282 |
}
|
| 283 |
});
|
| 284 |
|
| 272 |
}
|
| 273 |
}
|
| 274 |
else {
|
| 275 |
+
var error_message = "";
|
| 276 |
+
if( typeof result['status'] !== 'undefined' && typeof result['msg'] !== 'undefined' ) {
|
| 277 |
+
error_message = result['status']+' : '+result['msg'];
|
| 278 |
+
} else {
|
| 279 |
+
error_message = "Something went wrong";
|
| 280 |
+
}
|
| 281 |
jQuery(".ffwd_notice").html('<div class="notice notice-error is-dismissible">\n' +
|
| 282 |
+
' <p>'+error_message+'.</p>\n' +
|
| 283 |
' </div>');
|
| 284 |
+
jQuery('#opacity_div').hide();
|
| 285 |
+
jQuery('#loading_div').hide();
|
| 286 |
}
|
|
|
|
|
|
|
| 287 |
}
|
| 288 |
});
|
| 289 |
|
js/ffwd_cache.js
CHANGED
|
@@ -209,5 +209,6 @@ function apply_save_ajax_message( result ) {
|
|
| 209 |
jQuery("#task").val("");
|
| 210 |
break;
|
| 211 |
}
|
| 212 |
-
|
|
|
|
| 213 |
}
|
| 209 |
jQuery("#task").val("");
|
| 210 |
break;
|
| 211 |
}
|
| 212 |
+
jQuery('#opacity_div').hide();
|
| 213 |
+
jQuery('#loading_div').hide();
|
| 214 |
}
|
js/ffwd_frontend.js
CHANGED
|
@@ -51,7 +51,7 @@ function ffwd_frontend_ajax(form_id, current_view, id, album_id, enter_or_back,
|
|
| 51 |
jQuery('#' + form_id).html(str);
|
| 52 |
}
|
| 53 |
}
|
| 54 |
-
).
|
| 55 |
jQuery("#ffwd_ajax_loading_" + current_view).css('display', 'none');
|
| 56 |
if (jQuery(".pagination-links_" + current_view).length) {
|
| 57 |
jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
|
|
@@ -486,9 +486,7 @@ function do_something_with_data_album(result, id, ffwd, type, graph_url, ffwd_al
|
|
| 486 |
}
|
| 487 |
|
| 488 |
}
|
| 489 |
-
).
|
| 490 |
-
|
| 491 |
-
|
| 492 |
}
|
| 493 |
content += '<br>';
|
| 494 |
content += '<div class="tablenav-pages_'+ffwd+'" >';
|
| 51 |
jQuery('#' + form_id).html(str);
|
| 52 |
}
|
| 53 |
}
|
| 54 |
+
).done(function (jqXHR, textStatus, errorThrown) {
|
| 55 |
jQuery("#ffwd_ajax_loading_" + current_view).css('display', 'none');
|
| 56 |
if (jQuery(".pagination-links_" + current_view).length) {
|
| 57 |
jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
|
| 486 |
}
|
| 487 |
|
| 488 |
}
|
| 489 |
+
).done(simulateAjaxEnd(ffwd));
|
|
|
|
|
|
|
| 490 |
}
|
| 491 |
content += '<br>';
|
| 492 |
content += '<div class="tablenav-pages_'+ffwd+'" >';
|
js/ffwd_gallery_box.js
CHANGED
|
@@ -39,7 +39,7 @@ function ffwd_createpopup( url, current_view, width, height, duration, descripti
|
|
| 39 |
.hide()
|
| 40 |
.appendTo("body");
|
| 41 |
ff_wd_spider_showpopup(description, lifetime, popup, duration);
|
| 42 |
-
}).
|
| 43 |
jQuery("#spider_popup_loading_" + current_view).css({ display: "none !important;" });
|
| 44 |
});
|
| 45 |
}
|
| 39 |
.hide()
|
| 40 |
.appendTo("body");
|
| 41 |
ff_wd_spider_showpopup(description, lifetime, popup, duration);
|
| 42 |
+
}).done(function ( jqXHR, textStatus, errorThrown ) {
|
| 43 |
jQuery("#spider_popup_loading_" + current_view).css({ display: "none !important;" });
|
| 44 |
});
|
| 45 |
}
|
js/tw-gb/block.js
CHANGED
|
@@ -120,12 +120,12 @@
|
|
| 120 |
var shortcodeList = JSON.parse( pluginData.data );
|
| 121 |
shortcodeList.inputs.forEach( function ( inputItem ) {
|
| 122 |
if ( inputItem.type === 'select' ) {
|
| 123 |
-
children.push( el( 'option', { value: '', dataId: 0 }, tw_obj_translate.empty_item ) );
|
| 124 |
if ( inputItem.options.length ) {
|
| 125 |
-
inputItem.options.forEach( function ( optionItem ) {
|
| 126 |
var shortcode = '[' + shortcodeList.shortcode_prefix + ' ' + inputItem.shortcode_attibute_name + '="' + optionItem.id + '"]';
|
| 127 |
children.push(
|
| 128 |
-
el( 'option', { value: shortcode, dataId: optionItem.id }, optionItem.name )
|
| 129 |
);
|
| 130 |
} )
|
| 131 |
}
|
| 120 |
var shortcodeList = JSON.parse( pluginData.data );
|
| 121 |
shortcodeList.inputs.forEach( function ( inputItem ) {
|
| 122 |
if ( inputItem.type === 'select' ) {
|
| 123 |
+
children.push( el( 'option', { value: '', key: 0, dataId: 0 }, tw_obj_translate.empty_item ) );
|
| 124 |
if ( inputItem.options.length ) {
|
| 125 |
+
inputItem.options.forEach( function ( optionItem, index ) {
|
| 126 |
var shortcode = '[' + shortcodeList.shortcode_prefix + ' ' + inputItem.shortcode_attibute_name + '="' + optionItem.id + '"]';
|
| 127 |
children.push(
|
| 128 |
+
el( 'option', { value: shortcode, key: parseInt(index+1), dataId: optionItem.id }, optionItem.name )
|
| 129 |
);
|
| 130 |
} )
|
| 131 |
}
|
readme.txt
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
-
===
|
| 2 |
Contributors: webdorado,10web,wdsupport
|
| 3 |
-
Tags: customizable facebook feed, facebook, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, facebook likebox
|
| 4 |
Requires at least: 3.4
|
| 5 |
Requires PHP: 5.2
|
| 6 |
-
Tested up to: 5.
|
| 7 |
-
Stable tag: 1.2.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
|
|
| 1 |
+
=== 10WebSocial ===
|
| 2 |
Contributors: webdorado,10web,wdsupport
|
|
|
|
| 3 |
Requires at least: 3.4
|
| 4 |
Requires PHP: 5.2
|
| 5 |
+
Tested up to: 5.0
|
| 6 |
+
Stable tag: 1.2.6
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
+
|
| 10 |
+
10WebSocial
|
