WpDevArt Facebook Like Box Widget - Version 0.7.93

Version Description

  • Added post/page shortcode button.

Step by step guide

Adding to the sidebar.

Install the plugin and add the widget to your sidebar. Then set the widget options. That's all, now your users can see your fan page on your widget.

Adding in posts/pages using shortcode button.

For adding it in your pages/posts you just need to click on our plugin shorcode button from your pages/posts.

Adding Popup and Sticky boxes.

You need to click on our plugin submenu from your admin panel menu. Then just set up options.

Main options

  • Page ID: - Type here your fan page url(without https://www.facebook.com/, for example - uefacom).
  • Animation - Choose Animation type
  • Show/Hide border - Show/Hide border
  • Border color - Type the Border Color
  • Show/Hide latest posts - Show/Hide the latest posts
  • Width - Type width
  • Height - Type height
  • header - Show/Hide the header
  • Show/Hide Friends Faces - Choose to Show/Hide Friends Faces
  • Select Header size - Select Header size
  • Show/hide cover photo - Choose to show/hide cover photo
  • Language - Type the language code

Popup options

  • Enable/Disable - Select to show or hide it
  • Display on - Select where to display it
  • Display periodicity - Select the display periodicity
  • Time to show - Type the time when it will appear
  • Width - Type here the width
  • Height - Type here the height
  • Title - Type here the title
  • Title color - Type here the title color
  • Title Font family - Choose the title Font family
  • Page ID - Type here your fan page url
  • Show/Hide border - Show/Hide border
  • Border color - Type the Border Color
  • Show/Hide latest posts - Show/Hide the latest posts
  • Show/Hide Friends Faces - Choose to Show/Hide Friends Faces
  • Select Header size - Select Header size
  • Show/hide cover photo - Choose to show/hide cover photo
  • Language - Type the language code

Stickybox options

  • Enable/Disable - Select to show or hide it
  • Display on - Select where to display it
  • Position - Select the position
  • Height - Select the height
  • Page ID - Type here your fan page url
  • Width - Type here the width
  • Height - Type here the width
  • Button bg color - Type here the button background color
  • Border color - Type here the border color
  • Title - Type here the title
  • Title color - Select the title color.
  • Title Font family - Choose the Title Font family
  • Show/Hide Friends Faces - Choose to Show/Hide Friends Faces
  • Select Header size - Select Header size
  • Show/hide cover photo - Choose to show/hide cover photo
  • Show/Hide latest posts - Show/Hide the latest posts
  • Language - Type the language code

Widget options

  • Title: - Type here the widget title
  • Page ID: - Type here your fan page url
  • Width: - Type here the width
  • Height: - Type here the height
  • Animation: - Choose Animation type
  • Show border: - Show/Hide border
  • Border Color: - Select the Border Color
  • Show latest posts: - Show/Hide the latest posts
  • Show/Hide Friends Faces: - Show/Hide Friends Faces
  • Select Header size: - Select Header size
  • Cover photo: - Show/hide cover photo
  • Language: - Type the language code

If you found any bug in our plugin or have a question contact us at our plugin SUPPORT FORUM.

We tried to create the best Fb page plugin that you ever use. Maybe we missed some options or features that you need, so you can suggest any feature that you need and we will try to add it in future. Use our support forum on WordPress for any suggestion about new features.

Download this release

Release Info

Developer smplug-in
Plugin Icon 128x128 WpDevArt Facebook Like Box Widget
Version 0.7.93
Comparing to
See all releases

Code changes from version 0.7.92 to 0.7.93

includes/admin_menu.php CHANGED
@@ -34,7 +34,7 @@ class like_box_admin_menu{
34
 
35
 
36
  // Insert button
37
- add_action('media_buttons_context', array($this,'like_box_button'));
38
  add_action( 'wp_ajax_like_box_window_manager', array($this,'like_box_window_insert_content') );
39
 
40
  add_action( 'wp_ajax_like_box_page_save', array($this,'save_in_databese') );
@@ -49,11 +49,11 @@ class like_box_admin_menu{
49
 
50
  $title = 'Add Like Box';
51
 
52
- $context .= '<a class="button thickbox" title="Create facebook like box and insert in posts/pages" href="'.admin_url("admin-ajax.php").'?action=like_box_window_manager&height=750&width=640">
53
  <span class="wp-media-buttons-icon" style="background: url('.$img.'); background-repeat: no-repeat; background-position: left bottom;"></span>
54
  Add like box
55
  </a>';
56
- return $context;
57
  }
58
 
59
  /*############################### Insert like box - content function ########################################*/
34
 
35
 
36
  // Insert button
37
+ add_action('media_buttons', array($this,'like_box_button'));
38
  add_action( 'wp_ajax_like_box_window_manager', array($this,'like_box_window_insert_content') );
39
 
40
  add_action( 'wp_ajax_like_box_page_save', array($this,'save_in_databese') );
49
 
50
  $title = 'Add Like Box';
51
 
52
+ $context = '<a class="button thickbox" title="Create facebook like box and insert in posts/pages" href="'.admin_url("admin-ajax.php").'?action=like_box_window_manager&height=750&width=640">
53
  <span class="wp-media-buttons-icon" style="background: url('.$img.'); background-repeat: no-repeat; background-position: left bottom;"></span>
54
  Add like box
55
  </a>';
56
+ echo $context;
57
  }
58
 
59
  /*############################### Insert like box - content function ########################################*/
includes/gutenberg/block.js ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( blocks, editor, i18n, element, components, _ ) {
2
+ var el = element.createElement;
3
+ var RichText = editor.RichText;
4
+ var MediaUpload = editor.MediaUpload;
5
+ var currentdate = new Date();
6
+ var pro_feature_text="If you want to use this feature upgrade to Like Box Pro";
7
+
8
+ var icon_iamge = el( 'img', {
9
+ width: 24,
10
+ height: 24,
11
+ src: window['wpda_likebox_gutenberg']["other_data"]["icon_src"],
12
+ className: "wpda_likebox_gutenberg_icon"
13
+ } );
14
+
15
+ blocks.registerBlockType( 'wpdevart-likebox/likebox', {
16
+ title: 'WpDevArt Like box',
17
+ icon: icon_iamge ,
18
+ category: 'embed',
19
+ keywords:['like','facebook','box','social'],
20
+ attributes: {
21
+ open_or_close: {
22
+ type: 'boolean',
23
+ value: true,
24
+ default: true
25
+ },
26
+ version: {
27
+ type: 'string',
28
+ value: "",
29
+ default: ""
30
+ },
31
+
32
+ like_box_profile_id:{
33
+ type: 'string',
34
+ value: "",
35
+ default: "",
36
+ },
37
+ animation_efect:{
38
+ type: 'string',
39
+ value: "",
40
+ default: "none",
41
+ },
42
+ show_border:{
43
+ type: 'string',
44
+ value: "",
45
+ default: "show",
46
+ },
47
+ border_color:{
48
+ type: 'string',
49
+ value: "",
50
+ default: "#ffffff",
51
+ },
52
+ stream:{
53
+ type: 'string',
54
+ value: "",
55
+ default: "hide",
56
+ },
57
+ connections:{
58
+ type: 'string',
59
+ value: "",
60
+ default: "show",
61
+ },
62
+ width:{
63
+ type: 'string',
64
+ value: "",
65
+ default: "300",
66
+ },
67
+ height:{
68
+ type: 'string',
69
+ value: "",
70
+ default: "550",
71
+ },
72
+ header:{
73
+ type: 'string',
74
+ value: "",
75
+ default: "small",
76
+ },
77
+ cover_photo:{
78
+ type: 'string',
79
+ value: "",
80
+ default: "show",
81
+ },
82
+ locale:{
83
+ type: 'string',
84
+ value: "",
85
+ default: "en_US",
86
+ },
87
+ },
88
+ edit: function( props ) {
89
+ props.setAttributes({version:'1.0'})// begin is genereting save function;
90
+ return el( 'span', { },create_open_hide_block()
91
+
92
+ );
93
+
94
+ function create_open_hide_block(){
95
+ var open_or_close_class="";
96
+ if(props.attributes.open_or_close===false){
97
+ open_or_close_class=" closed_params";
98
+ }
99
+ return el("div",{className:"wpdevart_likebox_main_collapsible_element"+open_or_close_class},create_head(),create_content())
100
+ }
101
+
102
+ function create_head(){
103
+ return el("div",{className:"head_block",onClick:function(value){open_close_element(value)}},
104
+ el("span",{className:"title_image"},
105
+ el("img",{src:wpda_likebox_gutenberg['other_data']['content_icon']})
106
+ ),
107
+ el("span",{className:"wpdevar_likebox_head_title"},"WpDevArt Like box"
108
+
109
+ ),
110
+ el("span",{className:"open_or_closed"},
111
+
112
+ ),
113
+ );
114
+ }
115
+
116
+ function create_content(){
117
+ var wpda_likebox_fields=new Array();
118
+ var font_familis={"Arial,Helvetica Neue,Helvetica,sans-serif":"Arial *","Arial Black,Arial Bold,Arial,sans-serif":"Arial Black *","Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif":"Arial Narrow *","Courier,Verdana,sans-serif":"Courier *","Georgia,Times New Roman,Times,serif":"Georgia *","Times New Roman,Times,Georgia,serif":"Times New Roman *","Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif":"Trebuchet MS *","Verdana,sans-serif":"Verdana *","American Typewriter,Georgia,serif":"American Typewriter","Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif":"Andale Mono","Baskerville,Times New Roman,Times,serif":"Baskerville","Bookman Old Style,Georgia,Times New Roman,Times,serif":"Bookman Old Style","Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif":"Calibri","Cambria,Georgia,Times New Roman,Times,serif":"Cambria","Candara,Verdana,sans-serif":"Candara","Century Gothic,Apple Gothic,Verdana,sans-serif":"Century Gothic","Century Schoolbook,Georgia,Times New Roman,Times,serif":"Century Schoolbook","Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif":"Consolas","Constantia,Georgia,Times New Roman,Times,serif":"Constantia","Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif":"Corbel","Franklin Gothic Medium,Arial,sans-serif":"Franklin Gothic Medium","Garamond,Hoefler Text,Times New Roman,Times,serif":"Garamond","Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif":"Gill Sans MT","Helvetica Neue,Helvetica,Arial,sans-serif":"Helvetica Neue","Hoefler Text,Garamond,Times New Roman,Times,sans-serif":"Hoefler Text","Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif":"Lucida Bright","Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif":"Lucida Grande","monospace":"monospace","Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif":"Palatino Linotype","Tahoma,Geneva,Verdana,sans-serif":"Tahoma","Rockwell, Arial Black, Arial Bold, Arial, sans-serif":"Rockwell"};
119
+ var animation_efects={"none":"none","random":"random","bounce":"bounce","flash":"flash","pulse":"pulse","rubberBand":"rubberBand","shake":"shake","swing":"swing","tada":"tada","wobble":"wobble","bounceIn":"bounceIn","bounceInDown":"bounceInDown","bounceInLeft":"bounceInLeft","bounceInRight":"bounceInRight","bounceInUp":"bounceInUp","fadeIn":"fadeIn","fadeInDown":"fadeInDown","fadeInDownBig":"fadeInDownBig","fadeInLeft":"fadeInLeft","fadeInLeftBig":"fadeInLeftBig","fadeInRight":"fadeInRight","fadeInRightBig":"fadeInRightBig","fadeInUp":"fadeInUp","fadeInUpBig":"fadeInUpBig","flip":"flip","flipInX":"flipInX","flipInY":"flipInY","lightSpeedIn":"lightSpeedIn","rotateIn":"rotateIn","rotateInDownLeft":"rotateInDownLeft","rotateInDownRight":"rotateInDownRight","rotateInUpLeft":"rotateInUpLeft","rotateInUpRight":"rotateInUpRight","rollIn":"rollIn","zoomIn":"zoomIn","zoomInDown":"zoomInDown","zoomInLeft":"zoomInLeft","zoomInRight":"zoomInRight","zoomInUp":"zoomInUp"};
120
+
121
+
122
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_input("like_box_profile_id","Page ID:","Type here your Facebook like box page url(without https://www.facebook.com/, if your Facebook page url is https://www.facebook.com/uefacom then type here just uefacom)."));
123
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_select("animation_efect",animation_efects,"Like box Animation:","Choose Facebook like box Animation type.",true));
124
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_select("show_border",{"show":"Show","hide":"Hide"},"Show/Hide Like box border:","Show/Hide Facebook like box border.",true));
125
+ wpda_likebox_fields.push(wpda_likebox_lb_color_input("border_color","Like box Border color:","Type the Border Color of your Facebook Like box.",true));
126
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_select("stream",{"show":"Show","hide":"Hide"},"Show/Hide Page Posts:","Show/Hide the Page Posts from your Facebook Like box.",true));
127
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_select("connections",{"show":"Show","hide":"Hide"},"Select to Show/Hide Friends Faces:","Select to Show/Hide Friends Faces"));
128
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_input("width","Like box Width:","Type Facebook Like box width"));
129
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_input("height","Like box Height:","Type Facebook Like box height"));
130
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_select("header",{"small":"Small","big":"Big"},"Select Like box Header size","Select Like box Header size"));
131
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_select("cover_photo",{"show":"Show","hide":"Hide"},"Like box cover photo","Select to show/hide Like box cover photo"));
132
+ wpda_likebox_fields.push(wpda_likebox_lb_simple_input_with_small("locale","Like box language:","Type the Facebook Like box language code.",'(en_US, de_DE...)'));
133
+
134
+ var table=el("tabel",{className:"wpdevart_likebox_content_block"},wpda_likebox_fields)
135
+ return el("div",{className:"wpdevart_likebox_content_block"},table)
136
+ }
137
+
138
+ function open_close_element(colapsible_element){
139
+ var target=colapsible_element.target;
140
+ var head_element;
141
+ if(target.parentNode.classList[0]=="wpdevart_likebox_main_collapsible_element"){
142
+ head_element=target.parentNode;
143
+ }
144
+ if(target.parentNode.parentNode.classList[0]=="wpdevart_likebox_main_collapsible_element"){
145
+ head_element=target.parentNode.parentNode;
146
+ }
147
+ if(target.parentNode.parentNode.parentNode.classList[0]=="wpdevart_likebox_main_collapsible_element"){
148
+ head_element=target.parentNode.parentNode.parentNode;
149
+ }
150
+ if(target.parentNode.parentNode.parentNode.parentNode.classList[0]=="wpdevart_likebox_main_collapsible_element"){
151
+ head_element=target.parentNode.parentNode.parentNode.parentNode;
152
+ }
153
+ if(typeof(head_element.classList[1])=="undefined"){
154
+ props.setAttributes( { open_or_close:false } );
155
+ head_element.classList.add("closed_params");
156
+ }else{
157
+ props.setAttributes( { open_or_close:true } );
158
+ head_element.classList.remove("closed_params");
159
+ }
160
+ }
161
+
162
+ function wpda_likebox_lb_simple_input(element_name,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
163
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name+" "+aditional_classes,style:aditional_css},
164
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
165
+ el('td',{className:"wpda_simple_input_td"},
166
+ el('input',{type:"text",Value:props.attributes[element_name],onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},className:'wpda_simple_input',onChange: function( value ) {var select=value.target; var params={}; params[element_name]=select.value; props.setAttributes(params)}})
167
+ )
168
+
169
+ );
170
+
171
+ }
172
+
173
+ function wpda_likebox_lb_simple_input_with_small(element_name,element_title,element_description,pro_feature=false,small_text,aditional_css={},aditional_classes=""){
174
+ return el('tr',{adgsdfghs:"dfghdfhjsghsfdg",className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name+" "+aditional_classes,style:aditional_css},
175
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
176
+ el('td',{className:"wpda_simple_input_td"},
177
+ el('input',{type:"text",Value:props.attributes[element_name],onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},className:'wpda_simple_input',onChange: function( value ) {var select=value.target; var params={}; params[element_name]=select.value; props.setAttributes(params)}}),
178
+ el('small',{className:'wpda_likebox_small_text'},small_text)
179
+ )
180
+
181
+ );
182
+
183
+ }
184
+
185
+ function wpda_likebox_lb_simple_textarea(element_name,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
186
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name+" "+aditional_classes,style:aditional_css},
187
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
188
+ el('td',{className:"wpda_simple_input_td"},
189
+ el('textarea',{type:"text",className:'wpda_simple_input',onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},onChange: function( value ) {var select=value.target; var params={}; params[element_name]=select.value; props.setAttributes(params)}},props.attributes[element_name])
190
+ )
191
+
192
+ );
193
+
194
+ }
195
+
196
+ function wpda_likebox_lb_simple_select(element_name,options_list,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
197
+ var created_options=new Array();
198
+ for(var key in options_list) {
199
+ selected_option=false;
200
+ if(props.attributes[element_name]==key){
201
+ selected_option=true;
202
+ }
203
+ created_options.push(el('option',{value:''+key+'',selected:selected_option},options_list[key]))
204
+ }
205
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name+" "+aditional_classes, style:aditional_css},
206
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
207
+ el('td',{className:"wpda_simple_input_td"},
208
+ el( 'select', { className: "wpda_likebox_select",onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},onChange: function( value ) {var select=value.target; var params={}; params[element_name]=select.options[select.selectedIndex].value; props.setAttributes( params)}},created_options),
209
+ )
210
+ );
211
+
212
+ }
213
+
214
+ function wpda_likebox_lb_select_open_hide_params(element_name,options_list,open_closed_ids,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
215
+ var created_options=new Array();
216
+
217
+ for(var key in options_list) {
218
+ selected_option=false;
219
+ if(props.attributes[element_name]==key){
220
+ selected_option=true;
221
+ }
222
+ created_options.push(el('option',{value:''+key+'',selected:selected_option},options_list[key]))
223
+ }
224
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name},
225
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
226
+ el('td',{className:"wpda_simple_input_td"},
227
+ el( 'select', { className: "wpda_likebox_select",onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},onChange: function( value ) {
228
+ var select=value.target;
229
+ var curent_element_parent_div=select.parentNode.parentNode.parentNode;
230
+ var params={};
231
+ params[element_name]=select.options[select.selectedIndex].value;
232
+
233
+ for(var i=0;i<open_closed_ids.length;i++){
234
+ for(var j=0;j<curent_element_parent_div.getElementsByClassName("wpda_likebox_"+open_closed_ids[i]).length;j++){
235
+ curent_element_parent_div.getElementsByClassName("wpda_likebox_"+open_closed_ids[i])[j].style.display="none";
236
+ }
237
+
238
+ }
239
+ for(i=0;i<curent_element_parent_div.getElementsByClassName("wpda_likebox_"+open_closed_ids[select.selectedIndex]).length;i++){
240
+ curent_element_parent_div.getElementsByClassName("wpda_likebox_"+open_closed_ids[select.selectedIndex])[i].style.display="initial";
241
+ }
242
+ props.setAttributes( params );
243
+ }
244
+ },created_options),
245
+ )
246
+ );
247
+
248
+ }
249
+
250
+ function wpda_likebox_lb_days_hourse_minutes(element_day_name,element_hour_name,element_minut_name,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
251
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_day_name+" "+aditional_classes, style:aditional_css},
252
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
253
+ el('td',{className:"wpda_simple_input_td"},
254
+ el('span',{className:'wpda_simple_span_time'},
255
+ el('input',{seze:"3",type:"text",Value:props.attributes[element_day_name],onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},className:'wpda_simple_input_time',onChange: function( value ) {var select=value.target; var params={}; params[element_day_name]=select.value; props.setAttributes(params)}}),
256
+ el("small",{className:"wpda_simple_input_time_small"},"Day")
257
+ ),
258
+ el('span',{className:'wpda_simple_span_time'},
259
+ el('input',{seze:"3",type:"text",Value:props.attributes[element_hour_name],onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},className:'wpda_simple_input_time',onChange: function( value ) {var select=value.target; var params={}; params[element_hour_name]=select.value; props.setAttributes(params)}}),
260
+ el("small",{className:"wpda_simple_input_time_small"},"Hour")
261
+ ),
262
+ el('span',{className:'wpda_simple_span_time'},
263
+ el('input',{seze:"3",type:"text",Value:props.attributes[element_minut_name],onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},className:'wpda_simple_input_time',onChange: function( value ) {var select=value.target; var params={}; params[element_minut_name]=select.value; props.setAttributes(params)}}),
264
+ el("small",{className:"wpda_simple_input_time_small"},"Minut")
265
+ )
266
+ )
267
+
268
+ );
269
+
270
+ }
271
+
272
+ function wpda_likebox_lb_calendar_input(element_name,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
273
+ if(props.attributes[element_name]===""){
274
+ var date=currentdate.getFullYear()+"-"+(currentdate.getMonth()+1)+"-"+currentdate.getDate() + "T"+((currentdate.getHours() < 10)?"0":"") + currentdate.getHours() +":"+ ((currentdate.getMinutes() < 10)?"0":"") + currentdate.getMinutes() +":"+ ((currentdate.getSeconds() < 10)?"0":"") + currentdate.getSeconds();
275
+ var params={};
276
+ params[element_name]=date;
277
+ props.setAttributes(params);
278
+ }
279
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name+" "+aditional_classes, style:aditional_css},
280
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
281
+ el('td',{className:"wpda_simple_input_td"},
282
+ el(components.DateTimePicker,{type:"input",currentDate:props.attributes[element_name], onChange: function( value ) { var params={}; params[element_name]=value; props.setAttributes(params)}})
283
+ )
284
+
285
+ );
286
+
287
+ }
288
+
289
+ function wpda_likebox_lb_color_input(element_name,element_title,element_description,pro_feature=false,aditional_css={},aditional_classes=""){
290
+ return el('tr',{className:"wpda_simple_input_tr "+"wpda_likebox_"+element_name+" "+aditional_classes,style:aditional_css},
291
+ wpda_likebox_title_and_description(element_title,element_description,pro_feature),
292
+ el('td',{className:"wpda_color_input_td"},
293
+ el('input',{type:"color",Value:props.attributes[element_name],onMouseDown:function(){if(pro_feature){alert(pro_feature_text); return false;}},className:'wpda_simple_input',onChange: function( value ) {var select=value.target; var params={}; params[element_name]=select.value; props.setAttributes(params)}})
294
+ )
295
+
296
+ );
297
+
298
+ }
299
+
300
+ function wpda_likebox_title_and_description(element_title,element_description,pro_feature=false){
301
+ if(pro_feature){
302
+ var pro_element=el("span",{className:"pro_feature"}," (pro)");
303
+ }else{
304
+ var pro_element="";
305
+ }
306
+ return el('td',{className:"wpda_title_description_td"},
307
+ el('span',{className:"wpda_likebox_element_title"},element_title
308
+
309
+ ),
310
+ pro_element,
311
+
312
+ el('span',{className:"wpda_likebox_element_description",title:element_description},"?"
313
+ )
314
+ )
315
+ }
316
+ },
317
+
318
+ save: function( props ) {
319
+ var shortcode_atributes="";
320
+
321
+ shortcode_atributes = shortcode_atributes + ' profile_id="' + props.attributes.like_box_profile_id + '"';
322
+ shortcode_atributes = shortcode_atributes + ' animation_efect="' + props.attributes.animation_efect + '"';
323
+ shortcode_atributes = shortcode_atributes + ' show_border="' + props.attributes.show_border + '"';
324
+ shortcode_atributes = shortcode_atributes + ' border_color="' + props.attributes.border_color + '"';
325
+ shortcode_atributes = shortcode_atributes + ' stream="' + props.attributes.stream + '"';
326
+ shortcode_atributes = shortcode_atributes + ' connections="' + props.attributes.connections + '"';
327
+ shortcode_atributes = shortcode_atributes + ' width="' + props.attributes.width + '"';
328
+ shortcode_atributes = shortcode_atributes + ' height="' + props.attributes.height + '"';
329
+ shortcode_atributes = shortcode_atributes + ' header="' + props.attributes.header + '"';
330
+ shortcode_atributes = shortcode_atributes + ' show_cover_photo="' + props.attributes.cover_photo + '"';
331
+ shortcode_atributes = shortcode_atributes + ' locale="' + props.attributes.locale + '"';
332
+ return "[wpdevart_like_box " + shortcode_atributes + "]";
333
+ }
334
+
335
+ } )
336
+ } )(
337
+ window.wp.blocks,
338
+ window.wp.editor,
339
+ window.wp.i18n,
340
+ window.wp.element,
341
+ window.wp.components,
342
+ window._,
343
+ );
344
+
includes/gutenberg/gutenberg.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class wpda_like_box_gutenberg{
3
+ private $plugin_url;
4
+ function __construct($plugin_url){
5
+ $this->plugin_url=$plugin_url;
6
+ $this->hooks_for_gutenberg();
7
+ }
8
+ private function hooks_for_gutenberg(){
9
+ add_action( 'init', array($this,'guthenberg_init') );
10
+ }
11
+ public function guthenberg_init(){
12
+ if ( ! function_exists( 'register_block_type' ) ) {
13
+ // Gutenberg is not active.
14
+ return;
15
+ }
16
+ register_block_type( 'wpdevart-likebox/likebox', array(
17
+ 'style' => 'wpda_like_box_gutenberg_css',
18
+ 'editor_script' => 'wpda_like_box_gutenberg_js',
19
+ ) );
20
+ wp_add_inline_script(
21
+ 'wpda_like_box_gutenberg_js',
22
+ sprintf('var wpda_likebox_gutenberg = {other_data: %s};',json_encode($this->other_dates(),JSON_PRETTY_PRINT)),
23
+ 'before'
24
+ );
25
+ }
26
+
27
+ private function other_dates(){
28
+ $array=array('icon_src'=>$this->plugin_url."images/facebook_menu_icon.png","content_icon"=>$this->plugin_url."images/facebook_menu_icon.png");
29
+ return $array;
30
+ }
31
+ }
32
+
includes/gutenberg/style.css ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Note that these styles are loaded *before* editor styles, so that
3
+ * editor-specific styles using the same selectors will take precedence.
4
+ */
5
+
6
+ .wpdevart_likebox_content_block{
7
+ display: block;
8
+ }
9
+
10
+ .wpdevart_likebox_content_block > tr{
11
+ min-height: 40px;
12
+ }
13
+ .wpdevart_likebox_main_collapsible_element{
14
+ background-color: #fafafa;
15
+ display: inline-block;
16
+ width: 100%;
17
+ box-sizing: border-box !important;
18
+ position: relative;
19
+ min-width: 430px;
20
+ border: 1px solid #e5e5e5;
21
+ -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
22
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
23
+ margin-bottom: 20px;
24
+ padding: 0;
25
+ line-height: 1;
26
+ padding-left: 3px;
27
+ }
28
+ .wpdevart_likebox_main_collapsible_element.closed_params .wpdevart_likebox_content_block{
29
+ display: none;
30
+ }
31
+ .wpdevart_likebox_main_collapsible_element .title_image img{
32
+ height: 34px;
33
+ float: left;
34
+ padding-top: 2px;
35
+
36
+ }
37
+ .wpdevart_likebox_content_block > tr:nth-child(odd) {
38
+ background-color: rgba(176, 176, 176, 0.07);
39
+ }
40
+ .wpdevart_likebox_main_collapsible_element .wpdevar_likebox_head_title{
41
+ display: inline-block;
42
+ -webkit-user-select: none;
43
+ -moz-user-select: none;
44
+ -ms-user-select: none;
45
+ user-select: none;
46
+ font-weight: bold;
47
+ font-size: 15px;
48
+ padding: 8px 12px;
49
+ margin: 0;
50
+ line-height: 1.4;
51
+ }
52
+ .wpdevart_likebox_main_collapsible_element .head_block{
53
+ cursor: pointer;
54
+ border-bottom: 1px solid #e5e5e5;
55
+ }
56
+ .wpdevart_likebox_main_collapsible_element .head_block .open_or_closed {
57
+ float: right;
58
+ height: 20px;
59
+ right: 10px;
60
+ color: #aaa;
61
+ font: 400 20px/1 dashicons;
62
+ speak: none;
63
+ display: inline-block;
64
+ top: 8px;
65
+ position: relative;
66
+ -webkit-font-smoothing: antialiased;
67
+ -moz-osx-font-smoothing: grayscale;
68
+ text-decoration: none!important;
69
+ }
70
+ .wpdevart_likebox_main_collapsible_element .head_block:hover .open_or_closed{
71
+ color:#777
72
+ }
73
+ .wpdevart_likebox_main_collapsible_element .head_block .open_or_closed:before{
74
+ content: '\f142';
75
+ }
76
+ .wpdevart_likebox_main_collapsible_element.closed_params .head_block .open_or_closed:before{
77
+ content: '\f140';
78
+ }
79
+ .wpdevart_likebox_content_block .wpda_simple_input_td,.wpdevart_likebox_content_block .wpda_color_input_td{
80
+ width:100%;
81
+ vertical-align: middle;
82
+ padding-left: 3px;
83
+ }
84
+ .wpdevart_likebox_content_block .wpda_title_description_td{
85
+ min-width: 320px;
86
+ line-height: 21px;
87
+ vertical-align: middle;
88
+ height: 45px;
89
+ font-size: 14px;
90
+ font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
91
+ }
92
+
93
+ .wpda_likebox_element_description{
94
+ float: right;
95
+ cursor: default;
96
+ color: #0074a2;
97
+ font-size: 18px;
98
+ font-weight: bold;
99
+ border: 1px solid #000000;
100
+ border-radius: 200px;
101
+ height: 23px;
102
+ padding-left: 6px;
103
+ padding-right: 6px;
104
+ margin-left: 15px;
105
+ }
106
+
107
+ .wpda_simple_input_time{
108
+ width:50px;
109
+ }
110
+ .wpda_simple_span_time{
111
+ display: inline-block;
112
+ margin-right: 3px;
113
+ width: 55px;
114
+ }
115
+ .wpdevart_likebox_content_block .components-datetime__date-help-button,
116
+ .wpdevart_likebox_content_block .components-datetime__date{
117
+ display:none !important;
118
+ }
119
+ .wpda_simple_input_td fieldset{
120
+ display: inline-block;
121
+ }
122
+ .wpda_simple_input_td .components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number] {
123
+ width: 30px;
124
+ padding: 0px;
125
+ }
126
+ .wpda_simple_input_td .components-datetime__time {
127
+ margin-bottom: 5px;
128
+ }
129
+ .wpda_color_input_td input{
130
+ padding: 0px !important;
131
+ width: 105px;
132
+ height: 30px;
133
+ }
134
+ .pro_feature {
135
+ font-size: 13px;
136
+ font-weight: bold;
137
+ color: rgba(10, 154, 62, 1);
138
+ }
139
+ .wpdevart_likebox_upgrate_pro_link_td{
140
+ text-align: center;
141
+ height: 31px;
142
+ vertical-align: middle;
143
+ }
like-box.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WpDevArt Social Like Box
4
  Plugin URI: https://wordpress.org/plugins/like-box
5
  Description: WpDevArt Social (Facebook) like box plugin will help you to display Facebook like box on your wesite, just add Facebook Like box widget to your sidebar and use it. Also you can use Facebook Like box on your pages/posts and create Facebook Like box popup for your website.
6
- Version: 0.7.92
7
  Author: smplug-in
8
  Author URI: https://wpdevart.com/wordpress-facebook-like-box-plugin/
9
  License: GPL/GPL3
@@ -44,12 +44,16 @@ class like_box_main{
44
 
45
  public function create_admin_menu(){
46
 
 
 
47
  require_once($this->like_box_plugin_path.'includes/admin_menu.php');
48
 
49
  $like_box_admin_menu = new like_box_admin_menu(array('menu_name' => 'Like Box','databese_parametrs'=>$this->like_box_options));
50
 
51
  add_action('admin_menu', array($like_box_admin_menu,'create_menu'));
52
 
 
 
53
  }
54
 
55
  /*############ Install database Function ##################*/
@@ -83,6 +87,9 @@ class like_box_main{
83
  wp_register_style('animated',$this->like_box_plugin_url.'includes/style/effects.css');
84
  wp_register_style('like-box-admin-style',$this->like_box_plugin_url.'includes/style/admin-style.css');
85
 
 
 
 
86
  }
87
 
88
  /*############ Call Base Filters Function ##################*/
3
  Plugin Name: WpDevArt Social Like Box
4
  Plugin URI: https://wordpress.org/plugins/like-box
5
  Description: WpDevArt Social (Facebook) like box plugin will help you to display Facebook like box on your wesite, just add Facebook Like box widget to your sidebar and use it. Also you can use Facebook Like box on your pages/posts and create Facebook Like box popup for your website.
6
+ Version: 0.7.93
7
  Author: smplug-in
8
  Author URI: https://wpdevart.com/wordpress-facebook-like-box-plugin/
9
  License: GPL/GPL3
44
 
45
  public function create_admin_menu(){
46
 
47
+ require_once($this->like_box_plugin_path.'includes/gutenberg/gutenberg.php');
48
+
49
  require_once($this->like_box_plugin_path.'includes/admin_menu.php');
50
 
51
  $like_box_admin_menu = new like_box_admin_menu(array('menu_name' => 'Like Box','databese_parametrs'=>$this->like_box_options));
52
 
53
  add_action('admin_menu', array($like_box_admin_menu,'create_menu'));
54
 
55
+ $like_box_gutenberg = new wpda_like_box_gutenberg($this->like_box_plugin_url);
56
+
57
  }
58
 
59
  /*############ Install database Function ##################*/
87
  wp_register_style('animated',$this->like_box_plugin_url.'includes/style/effects.css');
88
  wp_register_style('like-box-admin-style',$this->like_box_plugin_url.'includes/style/admin-style.css');
89
 
90
+ wp_register_script('wpda_like_box_gutenberg_js',$this->like_box_plugin_url.'includes/gutenberg/block.js',array( 'wp-element', 'wp-blocks', 'wp-i18n', 'wp-editor', 'underscore' ));
91
+ wp_register_style('wpda_like_box_gutenberg_css',$this->like_box_plugin_url.'includes/gutenberg/style.css');
92
+
93
  }
94
 
95
  /*############ Call Base Filters Function ##################*/
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: smplug-in
3
  Tags: facebook like box, Facebook like box widget, like box, Facebook Page, Facebook
4
  Requires at least: 2.9
5
- Tested up to: 5.4.2
6
- Stable tag: 0.7.92
7
 
8
  WordPress Facebook Like box plugin will help you to display like box on your website, just add our plugin widget to your sidebar and use it. Also you can use our plugin on your pages/posts and create fan page popup for your website.
9
 
@@ -528,6 +528,10 @@ Contact us at support@wpdevart.com and we will send you the pro version.
528
 
529
  * Added support URL in admin panel.
530
 
 
 
 
 
531
  ==Step by step guide==
532
 
533
  ### Adding to the sidebar.
2
  Contributors: smplug-in
3
  Tags: facebook like box, Facebook like box widget, like box, Facebook Page, Facebook
4
  Requires at least: 2.9
5
+ Tested up to: 5.5
6
+ Stable tag: 0.7.93
7
 
8
  WordPress Facebook Like box plugin will help you to display like box on your website, just add our plugin widget to your sidebar and use it. Also you can use our plugin on your pages/posts and create fan page popup for your website.
9
 
528
 
529
  * Added support URL in admin panel.
530
 
531
+ = 0.7.93 =
532
+
533
+ * Added post/page shortcode button.
534
+
535
  ==Step by step guide==
536
 
537
  ### Adding to the sidebar.