Version Description
- Improved: Simplified Facebook login. No need to enter app ID and get page tokens manually. This is a new Facebook app, so reauthentication is required.
- Fixed: Elementor compatibility
Download this release
Release Info
Developer | webdorado |
Plugin | WD Facebook Feed – Custom Facebook Feed Plugin |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- admin/controllers/FFWDControllerOptions_ffwd.php +6 -0
- admin/models/FFWDModelInfo_ffwd.php +5 -0
- admin/models/FFWDModelOptions_ffwd.php +1 -0
- admin/models/FFWDModelUninstall_ffwd.php +1 -0
- admin/views/FFWDViewInfo_ffwd.php +36 -21
- admin/views/FFWDViewOptions_ffwd.php +24 -24
- admin/views/FFWDViewWidget.php +6 -1
- css/ffwd_tables.css +89 -10
- facebook-feed-wd.php +64 -68
- framework/WDFacebookFeed.php +79 -7
- frontend/views/FFWDViewBlog_style.php +19 -15
- frontend/views/FFWDViewPopupBox.php +6 -4
- frontend/views/FFWDViewThumbnails.php +1 -0
- js/ffwd.js +19 -29
- js/ffwd_frontend.js +1 -1
- readme.txt +5 -1
admin/controllers/FFWDControllerOptions_ffwd.php
CHANGED
@@ -26,6 +26,12 @@ class FFWDControllerOptions_ffwd {
|
|
26 |
die('Sorry, your nonce did not verify.');
|
27 |
}
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
if (method_exists($this, $task)) {
|
30 |
$this->$task($id);
|
31 |
}
|
26 |
die('Sorry, your nonce did not verify.');
|
27 |
}
|
28 |
}
|
29 |
+
|
30 |
+
if(!empty($_GET['ffwd_code'])){
|
31 |
+
WDFacebookFeed::save_pages($_GET['ffwd_code']);
|
32 |
+
die('<script>window.location.href="admin.php?page=options_ffwd"</script>');
|
33 |
+
}
|
34 |
+
|
35 |
if (method_exists($this, $task)) {
|
36 |
$this->$task($id);
|
37 |
}
|
admin/models/FFWDModelInfo_ffwd.php
CHANGED
@@ -138,8 +138,11 @@ class FFWDModelInfo_ffwd {
|
|
138 |
"l, F jS, Y, g:i a" => "Tuesday, March 10th, 2015, 5:16 pm",
|
139 |
"Y/m/d \a\\t g:i a" => "2015/03/10 at 12:50 AM",
|
140 |
"Y/m/d" => " 2015/03/10",
|
|
|
141 |
"Y.m.d" => " 2015.03.10",
|
142 |
);
|
|
|
|
|
143 |
////////////////////////////////////////////////////////////////////////////////////////
|
144 |
// Constructor & Destructor //
|
145 |
////////////////////////////////////////////////////////////////////////////////////////
|
@@ -154,6 +157,8 @@ class FFWDModelInfo_ffwd {
|
|
154 |
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
155 |
|
156 |
}
|
|
|
|
|
157 |
}
|
158 |
////////////////////////////////////////////////////////////////////////////////////////
|
159 |
// Public Methods //
|
138 |
"l, F jS, Y, g:i a" => "Tuesday, March 10th, 2015, 5:16 pm",
|
139 |
"Y/m/d \a\\t g:i a" => "2015/03/10 at 12:50 AM",
|
140 |
"Y/m/d" => " 2015/03/10",
|
141 |
+
"d/m/Y" => " 10/03/2015",
|
142 |
"Y.m.d" => " 2015.03.10",
|
143 |
);
|
144 |
+
|
145 |
+
public $pages_list = array();
|
146 |
////////////////////////////////////////////////////////////////////////////////////////
|
147 |
// Constructor & Destructor //
|
148 |
////////////////////////////////////////////////////////////////////////////////////////
|
157 |
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
158 |
|
159 |
}
|
160 |
+
|
161 |
+
$this->pages_list = get_option('ffwd_pages_list', array());
|
162 |
}
|
163 |
////////////////////////////////////////////////////////////////////////////////////////
|
164 |
// Public Methods //
|
admin/models/FFWDModelOptions_ffwd.php
CHANGED
@@ -136,6 +136,7 @@ class FFWDModelOptions_ffwd {
|
|
136 |
"l, F jS, Y, g:i a" => "Tuesday, March 10th, 2015, 5:16 pm",
|
137 |
"Y/m/d \a\\t g:i a" => "2015/03/10 at 12:50 AM",
|
138 |
"Y/m/d" => " 2015/03/10",
|
|
|
139 |
"Y.m.d" => " 2015.03.10",
|
140 |
);
|
141 |
////////////////////////////////////////////////////////////////////////////////////////
|
136 |
"l, F jS, Y, g:i a" => "Tuesday, March 10th, 2015, 5:16 pm",
|
137 |
"Y/m/d \a\\t g:i a" => "2015/03/10 at 12:50 AM",
|
138 |
"Y/m/d" => " 2015/03/10",
|
139 |
+
"d/m/Y" => " 10/03/2015",
|
140 |
"Y.m.d" => " 2015.03.10",
|
141 |
);
|
142 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/models/FFWDModelUninstall_ffwd.php
CHANGED
@@ -33,6 +33,7 @@ class FFWDModelUninstall_ffwd
|
|
33 |
//delete_option("ffwd_subscribe_done");
|
34 |
delete_option('wds_bk_notice_status');
|
35 |
delete_option('ffwd_old_version');
|
|
|
36 |
add_option('ffwd_uninstall', '1');
|
37 |
|
38 |
}
|
33 |
//delete_option("ffwd_subscribe_done");
|
34 |
delete_option('wds_bk_notice_status');
|
35 |
delete_option('ffwd_old_version');
|
36 |
+
delete_option('ffwd_pages_list');
|
37 |
add_option('ffwd_uninstall', '1');
|
38 |
|
39 |
}
|
admin/views/FFWDViewInfo_ffwd.php
CHANGED
@@ -305,9 +305,6 @@ class FFWDViewInfo_ffwd
|
|
305 |
$content_url = $row->content_url;
|
306 |
$disabled = ($id != 0) ? 'disabled' : '';
|
307 |
|
308 |
-
//var_dump($required_secret);
|
309 |
-
$required_secret = ($fb_glob_optons->app_id == "" || $fb_glob_optons->app_secret == "") ? "1" : "0";
|
310 |
-
|
311 |
$effects = array(
|
312 |
'none' => 'None',
|
313 |
'fade' => 'Fade',
|
@@ -633,11 +630,11 @@ class FFWDViewInfo_ffwd
|
|
633 |
|
634 |
<div class="ffwd_butts_c" style="float:right;">
|
635 |
<input class=" ffwd-button-primary ffwd-button-save" type="button"
|
636 |
-
onclick="if
|
637 |
spider_set_input_value('task', 'save');
|
638 |
spider_ajax_save('<?php echo WD_FB_PREFIX; ?>');" value="Save"/>
|
639 |
<input class=" ffwd-button-primary ffwd-button-apply" type="button"
|
640 |
-
onclick="if
|
641 |
spider_set_input_value('task', 'apply');
|
642 |
spider_ajax_save('<?php echo WD_FB_PREFIX; ?>');" value="Apply"/>
|
643 |
<input class=" ffwd-button-secondary ffwd-button-cancel" type="submit" onclick="spider_set_input_value('page_number', '1');
|
@@ -684,15 +681,7 @@ class FFWDViewInfo_ffwd
|
|
684 |
<br>
|
685 |
</td>
|
686 |
</tr>
|
687 |
-
|
688 |
-
<td class="ffwd_set_l">
|
689 |
-
<label for="page_access_token">Page access token: <span style="color:#FF0000;">*</span></label>
|
690 |
-
</td>
|
691 |
-
<td>
|
692 |
-
<input type="text" id="page_access_token" name="page_access_token" value="<?php echo $row->page_access_token; ?>" size="39"/>
|
693 |
-
<p class="description">Use this <a target="_blank" href="https://web-dorado.com/wordpress-facebook-feed/options.html">tutorial</a> to get page access token.</p>
|
694 |
-
</td>
|
695 |
-
</tr>
|
696 |
</tbody>
|
697 |
<tbody id="ffwd_group_warning"
|
698 |
style="display: <?php echo $type == 'group' ? 'block' : 'none' ?>;">
|
@@ -736,13 +725,39 @@ class FFWDViewInfo_ffwd
|
|
736 |
<tbody id="<?php echo WD_FB_PREFIX; ?>_type_page"
|
737 |
style="display:<?php echo($type == 'page' ? 'table-row-group' : 'none'); ?>;">
|
738 |
<tr>
|
739 |
-
<td class="ffwd_set_l"><label for="
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
</tr>
|
747 |
<tr style="display:none;">
|
748 |
<td class="ffwd_set_l"><label for="<?php echo WD_FB_PREFIX; ?>_page_exist_access_tok">Use
|
305 |
$content_url = $row->content_url;
|
306 |
$disabled = ($id != 0) ? 'disabled' : '';
|
307 |
|
|
|
|
|
|
|
308 |
$effects = array(
|
309 |
'none' => 'None',
|
310 |
'fade' => 'Fade',
|
630 |
|
631 |
<div class="ffwd_butts_c" style="float:right;">
|
632 |
<input class=" ffwd-button-primary ffwd-button-save" type="button"
|
633 |
+
onclick="if (spider_check_required('name', 'Name') || spider_check_required('fb_page_id', 'Fb pages'))return false;
|
634 |
spider_set_input_value('task', 'save');
|
635 |
spider_ajax_save('<?php echo WD_FB_PREFIX; ?>');" value="Save"/>
|
636 |
<input class=" ffwd-button-primary ffwd-button-apply" type="button"
|
637 |
+
onclick="if (spider_check_required('name', 'Name') || spider_check_required('fb_page_id', 'Fb pages')) return false;
|
638 |
spider_set_input_value('task', 'apply');
|
639 |
spider_ajax_save('<?php echo WD_FB_PREFIX; ?>');" value="Apply"/>
|
640 |
<input class=" ffwd-button-secondary ffwd-button-cancel" type="submit" onclick="spider_set_input_value('page_number', '1');
|
681 |
<br>
|
682 |
</td>
|
683 |
</tr>
|
684 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
</tbody>
|
686 |
<tbody id="ffwd_group_warning"
|
687 |
style="display: <?php echo $type == 'group' ? 'block' : 'none' ?>;">
|
725 |
<tbody id="<?php echo WD_FB_PREFIX; ?>_type_page"
|
726 |
style="display:<?php echo($type == 'page' ? 'table-row-group' : 'none'); ?>;">
|
727 |
<tr>
|
728 |
+
<td class="ffwd_set_l"><label for="fb_page_id">FB pages: <span
|
729 |
+
style="color:#FF0000;">*</span>
|
730 |
+
</label></td>
|
731 |
+
<td>
|
732 |
+
<select name="fb_page_id" id="fb_page_id">
|
733 |
+
<option value="">Choose page</option>
|
734 |
+
<?php
|
735 |
+
foreach($this->model->pages_list as $page) {
|
736 |
+
$selected = (isset($row->fb_page_id) && $page->id == $row->fb_page_id) ? "selected" : "";
|
737 |
+
echo "<option value='" . $page->id . "' " . $selected . ">" . $page->name . "</option>";
|
738 |
+
}
|
739 |
+
|
740 |
+
?>
|
741 |
+
</select>
|
742 |
+
<img id="ffwd_page_img" src=""/>
|
743 |
+
</td>
|
744 |
+
</tr>
|
745 |
+
<tr>
|
746 |
+
<td></td>
|
747 |
+
<td>
|
748 |
+
<?php
|
749 |
+
$pages = get_option('ffwd_pages_list');
|
750 |
+
if(empty($pages)) {
|
751 |
+
?>
|
752 |
+
<div class="ffwd_page_list_notice">
|
753 |
+
<p style="color: red">
|
754 |
+
Facebook Feed plugin has not got the list of your pages yet. Please
|
755 |
+
<a href="admin.php?page=options_ffwd">get access token</a> first.
|
756 |
+
</p>
|
757 |
+
</div>
|
758 |
+
<?php } ?>
|
759 |
+
</td>
|
760 |
+
|
761 |
</tr>
|
762 |
<tr style="display:none;">
|
763 |
<td class="ffwd_set_l"><label for="<?php echo WD_FB_PREFIX; ?>_page_exist_access_tok">Use
|
admin/views/FFWDViewOptions_ffwd.php
CHANGED
@@ -83,41 +83,41 @@ class FFWDViewOptions_ffwd
|
|
83 |
return false;
|
84 |
}" value="Reset all options"/>
|
85 |
<input class="ffwd-button-primary ffwd-button-save" type="submit"
|
86 |
-
onclick="
|
87 |
value="Save"/>
|
88 |
|
89 |
</div>
|
90 |
</div>
|
91 |
<div style=" width: 100%;" id="display_panel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
<!--User options-->
|
94 |
<div class="spider_div_options" id="div_content_1" style="">
|
95 |
<table style="width: 90%;">
|
96 |
<tbody>
|
97 |
-
<tr>
|
98 |
-
<td class="spider_label_options">
|
99 |
-
<label for="<?php echo WD_FB_PREFIX; ?>_app_id">Facebook app Id: <span style="color:#FF0000;">*</span> </label>
|
100 |
-
</td>
|
101 |
-
<td>
|
102 |
-
<input type="text" name="<?php echo WD_FB_PREFIX; ?>_app_id"
|
103 |
-
id="<?php echo WD_FB_PREFIX; ?>_app_id" size="30"
|
104 |
-
value="<?php echo isset($row->app_id) ? $row->app_id : ''; ?>" class=""
|
105 |
-
onchange="if(wd_fb_log_in) alert('Before change app id and secret please logout from curent app.')"/>
|
106 |
|
107 |
-
</td>
|
108 |
-
</tr>
|
109 |
-
<tr>
|
110 |
-
<td class="spider_label_options">
|
111 |
-
<label for="<?php echo WD_FB_PREFIX; ?>_app_secret">Facebook app Secret: <span style="color:#FF0000;">*</span> </label>
|
112 |
-
</td>
|
113 |
-
<td>
|
114 |
-
<input type="text" name="<?php echo WD_FB_PREFIX; ?>_app_secret"
|
115 |
-
id="<?php echo WD_FB_PREFIX; ?>_app_secret" size="40"
|
116 |
-
value="<?php echo isset($row->app_secret) ? $row->app_secret : ''; ?>" class=""
|
117 |
-
onchange="if(wd_fb_log_in) alert('Before change app id and secret please logout from curent app.'); "/>
|
118 |
-
<div class="spider_description">To get data from Facebook, you need app ID and app Secret. Create your app and get app ID and secret using this <a target="_blank" href="https://web-dorado.com/wordpress-facebook-feed/options.html">tutorial</a>.</div>
|
119 |
-
</td>
|
120 |
-
</tr>
|
121 |
<!--<tr>
|
122 |
<td class="spider_label_options">
|
123 |
<label for="facebook_log_in">Facebook login / logout: </label>
|
83 |
return false;
|
84 |
}" value="Reset all options"/>
|
85 |
<input class="ffwd-button-primary ffwd-button-save" type="submit"
|
86 |
+
onclick="check_app('<?php echo WD_FB_PREFIX; ?>','save'); spider_set_input_value('task', 'save')"
|
87 |
value="Save"/>
|
88 |
|
89 |
</div>
|
90 |
</div>
|
91 |
<div style=" width: 100%;" id="display_panel">
|
92 |
+
<?php
|
93 |
+
$pages = get_option('ffwd_pages_list');
|
94 |
+
?>
|
95 |
+
<a id="ffwd_login_button" class="ffwd_login_button" href="#">
|
96 |
+
<?php
|
97 |
+
echo (empty($pages)) ? "Log in and get my Access Token" : "Reauthenticate"
|
98 |
+
?>
|
99 |
+
</a>
|
100 |
+
<div id="ffwd_login_popup" style="display: none;">
|
101 |
+
<div class="ffwd_login_popup_content">
|
102 |
+
<p>Log into your Facebook account using the button below and approve the plugin to connect your
|
103 |
+
account.</p>
|
104 |
+
<p>
|
105 |
+
<span id="ffwd_login_popup_cancle_btn">Cancel</span>
|
106 |
+
<a id="ffwd_login_popup_continue_btn" href="<?php echo WDFacebookFeed::get_auth_url(); ?>">Continue</a>
|
107 |
+
</p>
|
108 |
+
|
109 |
+
<p id="ffwd_login_popup_notice"><b>Please note:</b> this does not give us permission to manage
|
110 |
+
your Facebook pages, it simply allows the plugin to see a list of the pages you manage and
|
111 |
+
retrieve an Access Token.</p>
|
112 |
+
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
|
116 |
<!--User options-->
|
117 |
<div class="spider_div_options" id="div_content_1" style="">
|
118 |
<table style="width: 90%;">
|
119 |
<tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
<!--<tr>
|
122 |
<td class="spider_label_options">
|
123 |
<label for="facebook_log_in">Facebook login / logout: </label>
|
admin/views/FFWDViewWidget.php
CHANGED
@@ -35,8 +35,13 @@ class FFWDViewWidget
|
|
35 |
$id = (isset($instance['id']) ? $instance['id'] : 0);
|
36 |
$ffwd_info = $this->model->get_ffwd_feed($id);
|
37 |
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
|
|
40 |
$width = (isset($instance['width']) ? $instance['width'] : 100);
|
41 |
$height = (isset($instance['height']) ? $instance['height'] : 100);
|
42 |
$theme_id = $ffwd_info->theme;
|
35 |
$id = (isset($instance['id']) ? $instance['id'] : 0);
|
36 |
$ffwd_info = $this->model->get_ffwd_feed($id);
|
37 |
|
38 |
+
if(!isset($ffwd_info)) {
|
39 |
+
echo "Please select facebook feed.";
|
40 |
+
return;
|
41 |
+
}
|
42 |
|
43 |
+
|
44 |
+
$count = (isset($instance['count']) ? $instance['count'] : 4);
|
45 |
$width = (isset($instance['width']) ? $instance['width'] : 100);
|
46 |
$height = (isset($instance['height']) ? $instance['height'] : 100);
|
47 |
$theme_id = $ffwd_info->theme;
|
css/ffwd_tables.css
CHANGED
@@ -66,15 +66,6 @@
|
|
66 |
font-family: sans-serif;
|
67 |
}
|
68 |
|
69 |
-
#ffwd_keys_form *{
|
70 |
-
font-size: inherit;
|
71 |
-
}
|
72 |
-
|
73 |
-
#ffwd_keys_form input{
|
74 |
-
border-color: #ddd;
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
.input_th {
|
79 |
margin-left: 0px !important;
|
80 |
width: 160px !important;
|
@@ -1135,4 +1126,92 @@ div.ffwd_error {
|
|
1135 |
font-size: 19px;
|
1136 |
margin: 4px 0px 0px 12px;
|
1137 |
display: inline-block;
|
1138 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
font-family: sans-serif;
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
.input_th {
|
70 |
margin-left: 0px !important;
|
71 |
width: 160px !important;
|
1126 |
font-size: 19px;
|
1127 |
margin: 4px 0px 0px 12px;
|
1128 |
display: inline-block;
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
#ffwd_login_button{
|
1132 |
+
background-color: #4267b2;
|
1133 |
+
color: #ffffff !important;
|
1134 |
+
display: inline-block;
|
1135 |
+
text-decoration: none;
|
1136 |
+
padding: 7px 12px 7px 12px;
|
1137 |
+
font-size: 14px;
|
1138 |
+
margin-bottom: 10px;
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
#ffwd_login_button i{
|
1142 |
+
font-family: dashicons;
|
1143 |
+
font-size: 20px;
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
/*#ffwd_info_form .ffwd_page_list_notice{*/
|
1147 |
+
/*margin-top: 15px !important;*/
|
1148 |
+
/*margin-bottom: 15px !important;*/
|
1149 |
+
/*}*/
|
1150 |
+
|
1151 |
+
#ffwd_info_form .ffwd_page_list_notice p,
|
1152 |
+
#ffwd_info_form .ffwd_page_list_notice a{
|
1153 |
+
font-size: 14px;
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
#ffwd_login_popup{
|
1157 |
+
position: fixed;
|
1158 |
+
z-index: 999;
|
1159 |
+
width: 100%;
|
1160 |
+
top: 0;
|
1161 |
+
right: 0;
|
1162 |
+
bottom: 0;
|
1163 |
+
left: 0;
|
1164 |
+
background: rgba(0,0,0,0.3);
|
1165 |
+
}
|
1166 |
+
|
1167 |
+
.ffwd_login_popup_content{
|
1168 |
+
position: absolute;
|
1169 |
+
top: 180px;
|
1170 |
+
left: 50%;
|
1171 |
+
width: 380px;
|
1172 |
+
margin: 0 0 0 -195px;
|
1173 |
+
padding: 20px 40px;
|
1174 |
+
background: #fff;
|
1175 |
+
text-align: center;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
.ffwd_login_popup_content p{
|
1179 |
+
font-size: 14px;
|
1180 |
+
line-height: 1.6;
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
#ffwd_login_popup_cancle_btn,
|
1184 |
+
#ffwd_login_popup_continue_btn {
|
1185 |
+
display: inline-block;
|
1186 |
+
padding: 0 21px 0 20px;
|
1187 |
+
height: 45px;
|
1188 |
+
line-height: 44px;
|
1189 |
+
text-decoration: none;
|
1190 |
+
font-size: 14px;
|
1191 |
+
margin-right: 5px;
|
1192 |
+
clear: both;
|
1193 |
+
cursor: pointer;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
#ffwd_login_popup_cancle_btn{
|
1197 |
+
background: #ddd;
|
1198 |
+
color: #555;
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
#ffwd_login_popup_continue_btn {
|
1202 |
+
background: #4267b2;
|
1203 |
+
color: #e9eef3;
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
#ffwd_login_popup_notice{
|
1207 |
+
font-size: 11px;
|
1208 |
+
margin-top: 25px;
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
#ffwd_page_img{
|
1212 |
+
width: 29px;
|
1213 |
+
height: 29px;
|
1214 |
+
display: inline-block;
|
1215 |
+
position: absolute;
|
1216 |
+
margin-left: 4px;
|
1217 |
+
}
|
facebook-feed-wd.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: WD Facebook Feed
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
|
6 |
* Description:WD Facebook Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
7 |
-
* Version: 1.1.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -17,11 +17,48 @@ define( 'WD_FFWD_URL', plugins_url( plugin_basename( dirname( __FILE__ ) ) ) );
|
|
17 |
define( 'WD_FFWD_PRO', true );
|
18 |
define( 'WD_FB_PREFIX', 'ffwd' );
|
19 |
if(! defined( 'FFWD_VERSION' ) ){
|
20 |
-
define ('FFWD_VERSION',"1.1.
|
21 |
}
|
22 |
|
23 |
|
|
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
function ffwd_use_home_url() {
|
26 |
$home_url = str_replace( "http://", "", home_url() );
|
27 |
$home_url = str_replace( "https://", "", $home_url );
|
@@ -103,71 +140,9 @@ function ffwd_menu_panel() {
|
|
103 |
add_action( 'admin_print_scripts-' . $uninstall_page, 'ffwd_admin_scripts' );
|
104 |
}
|
105 |
|
106 |
-
add_action( 'admin_menu', 'ffwd_menu_panel' );
|
107 |
-
|
108 |
-
add_action('admin_notices', 'ffwd_keys_form');
|
109 |
-
function ffwd_keys_form(){
|
110 |
|
111 |
-
|
112 |
|
113 |
-
if($screen->parent_base !== "info_ffwd" || $screen->id == "facebook-feed-wd_page_overview_ffwd"){
|
114 |
-
return;
|
115 |
-
}
|
116 |
-
|
117 |
-
global $wpdb;
|
118 |
-
$ffwd_uninstall = get_option("ffwd_uninstall");
|
119 |
-
if($ffwd_uninstall =="1"){
|
120 |
-
return;
|
121 |
-
}
|
122 |
-
|
123 |
-
$app_id = $wpdb->get_row($wpdb->prepare('SELECT app_id,app_secret FROM ' . $wpdb->prefix . 'wd_fb_option WHERE id="%d"', 1));
|
124 |
-
if(!(empty($app_id->app_id) || empty($app_id->app_secret))){
|
125 |
-
return;
|
126 |
-
}
|
127 |
-
|
128 |
-
?>
|
129 |
-
|
130 |
-
<div class="error" style="width:99%" id="ffwd_keys_form">
|
131 |
-
<p style="font-size:18px;"><strong>Important: Facebook app ID and app secret are required for Facebook Feed WD
|
132 |
-
to work.</strong></p>
|
133 |
-
<p style="font-size:16px;"><span>Add your own app ID and secret. Use this <a target="_blank" href="https://web-dorado.com/wordpress-facebook-feed/options.html">tutorial</a> to get them.</span></p>
|
134 |
-
<div>
|
135 |
-
<label style="display: inline-block;width: 135px;" for="ffwd_keys_form_id">Facebook app Id:<span style="color:#FF0000;"> *</span></label>
|
136 |
-
<input size="40" id="ffwd_keys_form_id" type="text"/>
|
137 |
-
</div>
|
138 |
-
<div>
|
139 |
-
<label style="display: inline-block;width: 135px;" for="ffwd_keys_form_secret">Facebook app Secret:<span style="color:#FF0000;"> *</span></label>
|
140 |
-
<input size="40" id="ffwd_keys_form_secret" type="text"/>
|
141 |
-
</div>
|
142 |
-
<div style="padding-bottom: 10px;padding-top: 5px;">
|
143 |
-
<button id="ffwd_keys_form_button" style="padding: 6px 13px;" class="ffwd-button-primary">Save</button>
|
144 |
-
<?php wp_nonce_field('ffwd_keys_form_nonce', 'ffwd_keys_form_nonce'); ?>
|
145 |
-
</div>
|
146 |
-
</div>
|
147 |
-
|
148 |
-
<?php
|
149 |
-
}
|
150 |
-
|
151 |
-
add_action('wp_ajax_ffwd_save_fb_keys', 'ffwd_save_fb_keys');
|
152 |
-
function ffwd_save_fb_keys(){
|
153 |
-
|
154 |
-
$app_id = sanitize_text_field($_POST['app_id']);
|
155 |
-
$app_secret = sanitize_text_field($_POST['app_secret']);
|
156 |
-
$nonce = sanitize_text_field($_POST['nonce']);
|
157 |
-
|
158 |
-
if(wp_verify_nonce($nonce, 'ffwd_keys_form_nonce') === false) {
|
159 |
-
die('0');
|
160 |
-
}
|
161 |
-
|
162 |
-
include_once 'admin/controllers/FFWDControllerOptions_ffwd.php';
|
163 |
-
$options = new FFWDControllerOptions_ffwd();
|
164 |
-
if($options->save_app_keys($app_id, $app_secret)){
|
165 |
-
die('1');
|
166 |
-
}else{
|
167 |
-
die('0');
|
168 |
-
}
|
169 |
-
|
170 |
-
}
|
171 |
|
172 |
add_action( 'init', 'ffwd_silently_update' );
|
173 |
|
@@ -363,7 +338,9 @@ function ffwd_menu() {
|
|
363 |
}
|
364 |
}
|
365 |
$ffwd_limit_notice = get_option( 'ffwd_limit_notice' );
|
366 |
-
|
|
|
|
|
367 |
require_once( WD_FFWD_DIR . '/admin/controllers/FFWDController' . ( ( $page == 'FFWDShortcode' ) ? $page : ucfirst( strtolower( $page ) ) ) . '.php' );
|
368 |
$controller_class = 'FFWDController' . ucfirst( strtolower( $page ) );
|
369 |
$controller = new $controller_class();
|
@@ -645,6 +622,7 @@ function ffwd_activate() {
|
|
645 |
`image_onclick_action` varchar(32) NOT NULL,
|
646 |
`event_order` tinyint(4) NOT NULL,
|
647 |
`upcoming_events` tinyint(4) NOT NULL,
|
|
|
648 |
PRIMARY KEY (`id`)
|
649 |
) DEFAULT CHARSET=utf8;";
|
650 |
|
@@ -652,7 +630,25 @@ function ffwd_activate() {
|
|
652 |
$wpdb->query( $wd_fb_info );
|
653 |
|
654 |
$old_version = ffwd_get_version();
|
655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
if($FFWD_version_compare){
|
657 |
$wd_fb_info_collation = "ALTER TABLE `" . $wpdb->prefix . "wd_fb_info`
|
658 |
ADD `page_access_token` text NOT NULL AFTER `name`";
|
@@ -752,7 +748,7 @@ function ffwd_activate() {
|
|
752 |
$wpdb->insert( $wpdb->prefix . 'wd_fb_theme', array(
|
753 |
'name' => 'Theme 1',
|
754 |
'default_theme' => 1,
|
755 |
-
'params' => '{"thumb_margin":"10","thumb_padding":"2","thumb_border_radius":"
|
756 |
) );
|
757 |
|
758 |
|
4 |
* Plugin Name: WD Facebook Feed
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
|
6 |
* Description:WD Facebook Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
7 |
+
* Version: 1.1.1
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
17 |
define( 'WD_FFWD_PRO', true );
|
18 |
define( 'WD_FB_PREFIX', 'ffwd' );
|
19 |
if(! defined( 'FFWD_VERSION' ) ){
|
20 |
+
define ('FFWD_VERSION',"1.1.1");
|
21 |
}
|
22 |
|
23 |
|
24 |
+
add_action('admin_notices', 'ffwd_login_notice');
|
25 |
|
26 |
+
function ffwd_login_notice(){
|
27 |
+
if (!isset($_GET['page']) || strpos(esc_html($_GET['page']), '_ffwd') === false || $_GET['page']==="overview_ffwd") {
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
require_once 'framework/WDFacebookFeed.php';
|
31 |
+
$pages = get_option('ffwd_pages_list');
|
32 |
+
$ffwd_pages_list_success = get_option('ffwd_pages_list_success');
|
33 |
+
if($_GET['page']!="options_ffwd" && empty($pages)){
|
34 |
+
echo '<div class="notice notice-error is-dismissible" style="padding: 15px">
|
35 |
+
<span><b>Get access tokens to display Facebook feeds.</b></span>
|
36 |
+
<a style="margin: 0 0 0 15px" id="ffwd_login_button" class="ffwd_login_button" href="#">Log in and get my Access Token</a>
|
37 |
+
</div>
|
38 |
+
<div id="ffwd_login_popup" style="display: none;">
|
39 |
+
<div class="ffwd_login_popup_content">
|
40 |
+
<p>Log into your Facebook account using the button below and approve the plugin to connect your account.</p>
|
41 |
+
<p>
|
42 |
+
<span id="ffwd_login_popup_cancle_btn">Cancel</span>
|
43 |
+
<a id="ffwd_login_popup_continue_btn" href="'.WDFacebookFeed::get_auth_url().'">Continue</a>
|
44 |
+
</p>
|
45 |
+
|
46 |
+
<p id="ffwd_login_popup_notice"><b>Please note:</b> this does not give us permission to manage your Facebook pages, it simply allows the plugin to see a list of the pages you manage and retrieve an Access Token.</p>
|
47 |
+
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
';
|
51 |
+
}elseif ($ffwd_pages_list_success==="1"){
|
52 |
+
echo '<div class="notice notice-success is-dismissible" style="padding: 15px;">
|
53 |
+
<span><b>Success! We have got tokens for your Facebook pages.</b></span>
|
54 |
+
</div>';
|
55 |
+
delete_option("ffwd_pages_list_success");
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
}
|
62 |
function ffwd_use_home_url() {
|
63 |
$home_url = str_replace( "http://", "", home_url() );
|
64 |
$home_url = str_replace( "https://", "", $home_url );
|
140 |
add_action( 'admin_print_scripts-' . $uninstall_page, 'ffwd_admin_scripts' );
|
141 |
}
|
142 |
|
|
|
|
|
|
|
|
|
143 |
|
144 |
+
add_action( 'admin_menu', 'ffwd_menu_panel', 9);
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
add_action( 'init', 'ffwd_silently_update' );
|
148 |
|
338 |
}
|
339 |
}
|
340 |
$ffwd_limit_notice = get_option( 'ffwd_limit_notice' );
|
341 |
+
|
342 |
+
require_once 'framework/WDFacebookFeed.php';
|
343 |
+
|
344 |
require_once( WD_FFWD_DIR . '/admin/controllers/FFWDController' . ( ( $page == 'FFWDShortcode' ) ? $page : ucfirst( strtolower( $page ) ) ) . '.php' );
|
345 |
$controller_class = 'FFWDController' . ucfirst( strtolower( $page ) );
|
346 |
$controller = new $controller_class();
|
622 |
`image_onclick_action` varchar(32) NOT NULL,
|
623 |
`event_order` tinyint(4) NOT NULL,
|
624 |
`upcoming_events` tinyint(4) NOT NULL,
|
625 |
+
`fb_page_id` varchar(32) NOT NULL,
|
626 |
PRIMARY KEY (`id`)
|
627 |
) DEFAULT CHARSET=utf8;";
|
628 |
|
630 |
$wpdb->query( $wd_fb_info );
|
631 |
|
632 |
$old_version = ffwd_get_version();
|
633 |
+
|
634 |
+
if(substr($old_version,0,1) === '1'){
|
635 |
+
$FFWD_version_compare = version_compare($old_version, '1.1.0','<=');
|
636 |
+
}else{
|
637 |
+
$FFWD_version_compare = version_compare($old_version, '5.1.0','<=');
|
638 |
+
}
|
639 |
+
|
640 |
+
if($FFWD_version_compare){
|
641 |
+
$wd_fb_info_collation = "ALTER TABLE `" . $wpdb->prefix . "wd_fb_info`
|
642 |
+
ADD `fb_page_id` varchar(32) NOT NULL AFTER `upcoming_events`";
|
643 |
+
$wpdb->query($wd_fb_info_collation);
|
644 |
+
}
|
645 |
+
|
646 |
+
if(substr($old_version,0,1) === '1'){
|
647 |
+
$FFWD_version_compare = version_compare($old_version, '1.0.37','<=');
|
648 |
+
}else{
|
649 |
+
$FFWD_version_compare = version_compare($old_version, '5.0.37','<=');
|
650 |
+
}
|
651 |
+
|
652 |
if($FFWD_version_compare){
|
653 |
$wd_fb_info_collation = "ALTER TABLE `" . $wpdb->prefix . "wd_fb_info`
|
654 |
ADD `page_access_token` text NOT NULL AFTER `name`";
|
748 |
$wpdb->insert( $wpdb->prefix . 'wd_fb_theme', array(
|
749 |
'name' => 'Theme 1',
|
750 |
'default_theme' => 1,
|
751 |
+
'params' => '{"thumb_margin":"10","thumb_padding":"2","thumb_border_radius":"0","thumb_border_width":"1","thumb_border_style":"none","thumb_border_color":"000000","thumb_bg_color":"FFFFFF","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":"100","thumb_box_shadow":"0px 0px 0px #000000","thumb_transparent":"100","thumb_align":"center","thumb_hover_effect":"scale","thumb_hover_effect_value":"2deg","thumb_transition":"1","thumb_title_font_color":"797979","thumb_title_font_style":"inherit","thumb_title_pos":"bottom","thumb_title_font_size":"14","thumb_title_font_weight":"normal","thumb_title_margin":"5","thumb_title_shadow":"","thumb_like_comm_pos":"bottom","thumb_like_comm_font_size":"14","thumb_like_comm_font_color":"FFFFFF","thumb_like_comm_font_style":"inherit","thumb_like_comm_font_weight":"normal","thumb_like_comm_shadow":"0px 0px 1px #000000","masonry_thumb_padding":"10","masonry_thumb_border_radius":"2px","masonry_thumb_border_width":"1","masonry_thumb_border_style":"solid","masonry_thumb_border_color":"FFFFFF","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_transparent":"100","masonry_thumb_transparent":"100","masonry_thumb_align":"center","masonry_thumb_hover_effect":"none","masonry_thumb_hover_effect_value":"1.1","masonry_thumb_transition":"1","masonry_description_font_size":"14","masonry_description_color":"A3A3A3","masonry_description_font_style":"inherit","masonry_like_comm_pos":"bottom","masonry_like_comm_font_size":"14","masonry_like_comm_font_color":"FFFFFF","masonry_like_comm_font_style":"inherit","masonry_like_comm_font_weight":"normal","masonry_like_comm_shadow":"0px 0px 1px #000000","blog_style_align":"center","blog_style_bg_color":"FFFFFF","blog_style_fd_name_bg_color":"FFFFFF","blog_style_fd_name_align":"left","blog_style_fd_name_padding":"10","blog_style_fd_name_color":"1C1C1C","blog_style_fd_name_size":"24","blog_style_fd_name_font_weight":"normal","blog_style_fd_icon":"","blog_style_fd_icon_color":"","blog_style_fd_icon_size":"","blog_style_transparent":"100","blog_style_obj_img_align":"left","blog_style_margin":"16","blog_style_box_shadow":"","blog_style_border_width":"1","blog_style_border_style":"solid","blog_style_border_color":"EBEBEB","blog_style_border_type":"top","blog_style_border_radius":"","blog_style_obj_icons_color":"gray","blog_style_obj_date_pos":"after","blog_style_obj_font_family":"inherit","blog_style_obj_info_bg_color":"FFFFFF","blog_style_page_name_color":"1C1C1C","blog_style_obj_page_name_size":"20","blog_style_obj_page_name_font_weight":"normal","blog_style_obj_story_color":"1C1C1C","blog_style_obj_story_size":"16","blog_style_obj_story_font_weight":"normal","blog_style_obj_place_color":"1C1C1C","blog_style_obj_place_size":"14","blog_style_obj_place_font_weight":"normal","blog_style_obj_name_color":"1C1C1C","blog_style_obj_name_size":"18","blog_style_obj_name_font_weight":"bold","blog_style_obj_message_color":"1C1C1C","blog_style_obj_message_size":"16","blog_style_obj_message_font_weight":"normal","blog_style_obj_hashtags_color":"000000","blog_style_obj_hashtags_size":"12","blog_style_obj_hashtags_font_weight":"normal","blog_style_obj_likes_social_bg_color":"FFFFFF","blog_style_obj_likes_social_color":"1C1C1C","blog_style_obj_likes_social_size":"14","blog_style_obj_likes_social_font_weight":"normal","blog_style_obj_comments_bg_color":"FFFFFF","blog_style_obj_comments_color":"000000","blog_style_obj_comments_font_family":"inherit","blog_style_obj_comments_font_size":"14","blog_style_obj_users_font_color":"000000","blog_style_obj_comments_social_font_weight":"normal","blog_style_obj_comment_border_width":"10","blog_style_obj_comment_border_style":"solid","blog_style_obj_comment_border_color":"FCFCFC","blog_style_obj_comment_border_type":"top","blog_style_evt_str_color":"1C1C1C","blog_style_evt_str_size":"16","blog_style_evt_str_font_weight":"normal","blog_style_evt_ctzpcn_color":"CFCFCF","blog_style_evt_ctzpcn_size":"14","blog_style_evt_ctzpcn_font_weight":"normal","blog_style_evt_map_color":"1C1C1C","blog_style_evt_map_size":"14","blog_style_evt_map_font_weight":"normal","blog_style_evt_date_color":"CFCFCF","blog_style_evt_date_size":"14","blog_style_evt_date_font_weight":"normal","blog_style_evt_info_font_family":"inherit","album_compact_back_font_color":"000000","album_compact_back_font_style":"inherit","album_compact_back_font_size":"16","album_compact_back_font_weight":"bold","album_compact_back_padding":"0","album_compact_title_font_color":"797979","album_compact_title_font_style":"inherit","album_compact_thumb_title_pos":"bottom","album_compact_title_font_size":"13","album_compact_title_font_weight":"normal","album_compact_title_margin":"2px","album_compact_title_shadow":"0px 0px 0px #888888","album_compact_thumb_margin":"4","album_compact_thumb_padding":"0","album_compact_thumb_border_radius":"0","album_compact_thumb_border_width":"0","album_compact_thumb_border_style":"none","album_compact_thumb_border_color":"CCCCCC","album_compact_thumb_bg_color":"FFFFFF","album_compact_thumbs_bg_color":"FFFFFF","album_compact_thumb_bg_transparent":"0","album_compact_thumb_box_shadow":"0px 0px 0px #888888","album_compact_thumb_transparent":"100","album_compact_thumb_align":"center","album_compact_thumb_hover_effect":"none","album_compact_thumb_hover_effect_value":"1.1","album_compact_thumb_transition":"0","lightbox_overlay_bg_color":"000000","lightbox_overlay_bg_transparent":"60","lightbox_bg_color":"1B1B1B","lightbox_ctrl_btn_pos":"bottom","lightbox_ctrl_btn_align":"center","lightbox_ctrl_btn_height":"16","lightbox_ctrl_btn_margin_top":"24","lightbox_ctrl_btn_margin_left":"10","lightbox_ctrl_btn_transparent":"100","lightbox_ctrl_btn_color":"","lightbox_toggle_btn_height":"14","lightbox_toggle_btn_width":"100","lightbox_ctrl_cont_bg_color":"0A0A0A","lightbox_ctrl_cont_transparent":"100","lightbox_ctrl_cont_border_radius":"4","lightbox_close_btn_transparent":"100","lightbox_close_btn_bg_color":"000000","lightbox_close_btn_border_width":"14","lightbox_close_btn_border_radius":"24px","lightbox_close_btn_border_style":"none","lightbox_close_btn_border_color":"FFFFFF","lightbox_close_btn_box_shadow":"0","lightbox_close_btn_color":"","lightbox_close_btn_size":"12","lightbox_close_btn_width":"24","lightbox_close_btn_height":"24","lightbox_close_btn_top":"0","lightbox_close_btn_right":"-30","lightbox_close_btn_full_color":"","lightbox_rl_btn_bg_color":"000000","lightbox_rl_btn_transparent":"70","lightbox_rl_btn_border_radius":"20px","lightbox_rl_btn_border_width":"0","lightbox_rl_btn_border_style":"none","lightbox_rl_btn_border_color":"FFFFFF","lightbox_rl_btn_box_shadow":"","lightbox_rl_btn_color":"","lightbox_rl_btn_height":"36","lightbox_rl_btn_width":"36","lightbox_rl_btn_size":"16","lightbox_close_rl_btn_hover_color":"","lightbox_obj_pos":"right","lightbox_obj_width":"350","lightbox_obj_icons_color":"gray","lightbox_obj_date_pos":"after","lightbox_obj_font_family":"inherit","lightbox_obj_info_bg_color":"FFFFFF","lightbox_page_name_color":"4B4B4B","lightbox_obj_page_name_size":"18","lightbox_obj_page_name_font_weight":"bold","lightbox_obj_story_color":"4B4B4B","lightbox_obj_story_size":"16","lightbox_obj_story_font_weight":"normal","lightbox_obj_place_color":"4B4B4B","lightbox_obj_place_size":"14","lightbox_obj_place_font_weight":"normal","lightbox_obj_name_color":"4B4B4B","lightbox_obj_name_size":"14","lightbox_obj_name_font_weight":"bold","lightbox_obj_message_color":"000000","lightbox_obj_message_size":"16","lightbox_obj_message_font_weight":"normal","lightbox_obj_hashtags_color":"000000","lightbox_obj_hashtags_size":"12","lightbox_obj_hashtags_font_weight":"normal","lightbox_obj_likes_social_bg_color":"F4F5F7","lightbox_obj_likes_social_color":"000000","lightbox_obj_likes_social_size":"12","lightbox_obj_likes_social_font_weight":"normal","lightbox_obj_comments_bg_color":"FFFFFF","lightbox_obj_comments_color":"4A4A4A","lightbox_obj_comments_font_family":"inherit","lightbox_obj_comments_font_size":"16","lightbox_obj_users_font_color":"4B4B4B","lightbox_obj_comments_social_font_weight":"normal","lightbox_obj_comment_border_width":"1","lightbox_obj_comment_border_style":"none","lightbox_obj_comment_border_color":"000000","lightbox_obj_comment_border_type":"top","lightbox_filmstrip_pos":"bottom","lightbox_filmstrip_rl_bg_color":"3B3B3B","lightbox_filmstrip_rl_btn_size":"20","lightbox_filmstrip_rl_btn_color":"","lightbox_filmstrip_thumb_margin":"0 1px","lightbox_filmstrip_thumb_border_width":"1","lightbox_filmstrip_thumb_border_style":"solid","lightbox_filmstrip_thumb_border_color":"000000","lightbox_filmstrip_thumb_border_radius":"0","lightbox_filmstrip_thumb_deactive_transparent":"80","lightbox_filmstrip_thumb_active_border_width":"0","lightbox_filmstrip_thumb_active_border_color":"FFFFFF","lightbox_rl_btn_style":"","lightbox_evt_str_color":"000000","lightbox_evt_str_size":"16","lightbox_evt_str_font_weight":"normal","lightbox_evt_ctzpcn_color":"000000","lightbox_evt_ctzpcn_size":"14","lightbox_evt_ctzpcn_font_weight":"normal","lightbox_evt_map_color":"000000","lightbox_evt_map_size":"14","lightbox_evt_map_font_weight":"normal","lightbox_evt_date_color":"000000","lightbox_evt_date_size":"14","lightbox_evt_date_font_weight":"normal","lightbox_evt_info_font_family":"inherit","page_nav_position":"bottom","page_nav_align":"center","page_nav_number":"0","page_nav_font_size":"12","page_nav_font_style":"inherit","page_nav_font_color":"666666","page_nav_font_weight":"bold","page_nav_border_width":"1","page_nav_border_style":"solid","page_nav_border_color":"E3E3E3","page_nav_border_radius":"0","page_nav_margin":"0","page_nav_padding":"3px 6px","page_nav_button_bg_color":"FFFFFF","page_nav_button_bg_transparent":"100","page_nav_box_shadow":"0","page_nav_button_transition":"1","page_nav_button_text":"0","lightbox_obj_icons_color_likes_comments_count":"white"}',
|
752 |
) );
|
753 |
|
754 |
|
framework/WDFacebookFeed.php
CHANGED
@@ -165,7 +165,7 @@ $ffwd_info_options['popup_enable_google']=((isset($_POST['popup_enable_google'])
|
|
165 |
$ffwd_info_options['fb_view_type']=((isset($_POST['fb_view_type'])) ? esc_html(stripslashes($_POST['fb_view_type'])) : '');
|
166 |
$ffwd_info_options['image_onclick_action']=((isset($_POST['image_onclick_action'])) ? esc_html(stripslashes($_POST['image_onclick_action'])) : 'lightbox');
|
167 |
|
168 |
-
$ffwd_options_db=array('view_on_fb','post_text_length','event_street','event_city','event_country','event_zip','event_map','event_date','event_desp_length','comments_replies','comments_filter','comments_order','page_plugin_pos','page_plugin_fans','page_plugin_cover','page_plugin_header','page_plugin_width');
|
169 |
|
170 |
foreach($ffwd_options_db as $ffwd_option_db)
|
171 |
{
|
@@ -177,10 +177,10 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
177 |
$name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
|
178 |
$page_access_token = ((isset($_POST['page_access_token'])) ? esc_html(stripslashes($_POST['page_access_token'])) : '');
|
179 |
|
180 |
-
$new_access_token = self::update_page_access_token($page_access_token);
|
181 |
-
if($new_access_token["success"]){
|
182 |
-
$page_access_token = $new_access_token["new_token"];
|
183 |
-
}
|
184 |
$update_mode = ((isset($_POST['update_mode'])) ? esc_html(stripslashes($_POST['update_mode'])) : '');
|
185 |
$published = ((isset($_POST['published'])) ? (int) esc_html(stripslashes($_POST['published'])) : 1);
|
186 |
$content = implode(",", self::$content);
|
@@ -326,7 +326,8 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
326 |
'page_plugin_cover' =>$options['page_plugin_cover'],
|
327 |
'page_plugin_header' =>$options['page_plugin_header'],
|
328 |
'page_plugin_width' =>$options['page_plugin_width'],
|
329 |
-
'image_onclick_action' =>$options['image_onclick_action']
|
|
|
330 |
),
|
331 |
array('id' => self::$fb_id)
|
332 |
);
|
@@ -488,6 +489,25 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
488 |
}
|
489 |
|
490 |
public static function page() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
self::$content_url = ((isset($_POST['content_url'])) ? esc_html(stripslashes($_POST['content_url'])) : '');
|
492 |
self::$limit = ((isset($_POST['limit'])) ? esc_html(stripslashes($_POST['limit'])) : '');
|
493 |
self::set_access_token();
|
@@ -1132,7 +1152,7 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
1132 |
$ffwd_info_options['fb_view_type']=((isset($_POST['fb_view_type'])) ? esc_html(stripslashes($_POST['fb_view_type'])) : '');
|
1133 |
$ffwd_info_options['image_onclick_action']=((isset($_POST['image_onclick_action'])) ? esc_html(stripslashes($_POST['image_onclick_action'])) : 'lightbox');
|
1134 |
|
1135 |
-
$ffwd_options_db=array('view_on_fb','post_text_length','event_street','event_city','event_country','event_zip','event_map','event_date','event_desp_length','comments_replies','comments_filter','comments_order','page_plugin_pos','page_plugin_fans','page_plugin_cover','page_plugin_header','page_plugin_width');
|
1136 |
|
1137 |
foreach($ffwd_options_db as $ffwd_option_db)
|
1138 |
{
|
@@ -1238,6 +1258,7 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
1238 |
'page_plugin_header' =>$ffwd_info_options['page_plugin_header'],
|
1239 |
'page_plugin_width' =>$ffwd_info_options['page_plugin_width'],
|
1240 |
'image_onclick_action' =>$ffwd_info_options['image_onclick_action'],
|
|
|
1241 |
), array(
|
1242 |
'%s',//name
|
1243 |
'%s',//type
|
@@ -1722,6 +1743,57 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
1722 |
$autoupdate_interval = $row->autoupdate_interval;
|
1723 |
return $autoupdate_interval;
|
1724 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1725 |
////////////////////////////////////////////////////////////////////////////////////////
|
1726 |
// Private Methods //
|
1727 |
////////////////////////////////////////////////////////////////////////////////////////
|
165 |
$ffwd_info_options['fb_view_type']=((isset($_POST['fb_view_type'])) ? esc_html(stripslashes($_POST['fb_view_type'])) : '');
|
166 |
$ffwd_info_options['image_onclick_action']=((isset($_POST['image_onclick_action'])) ? esc_html(stripslashes($_POST['image_onclick_action'])) : 'lightbox');
|
167 |
|
168 |
+
$ffwd_options_db=array('view_on_fb','post_text_length','event_street','event_city','event_country','event_zip','event_map','event_date','event_desp_length','comments_replies','comments_filter','comments_order','page_plugin_pos','page_plugin_fans','page_plugin_cover','page_plugin_header','page_plugin_width', 'fb_page_id');
|
169 |
|
170 |
foreach($ffwd_options_db as $ffwd_option_db)
|
171 |
{
|
177 |
$name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
|
178 |
$page_access_token = ((isset($_POST['page_access_token'])) ? esc_html(stripslashes($_POST['page_access_token'])) : '');
|
179 |
|
180 |
+
// $new_access_token = self::update_page_access_token($page_access_token);
|
181 |
+
// if($new_access_token["success"]){
|
182 |
+
// $page_access_token = $new_access_token["new_token"];
|
183 |
+
// }
|
184 |
$update_mode = ((isset($_POST['update_mode'])) ? esc_html(stripslashes($_POST['update_mode'])) : '');
|
185 |
$published = ((isset($_POST['published'])) ? (int) esc_html(stripslashes($_POST['published'])) : 1);
|
186 |
$content = implode(",", self::$content);
|
326 |
'page_plugin_cover' =>$options['page_plugin_cover'],
|
327 |
'page_plugin_header' =>$options['page_plugin_header'],
|
328 |
'page_plugin_width' =>$options['page_plugin_width'],
|
329 |
+
'image_onclick_action' =>$options['image_onclick_action'],
|
330 |
+
'fb_page_id' => $options['fb_page_id'],
|
331 |
),
|
332 |
array('id' => self::$fb_id)
|
333 |
);
|
489 |
}
|
490 |
|
491 |
public static function page() {
|
492 |
+
$page_id = $_POST['fb_page_id'];
|
493 |
+
$pages_list = get_option('ffwd_pages_list', array());
|
494 |
+
|
495 |
+
$fb_page = null;
|
496 |
+
foreach($pages_list as $page){
|
497 |
+
if($page->id === $page_id){
|
498 |
+
$fb_page = $page;
|
499 |
+
break;
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
if($fb_page == null){
|
504 |
+
die(0);
|
505 |
+
}
|
506 |
+
|
507 |
+
$_POST['content_url'] = "https://www.facebook.com/" . $fb_page->name . "-" . $fb_page->id . "/";
|
508 |
+
$_POST['page_access_token'] = $fb_page->access_token;
|
509 |
+
|
510 |
+
|
511 |
self::$content_url = ((isset($_POST['content_url'])) ? esc_html(stripslashes($_POST['content_url'])) : '');
|
512 |
self::$limit = ((isset($_POST['limit'])) ? esc_html(stripslashes($_POST['limit'])) : '');
|
513 |
self::set_access_token();
|
1152 |
$ffwd_info_options['fb_view_type']=((isset($_POST['fb_view_type'])) ? esc_html(stripslashes($_POST['fb_view_type'])) : '');
|
1153 |
$ffwd_info_options['image_onclick_action']=((isset($_POST['image_onclick_action'])) ? esc_html(stripslashes($_POST['image_onclick_action'])) : 'lightbox');
|
1154 |
|
1155 |
+
$ffwd_options_db=array('view_on_fb','post_text_length','event_street','event_city','event_country','event_zip','event_map','event_date','event_desp_length','comments_replies','comments_filter','comments_order','page_plugin_pos','page_plugin_fans','page_plugin_cover','page_plugin_header','page_plugin_width', 'fb_page_id');
|
1156 |
|
1157 |
foreach($ffwd_options_db as $ffwd_option_db)
|
1158 |
{
|
1258 |
'page_plugin_header' =>$ffwd_info_options['page_plugin_header'],
|
1259 |
'page_plugin_width' =>$ffwd_info_options['page_plugin_width'],
|
1260 |
'image_onclick_action' =>$ffwd_info_options['image_onclick_action'],
|
1261 |
+
'fb_page_id' =>$ffwd_info_options['fb_page_id'],
|
1262 |
), array(
|
1263 |
'%s',//name
|
1264 |
'%s',//type
|
1743 |
$autoupdate_interval = $row->autoupdate_interval;
|
1744 |
return $autoupdate_interval;
|
1745 |
}
|
1746 |
+
|
1747 |
+
public static function get_auth_url(){
|
1748 |
+
$app_id = '457830911380339';
|
1749 |
+
$redirect_uri = 'https://api.web-dorado.com/fb/';
|
1750 |
+
|
1751 |
+
$admin_url = admin_url('admin.php?page=options_ffwd');
|
1752 |
+
|
1753 |
+
$state = array(
|
1754 |
+
'wp_site_url' => $admin_url
|
1755 |
+
);
|
1756 |
+
|
1757 |
+
$fb_url = add_query_arg(array(
|
1758 |
+
'client_id' => $app_id,
|
1759 |
+
'redirect_uri' => $redirect_uri,
|
1760 |
+
'scope' => 'manage_pages',
|
1761 |
+
), "https://www.facebook.com/dialog/oauth");
|
1762 |
+
|
1763 |
+
$fb_url .= '&state=' . base64_encode(json_encode($state));
|
1764 |
+
return $fb_url;
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
public static function save_pages($access_token){
|
1768 |
+
|
1769 |
+
$url = 'https://graph.facebook.com/me/accounts?limit=500&access_token=' . $access_token;
|
1770 |
+
$response = wp_remote_get($url);
|
1771 |
+
|
1772 |
+
if(!is_wp_error($response) && wp_remote_retrieve_response_code($response) == 200) {
|
1773 |
+
|
1774 |
+
$pages = json_decode($response['body']);
|
1775 |
+
update_option('ffwd_pages_list', $pages->data);
|
1776 |
+
update_option("ffwd_pages_list_success", "1");
|
1777 |
+
self::update_access_tokens();
|
1778 |
+
return true;
|
1779 |
+
}
|
1780 |
+
|
1781 |
+
return false;
|
1782 |
+
}
|
1783 |
+
|
1784 |
+
private static function update_access_tokens(){
|
1785 |
+
global $wpdb;
|
1786 |
+
|
1787 |
+
$pages = get_option('ffwd_pages_list', array());
|
1788 |
+
|
1789 |
+
foreach($pages as $page) {
|
1790 |
+
$wpdb->update($wpdb->prefix . 'wd_fb_info', array(
|
1791 |
+
'page_access_token' => $page->access_token
|
1792 |
+
), array('fb_page_id' => $page->id));
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
}
|
1796 |
+
|
1797 |
////////////////////////////////////////////////////////////////////////////////////////
|
1798 |
// Private Methods //
|
1799 |
////////////////////////////////////////////////////////////////////////////////////////
|
frontend/views/FFWDViewBlog_style.php
CHANGED
@@ -175,7 +175,7 @@ class FFWDViewBlog_style {
|
|
175 |
max-width: 100%;
|
176 |
padding: <?php echo $theme_row->blog_style_margin; ?>px;
|
177 |
box-shadow: <?php echo $theme_row->blog_style_box_shadow; ?>;
|
178 |
-
margin:
|
179 |
box-sizing: border-box;
|
180 |
border-width: <?php echo $theme_row->blog_style_border_width; ?>px;
|
181 |
border-<?php echo ($theme_row->blog_style_border_type != 'all') ? $theme_row->blog_style_border_type . '-' : ''; ?>style: <?php echo $theme_row->blog_style_border_style; ?>;
|
@@ -332,12 +332,12 @@ class FFWDViewBlog_style {
|
|
332 |
border-radius: 0px;
|
333 |
}
|
334 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_from_time_post_<?php echo $ffwd; ?> {
|
335 |
-
font-size:
|
336 |
font-weight: normal;
|
337 |
font-family: <?php echo $theme_row->blog_style_obj_font_family; ?>;
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
background: url('<?php echo WD_FFWD_URL . '/images/feed/time_'. $theme_row->blog_style_obj_icons_color .'.png' ?>') no-repeat 0px center;
|
342 |
background-size: 12px;
|
343 |
color: #<?php echo $theme_row->blog_style_obj_story_color; ?>;
|
@@ -345,7 +345,7 @@ class FFWDViewBlog_style {
|
|
345 |
|
346 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_blog_style_object_from_pic_container_<?php echo $ffwd; ?> {
|
347 |
float:left;
|
348 |
-
margin:0px
|
349 |
}
|
350 |
|
351 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_hashtag_<?php echo $ffwd; ?>, #ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_message_tag_<?php echo $ffwd; ?> {
|
@@ -489,6 +489,7 @@ class FFWDViewBlog_style {
|
|
489 |
font-style: normal;
|
490 |
font-variant: normal;
|
491 |
font-family: <?php echo $theme_row->blog_style_obj_font_family; ?>;
|
|
|
492 |
}
|
493 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .fa {
|
494 |
vertical-align: baseline;
|
@@ -1137,7 +1138,7 @@ class FFWDViewBlog_style {
|
|
1137 |
?>
|
1138 |
<div class="blog_style_object_container_<?php echo $ffwd; ?>">
|
1139 |
<div class="ffwd_blog_style_object_info_container_<?php echo $ffwd; ?><?php echo ($ffwd_data_row->type == 'status') ? ' bwg_blog_style_full_width' : ''; ?>" >
|
1140 |
-
<div class="ffwd_blog_style_object_from_<?php echo $ffwd; ?>" >
|
1141 |
<?php
|
1142 |
if($theme_row->blog_style_obj_date_pos == "before")
|
1143 |
echo $this->model->ffwd_time($ffwd_data_row, $ffwd,$ffwd_info['event_date']);
|
@@ -1170,14 +1171,17 @@ class FFWDViewBlog_style {
|
|
1170 |
echo nl2br($linkify->process($message));
|
1171 |
?>
|
1172 |
</p>
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
|
|
|
|
|
|
1181 |
endif;
|
1182 |
if($theme_row->blog_style_obj_date_pos == "bottom")
|
1183 |
echo $this->model->ffwd_time($ffwd_data_row, $ffwd,$ffwd_info['event_date']);
|
175 |
max-width: 100%;
|
176 |
padding: <?php echo $theme_row->blog_style_margin; ?>px;
|
177 |
box-shadow: <?php echo $theme_row->blog_style_box_shadow; ?>;
|
178 |
+
margin: 0;
|
179 |
box-sizing: border-box;
|
180 |
border-width: <?php echo $theme_row->blog_style_border_width; ?>px;
|
181 |
border-<?php echo ($theme_row->blog_style_border_type != 'all') ? $theme_row->blog_style_border_type . '-' : ''; ?>style: <?php echo $theme_row->blog_style_border_style; ?>;
|
332 |
border-radius: 0px;
|
333 |
}
|
334 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_from_time_post_<?php echo $ffwd; ?> {
|
335 |
+
font-size: 13px;
|
336 |
font-weight: normal;
|
337 |
font-family: <?php echo $theme_row->blog_style_obj_font_family; ?>;
|
338 |
+
padding: 0 0px 3px 18px;
|
339 |
+
margin: 0;
|
340 |
+
min-width: 72px;
|
341 |
background: url('<?php echo WD_FFWD_URL . '/images/feed/time_'. $theme_row->blog_style_obj_icons_color .'.png' ?>') no-repeat 0px center;
|
342 |
background-size: 12px;
|
343 |
color: #<?php echo $theme_row->blog_style_obj_story_color; ?>;
|
345 |
|
346 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_blog_style_object_from_pic_container_<?php echo $ffwd; ?> {
|
347 |
float:left;
|
348 |
+
margin:0px 16px 0px 0px
|
349 |
}
|
350 |
|
351 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_hashtag_<?php echo $ffwd; ?>, #ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_blog_style_object_info_container_<?php echo $ffwd; ?> .ffwd_message_tag_<?php echo $ffwd; ?> {
|
489 |
font-style: normal;
|
490 |
font-variant: normal;
|
491 |
font-family: <?php echo $theme_row->blog_style_obj_font_family; ?>;
|
492 |
+
margin-bottom: 4px;
|
493 |
}
|
494 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .fa {
|
495 |
vertical-align: baseline;
|
1138 |
?>
|
1139 |
<div class="blog_style_object_container_<?php echo $ffwd; ?>">
|
1140 |
<div class="ffwd_blog_style_object_info_container_<?php echo $ffwd; ?><?php echo ($ffwd_data_row->type == 'status') ? ' bwg_blog_style_full_width' : ''; ?>" >
|
1141 |
+
<div style="margin-bottom: 4px;" class="ffwd_blog_style_object_from_<?php echo $ffwd; ?>" >
|
1142 |
<?php
|
1143 |
if($theme_row->blog_style_obj_date_pos == "before")
|
1144 |
echo $this->model->ffwd_time($ffwd_data_row, $ffwd,$ffwd_info['event_date']);
|
1171 |
echo nl2br($linkify->process($message));
|
1172 |
?>
|
1173 |
</p>
|
1174 |
+
<?php
|
1175 |
+
$description = $this->model->see_less_more($ffwd_data_row->description, 'description', $ffwd_data_row->type, $ffwd_info['post_text_length'], $ffwd_info['event_desp_length']);
|
1176 |
+
$description = $this->model->fill_hashtags($description, $ffwd);
|
1177 |
+
$blog_style_object_description = nl2br($linkify->process($description));
|
1178 |
+
if(!empty($blog_style_object_description)) {
|
1179 |
+
?>
|
1180 |
+
<p class="bwg_blog_style_object_description_<?php echo $ffwd; ?>">
|
1181 |
+
<?php echo $blog_style_object_description; ?>
|
1182 |
+
</p>
|
1183 |
+
<?php
|
1184 |
+
}
|
1185 |
endif;
|
1186 |
if($theme_row->blog_style_obj_date_pos == "bottom")
|
1187 |
echo $this->model->ffwd_time($ffwd_data_row, $ffwd,$ffwd_info['event_date']);
|
frontend/views/FFWDViewPopupBox.php
CHANGED
@@ -782,13 +782,14 @@ if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
|
|
782 |
text-align: left;
|
783 |
background-color: #<?php echo $theme_row->lightbox_obj_info_bg_color; ?>;
|
784 |
padding:0px 20px;
|
|
|
785 |
}
|
786 |
.ffwd_object_from {
|
787 |
margin: 0px 0px 7px 0px;
|
788 |
}
|
789 |
.ffwd_object_from_pic_cont {
|
790 |
float: left;
|
791 |
-
margin: 0px
|
792 |
}
|
793 |
.ffwd_object_from_pic {
|
794 |
display: inline-block;
|
@@ -878,7 +879,8 @@ if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
|
|
878 |
font-style: normal;
|
879 |
font-variant: normal;
|
880 |
font-family: <?php echo $theme_row->lightbox_obj_font_family; ?>;
|
881 |
-
line-height:
|
|
|
882 |
}
|
883 |
.ffwd_comments_likes_container {
|
884 |
padding: 5px 20px;
|
@@ -992,7 +994,7 @@ if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
|
|
992 |
}
|
993 |
.ffwd_comments_content {
|
994 |
padding: 0px 20px;
|
995 |
-
margin:
|
996 |
}
|
997 |
.ffwd_single_comment, .ffwd_comment_reply {
|
998 |
padding: 6px;
|
@@ -1064,7 +1066,7 @@ if ($theme_row->lightbox_ctrl_btn_pos == 'top') {
|
|
1064 |
font-variant: normal;
|
1065 |
}
|
1066 |
.ffwd_comment_content > .ffwd_comment_date_likes {
|
1067 |
-
margin:
|
1068 |
}
|
1069 |
.ffwd_comment_content > .ffwd_comment_replies {
|
1070 |
margin: 4px 0px 0px 0px;
|
782 |
text-align: left;
|
783 |
background-color: #<?php echo $theme_row->lightbox_obj_info_bg_color; ?>;
|
784 |
padding:0px 20px;
|
785 |
+
margin-bottom: 12px;
|
786 |
}
|
787 |
.ffwd_object_from {
|
788 |
margin: 0px 0px 7px 0px;
|
789 |
}
|
790 |
.ffwd_object_from_pic_cont {
|
791 |
float: left;
|
792 |
+
margin: 0px 16px 0px 0px;
|
793 |
}
|
794 |
.ffwd_object_from_pic {
|
795 |
display: inline-block;
|
879 |
font-style: normal;
|
880 |
font-variant: normal;
|
881 |
font-family: <?php echo $theme_row->lightbox_obj_font_family; ?>;
|
882 |
+
line-height: 21px;
|
883 |
+
margin-top: 12px;
|
884 |
}
|
885 |
.ffwd_comments_likes_container {
|
886 |
padding: 5px 20px;
|
994 |
}
|
995 |
.ffwd_comments_content {
|
996 |
padding: 0px 20px;
|
997 |
+
margin: 16px 0px 0px 0px;
|
998 |
}
|
999 |
.ffwd_single_comment, .ffwd_comment_reply {
|
1000 |
padding: 6px;
|
1066 |
font-variant: normal;
|
1067 |
}
|
1068 |
.ffwd_comment_content > .ffwd_comment_date_likes {
|
1069 |
+
margin: 10px 0px 0px 0px;
|
1070 |
}
|
1071 |
.ffwd_comment_content > .ffwd_comment_replies {
|
1072 |
margin: 4px 0px 0px 0px;
|
frontend/views/FFWDViewThumbnails.php
CHANGED
@@ -139,6 +139,7 @@ $ffwd_info['thumb_height']= $params['thumb_height'];
|
|
139 |
word-wrap: break-word;
|
140 |
box-sizing: border-box;
|
141 |
text-align: left;
|
|
|
142 |
}
|
143 |
|
144 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_likes_comments_container_<?php echo $ffwd; ?> {
|
139 |
word-wrap: break-word;
|
140 |
box-sizing: border-box;
|
141 |
text-align: left;
|
142 |
+
line-height: 19px;
|
143 |
}
|
144 |
|
145 |
#ffwd_container1_<?php echo $ffwd; ?> #ffwd_container2_<?php echo $ffwd; ?> .ffwd_likes_comments_container_<?php echo $ffwd; ?> {
|
js/ffwd.js
CHANGED
@@ -143,7 +143,8 @@ function spider_ajax_save(wd_fb_prefix) {
|
|
143 |
data["published"] = published;
|
144 |
data["ffwd_nonce"] = ffwd_nonce;
|
145 |
data["name"] = name;
|
146 |
-
|
|
|
147 |
data["fb_type"] = fb_type;
|
148 |
data["content_url"] = content_url;
|
149 |
data["content_type"] = content_type;
|
@@ -940,40 +941,29 @@ jQuery(document).ready(function () {
|
|
940 |
location.reload();
|
941 |
}
|
942 |
|
943 |
-
jQuery('
|
944 |
e.preventDefault();
|
|
|
|
|
|
|
945 |
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
nonce: jQuery('#ffwd_keys_form_nonce').val(),
|
950 |
-
action: 'ffwd_save_fb_keys'
|
951 |
-
};
|
952 |
|
953 |
-
|
|
|
954 |
|
955 |
-
|
956 |
-
|
957 |
-
jQuery('#ffwd_keys_form_id').css("border-color", "#FF0000");
|
958 |
-
return false;
|
959 |
-
}
|
960 |
|
961 |
-
if
|
962 |
-
|
963 |
-
|
964 |
-
|
|
|
965 |
}
|
|
|
966 |
|
967 |
-
jQuery.ajax({
|
968 |
-
method: "POST",
|
969 |
-
url: ajax_url,
|
970 |
-
data: data,
|
971 |
-
success: function (result) {
|
972 |
-
window.location.reload();
|
973 |
-
}
|
974 |
-
});
|
975 |
-
|
976 |
-
return false;
|
977 |
-
});
|
978 |
|
979 |
});
|
143 |
data["published"] = published;
|
144 |
data["ffwd_nonce"] = ffwd_nonce;
|
145 |
data["name"] = name;
|
146 |
+
data["page_access_token"] = page_access_token;
|
147 |
+
data["fb_page_id"] = jQuery('#fb_page_id').val();
|
148 |
data["fb_type"] = fb_type;
|
149 |
data["content_url"] = content_url;
|
150 |
data["content_type"] = content_type;
|
941 |
location.reload();
|
942 |
}
|
943 |
|
944 |
+
jQuery('.ffwd_login_button').on('click', function(e) {
|
945 |
e.preventDefault();
|
946 |
+
jQuery('#ffwd_login_popup').css('display', 'block');
|
947 |
+
return false;
|
948 |
+
});
|
949 |
|
950 |
+
jQuery('#ffwd_login_popup_cancle_btn, #ffwd_login_popup').on('click', function () {
|
951 |
+
jQuery('#ffwd_login_popup').css('display', 'none');
|
952 |
+
});
|
|
|
|
|
|
|
953 |
|
954 |
+
ffwd_fb_page_image();
|
955 |
+
jQuery('#fb_page_id').on('change', ffwd_fb_page_image);
|
956 |
|
957 |
+
function ffwd_fb_page_image(){
|
958 |
+
var $select = jQuery('#fb_page_id');
|
|
|
|
|
|
|
959 |
|
960 |
+
if($select.val() == ""){
|
961 |
+
jQuery('#ffwd_page_img').css('display', 'none');
|
962 |
+
}else{
|
963 |
+
var src = "https://graph.facebook.com/" + $select.val() + "/picture/";
|
964 |
+
jQuery('#ffwd_page_img').attr('src', src).css('display', 'inline-block');
|
965 |
}
|
966 |
+
}
|
967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
|
969 |
});
|
js/ffwd_frontend.js
CHANGED
@@ -800,7 +800,7 @@ function do_something_with_data_blog_style(result, id, ffwd, type, owner_info, f
|
|
800 |
|
801 |
var who_post_name_link = (ffwd_params['blog_style_author'] == "1") ? '<a class="ffwd_blog_style_object_from_name_' + ffwd + '" href="https://www.facebook.com/' + who_post['id'] + '" target="_blank">' + who_post['name'] + '</a>' : '',
|
802 |
owner_name_link = '<a class="ffwd_blog_style_object_from_name_' + ffwd + '" href="https://www.facebook.com/' + owner_info['id'] + '" target="_blank">' + owner_info['name'] + '</a>',
|
803 |
-
who_post_pic = '<img id="ffwd_user_pic_' + ffwd + '_' + id['id'] + '" class="ffwd_user_pic" src="' + who_post['picture']['data']['url'] + '" style="
|
804 |
place,
|
805 |
full_place = '',
|
806 |
story = id['story'].replace(/'/g, "'"),
|
800 |
|
801 |
var who_post_name_link = (ffwd_params['blog_style_author'] == "1") ? '<a class="ffwd_blog_style_object_from_name_' + ffwd + '" href="https://www.facebook.com/' + who_post['id'] + '" target="_blank">' + who_post['name'] + '</a>' : '',
|
802 |
owner_name_link = '<a class="ffwd_blog_style_object_from_name_' + ffwd + '" href="https://www.facebook.com/' + owner_info['id'] + '" target="_blank">' + owner_info['name'] + '</a>',
|
803 |
+
who_post_pic = '<img id="ffwd_user_pic_' + ffwd + '_' + id['id'] + '" class="ffwd_user_pic" src="' + who_post['picture']['data']['url'] + '" style="width:50px;height:50px;box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);margin-top: 9px;">',
|
804 |
place,
|
805 |
full_place = '',
|
806 |
story = id['story'].replace(/'/g, "'"),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: customizable facebook feed, facebook, facebook events, facebook feed, face
|
|
4 |
Requires at least: 3.4
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -100,6 +100,10 @@ The plugin uses Facebook API to get public data from Facebook. All the received
|
|
100 |
|
101 |
== Changelog ==
|
102 |
|
|
|
|
|
|
|
|
|
103 |
= 1.1.0 =
|
104 |
* **Important: Breaking change. Obtaining page access token is required to display your page content with Facebook Feed WD plugin. See the [documentation](https://web-dorado.com/wordpress-facebook-feed/options.html).
|
105 |
* Fixed: Error on PHP 7.2
|
4 |
Requires at least: 3.4
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 1.1.1 =
|
104 |
+
* Improved: Simplified Facebook login. No need to enter app ID and get page tokens manually. This is a new Facebook app, so reauthentication is required.
|
105 |
+
* Fixed: Elementor compatibility
|
106 |
+
|
107 |
= 1.1.0 =
|
108 |
* **Important: Breaking change. Obtaining page access token is required to display your page content with Facebook Feed WD plugin. See the [documentation](https://web-dorado.com/wordpress-facebook-feed/options.html).
|
109 |
* Fixed: Error on PHP 7.2
|