WpDevArt Facebook comments - Version 2.5.0

Version Description

=

  • Bug fixed.
Download this release

Release Info

Developer wpdevart
Plugin Icon 128x128 WpDevArt Facebook comments
Version 2.5.0
Comparing to
See all releases

Code changes from version 2.4.9 to 2.5.0

facebook-comment.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wpdevart.com/wordpress-facebook-comments-plugin
5
  * Author URI: https://wpdevart.com
6
  * Description: Social (Facebook) comments plugin will help you to display Facebook Comments box on your website. You can use Facebook Comments on your pages/posts.
7
- * Version: 2.4.9
8
  * Author: wpdevart
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
4
  * Plugin URI: https://wpdevart.com/wordpress-facebook-comments-plugin
5
  * Author URI: https://wpdevart.com
6
  * Description: Social (Facebook) comments plugin will help you to display Facebook Comments box on your website. You can use Facebook Comments on your pages/posts.
7
+ * Version: 2.5.0
8
  * Author: wpdevart
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
includes/admin_menu.php CHANGED
@@ -35,7 +35,7 @@ class wpdevart_comment_admin_menu{
35
 
36
  foreach ( $post_types as $post_type ) {
37
 
38
- add_meta_box('myplugin_sectionid', 'Disable WpDevArt Facebook comment on this page/post',array($this,'generete_html_for_wpdevart_comment_box'), $post_type );
39
  }
40
  }
41
 
@@ -159,8 +159,8 @@ class wpdevart_comment_admin_menu{
159
  ?>
160
  <script>
161
  var wpdevart_comment_ajaxurl="<?php echo admin_url( 'admin-ajax.php'); ?>";
162
- var wpdevart_comment_plugin_url="<?php echo $this->plugin_url; ?>";
163
- var wpdevart_comment_parametrs_sucsses_saved="<?php echo $this->text_parametrs['parametrs_sucsses_saved'] ?>";
164
  var wpdevart_comment_all_parametrs = <?php echo json_encode($this->databese_parametrs); ?>;
165
  </script>
166
  <div class="wpdevart_plugins_header div-for-clear">
@@ -257,7 +257,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
257
  APP ID <span style="color:#6b55f9; font-weight:bold;">Important</span> <span title="Type here the Facebook App ID. Check how to get the APP ID from the user manual from the right side" class="desription_class">?</span>
258
  </td>
259
  <td>
260
- <input type="text" name="wpdevart_comment_facebook_app_id" id="wpdevart_comment_facebook_app_id" value="<?php echo $page_parametrs['wpdevart_comment_facebook_app_id'] ?>">
261
  </td>
262
  </tr>
263
  <tr>
@@ -265,7 +265,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
265
  Title <span title="Type here the Facebook comments box title" class="desription_class">?</span>
266
  </td>
267
  <td>
268
- <input type="text" name="wpdevart_comment_title_text" id="wpdevart_comment_title_text" value="<?php echo $page_parametrs['wpdevart_comment_title_text'] ?>">
269
  </td>
270
  </tr>
271
 
@@ -286,7 +286,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
286
  Title text color <span title="Set the Facebook comments box title color" class="desription_class">?</span>
287
  </td>
288
  <td>
289
- <input type="text" class="color_option" id="wpdevart_comment_title_text_color" name="wpdevart_comment_title_text_color" value="<?php echo $page_parametrs['wpdevart_comment_title_text_color'] ?>"/>
290
  </td>
291
  </tr>
292
  <tr>
@@ -294,7 +294,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
294
  Title font-size <span title="Type the Facebook comments box title font-size(px)" class="desription_class">?</span>
295
  </td>
296
  <td>
297
- <input type="text" name="wpdevart_comment_title_text_font_size" id="wpdevart_comment_title_text_font_size" value="<?php echo $page_parametrs['wpdevart_comment_title_text_font_size'] ?>">Px
298
  </td>
299
  </tr>
300
  <tr>
@@ -326,7 +326,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
326
  <input id="wpdevart_comment_show_in_home" type="checkbox" value="home" class="" size="" <?php checked($jsone_wpdevart_comments_box_show_in['home'],true) ?>><small>Home</small><br>
327
  <input id="wpdevart_comment_show_in_post" type="checkbox" value="post" class="" size="" <?php checked($jsone_wpdevart_comments_box_show_in['post'],true) ?>><small>Post</small><br>
328
  <input id="wpdevart_comment_show_in_page" type="checkbox" value="page" class="" size="" <?php checked($jsone_wpdevart_comments_box_show_in['page'],true) ?>><small>Page</small><br>
329
- <input type="hidden" id="wpdevart_comments_box_show_in" class="wpdevart_comment_hidden_parametr" value='<?php echo stripslashes($page_parametrs['wpdevart_comments_box_show_in']); ?>'>
330
 
331
  </td>
332
  </tr>
@@ -347,7 +347,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
347
  Comments box width <span title="Type here the Facebook comments box width(px)" class="desription_class">?</span>
348
  </td>
349
  <td>
350
- <input type="text" name="wpdevart_comments_box_width" id="wpdevart_comments_box_width" value="<?php echo $page_parametrs['wpdevart_comments_box_width'] ?>">
351
  </td>
352
  </tr>
353
  <tr>
@@ -355,7 +355,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
355
  Number of comments <span title="Type here the number of comments to display" class="desription_class">?</span>
356
  </td>
357
  <td>
358
- <input type="text" name="wpdevart_comments_box_count_of_comments" id="wpdevart_comments_box_count_of_comments" value="<?php echo $page_parametrs['wpdevart_comments_box_count_of_comments'] ?>">
359
  </td>
360
  </tr>
361
  <tr >
@@ -382,7 +382,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
382
  Default language <span title="Type here the default language code(en_US,de_DE...) of the Facebook comments box" class="desription_class">?</span>
383
  </td>
384
  <td>
385
- <input type="text" name="wpdevart_comments_box_locale" id="wpdevart_comments_box_locale" value="<?php echo $page_parametrs['wpdevart_comments_box_locale'] ?>">(en_US,de_DE...)
386
  </td>
387
  </tr>
388
  <tr>
@@ -624,11 +624,11 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
624
  <h1 style="text-align: center;font-size: 50px;font-weight: 700;color: #2b2350;margin: 20px auto 25px;line-height: 1.2;">Featured Plugins</h1>
625
  <?php foreach($plugins_array as $key=>$plugin) { ?>
626
  <div class="featured_plugin_main">
627
- <div class="featured_plugin_image"><a target="_blank" href="<?php echo $plugin['site_url'] ?>"><img src="<?php echo $plugin['image_url'] ?>"></a></div>
628
  <div class="featured_plugin_information">
629
- <div class="featured_plugin_title"><h4><a target="_blank" href="<?php echo $plugin['site_url'] ?>"><?php echo $plugin['title'] ?></a></h4></div>
630
- <p class="featured_plugin_description"><?php echo $plugin['description'] ?></p>
631
- <a target="_blank" href="<?php echo $plugin['site_url'] ?>" class="blue_button">Check The Plugin</a>
632
  </div>
633
  <div style="clear:both"></div>
634
  </div>
@@ -640,7 +640,7 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
640
 
641
  private function create_select_element_for_font($select_id='',$curent_font='none'){
642
  ?>
643
- <select id="<?php echo $select_id; ?>" name="<?php echo $select_id; ?>">
644
 
645
  <option <?php selected('Arial,Helvetica Neue,Helvetica,sans-serif',$curent_font); ?> value="Arial,Helvetica Neue,Helvetica,sans-serif">Arial *</option>
646
  <option <?php selected('Arial Black,Arial Bold,Arial,sans-serif',$curent_font); ?> value="Arial Black,Arial Bold,Arial,sans-serif">Arial Black *</option>
@@ -725,10 +725,10 @@ Also, here is another tutorial(from other source) of creating App Id, you can ch
725
  $content.='<div class="hire_expert_main">';
726
  foreach($plugins_array as $key=>$plugin) {
727
  $content.='<div class="wpdevart_hire_main"><a target="_blank" class="wpdev_hire_buklet" href="https://wpdevart.com/hire-wordpress-developer-dedicated-experts-are-ready-to-help/">';
728
- $content.='<div class="wpdevart_hire_image"><img src="'.$plugin["image_url"].'"></div>';
729
  $content.='<div class="wpdevart_hire_information">';
730
- $content.='<div class="wpdevart_hire_title">'.$plugin["title"].'</div>';
731
- $content.='<p class="wpdevart_hire_description">'.$plugin["description"].'</p>';
732
  $content.='</div></a></div>';
733
  }
734
  $content.='<div><a target="_blank" class="wpdev_hire_button" href="https://wpdevart.com/hire-wordpress-developer-dedicated-experts-are-ready-to-help/">Hire an Expert</a></div>';
35
 
36
  foreach ( $post_types as $post_type ) {
37
 
38
+ add_meta_box('myplugin_sectionid', 'Disable WpDevArt Facebook comment on this page/post', array($this,'generete_html_for_wpdevart_comment_box'), $post_type );
39
  }
40
  }
41
 
159
  ?>
160
  <script>
161
  var wpdevart_comment_ajaxurl="<?php echo admin_url( 'admin-ajax.php'); ?>";
162
+ var wpdevart_comment_plugin_url="<?php echo esc_url($this->plugin_url); ?>";
163
+ var wpdevart_comment_parametrs_sucsses_saved="<?php echo esc_html($this->text_parametrs['parametrs_sucsses_saved']); ?>";
164
  var wpdevart_comment_all_parametrs = <?php echo json_encode($this->databese_parametrs); ?>;
165
  </script>
166
  <div class="wpdevart_plugins_header div-for-clear">
257
  APP ID <span style="color:#6b55f9; font-weight:bold;">Important</span> <span title="Type here the Facebook App ID. Check how to get the APP ID from the user manual from the right side" class="desription_class">?</span>
258
  </td>
259
  <td>
260
+ <input type="text" name="wpdevart_comment_facebook_app_id" id="wpdevart_comment_facebook_app_id" value="<?php echo esc_attr($page_parametrs['wpdevart_comment_facebook_app_id']); ?>">
261
  </td>
262
  </tr>
263
  <tr>
265
  Title <span title="Type here the Facebook comments box title" class="desription_class">?</span>
266
  </td>
267
  <td>
268
+ <input type="text" name="wpdevart_comment_title_text" id="wpdevart_comment_title_text" value="<?php echo esc_attr($page_parametrs['wpdevart_comment_title_text']); ?>">
269
  </td>
270
  </tr>
271
 
286
  Title text color <span title="Set the Facebook comments box title color" class="desription_class">?</span>
287
  </td>
288
  <td>
289
+ <input type="text" class="color_option" id="wpdevart_comment_title_text_color" name="wpdevart_comment_title_text_color" value="<?php echo esc_attr($page_parametrs['wpdevart_comment_title_text_color']); ?>"/>
290
  </td>
291
  </tr>
292
  <tr>
294
  Title font-size <span title="Type the Facebook comments box title font-size(px)" class="desription_class">?</span>
295
  </td>
296
  <td>
297
+ <input type="text" name="wpdevart_comment_title_text_font_size" id="wpdevart_comment_title_text_font_size" value="<?php echo esc_attr($page_parametrs['wpdevart_comment_title_text_font_size']); ?>">Px
298
  </td>
299
  </tr>
300
  <tr>
326
  <input id="wpdevart_comment_show_in_home" type="checkbox" value="home" class="" size="" <?php checked($jsone_wpdevart_comments_box_show_in['home'],true) ?>><small>Home</small><br>
327
  <input id="wpdevart_comment_show_in_post" type="checkbox" value="post" class="" size="" <?php checked($jsone_wpdevart_comments_box_show_in['post'],true) ?>><small>Post</small><br>
328
  <input id="wpdevart_comment_show_in_page" type="checkbox" value="page" class="" size="" <?php checked($jsone_wpdevart_comments_box_show_in['page'],true) ?>><small>Page</small><br>
329
+ <input type="hidden" id="wpdevart_comments_box_show_in" class="wpdevart_comment_hidden_parametr" value='<?php echo esc_attr(stripslashes($page_parametrs['wpdevart_comments_box_show_in'])); ?>'>
330
 
331
  </td>
332
  </tr>
347
  Comments box width <span title="Type here the Facebook comments box width(px)" class="desription_class">?</span>
348
  </td>
349
  <td>
350
+ <input type="text" name="wpdevart_comments_box_width" id="wpdevart_comments_box_width" value="<?php echo esc_attr($page_parametrs['wpdevart_comments_box_width']); ?>">
351
  </td>
352
  </tr>
353
  <tr>
355
  Number of comments <span title="Type here the number of comments to display" class="desription_class">?</span>
356
  </td>
357
  <td>
358
+ <input type="text" name="wpdevart_comments_box_count_of_comments" id="wpdevart_comments_box_count_of_comments" value="<?php echo esc_attr($page_parametrs['wpdevart_comments_box_count_of_comments']); ?>">
359
  </td>
360
  </tr>
361
  <tr >
382
  Default language <span title="Type here the default language code(en_US,de_DE...) of the Facebook comments box" class="desription_class">?</span>
383
  </td>
384
  <td>
385
+ <input type="text" name="wpdevart_comments_box_locale" id="wpdevart_comments_box_locale" value="<?php echo esc_attr($page_parametrs['wpdevart_comments_box_locale']); ?>">(en_US,de_DE...)
386
  </td>
387
  </tr>
388
  <tr>
624
  <h1 style="text-align: center;font-size: 50px;font-weight: 700;color: #2b2350;margin: 20px auto 25px;line-height: 1.2;">Featured Plugins</h1>
625
  <?php foreach($plugins_array as $key=>$plugin) { ?>
626
  <div class="featured_plugin_main">
627
+ <div class="featured_plugin_image"><a target="_blank" href="<?php echo esc_url($plugin['site_url']); ?>"><img src="<?php echo esc_url($plugin['image_url']); ?>"></a></div>
628
  <div class="featured_plugin_information">
629
+ <div class="featured_plugin_title"><h4><a target="_blank" href="<?php echo esc_url($plugin['site_url']); ?>"><?php echo esc_html($plugin['title']); ?></a></h4></div>
630
+ <p class="featured_plugin_description"><?php echo esc_html($plugin['description']) ?></p>
631
+ <a target="_blank" href="<?php echo esc_url($plugin['site_url']); ?>" class="blue_button">Check The Plugin</a>
632
  </div>
633
  <div style="clear:both"></div>
634
  </div>
640
 
641
  private function create_select_element_for_font($select_id='',$curent_font='none'){
642
  ?>
643
+ <select id="<?php echo esc_attr($select_id); ?>" name="<?php echo esc_attr($select_id); ?>">
644
 
645
  <option <?php selected('Arial,Helvetica Neue,Helvetica,sans-serif',$curent_font); ?> value="Arial,Helvetica Neue,Helvetica,sans-serif">Arial *</option>
646
  <option <?php selected('Arial Black,Arial Bold,Arial,sans-serif',$curent_font); ?> value="Arial Black,Arial Bold,Arial,sans-serif">Arial Black *</option>
725
  $content.='<div class="hire_expert_main">';
726
  foreach($plugins_array as $key=>$plugin) {
727
  $content.='<div class="wpdevart_hire_main"><a target="_blank" class="wpdev_hire_buklet" href="https://wpdevart.com/hire-wordpress-developer-dedicated-experts-are-ready-to-help/">';
728
+ $content.='<div class="wpdevart_hire_image"><img src="'.esc_url($plugin["image_url"]).'"></div>';
729
  $content.='<div class="wpdevart_hire_information">';
730
+ $content.='<div class="wpdevart_hire_title">'.esc_html($plugin["title"]).'</div>';
731
+ $content.='<p class="wpdevart_hire_description">'.esc_html($plugin["description"]).'</p>';
732
  $content.='</div></a></div>';
733
  }
734
  $content.='<div><a target="_blank" class="wpdev_hire_button" href="https://wpdevart.com/hire-wordpress-developer-dedicated-experts-are-ready-to-help/">Hire an Expert</a></div>';
includes/front_end.php CHANGED
@@ -83,7 +83,7 @@ class wpdevart_comment_front_end{
83
  public function generete_front_javascript(){
84
  wp_enqueue_script('thickbox');
85
  wp_enqueue_style('thickbox');
86
- echo '<meta property="fb:app_id" content="'.$this->params['wpdevart_comment_facebook_app_id'].'"/>';
87
 
88
  }
89
 
@@ -114,13 +114,7 @@ class wpdevart_comment_front_end{
114
  }
115
  ?>
116
  <div id="fb-root"></div>
117
- <script async defer crossorigin="anonymous">(function(d, s, id) {
118
- var js, fjs = d.getElementsByTagName(s)[0];
119
- if (d.getElementById(id)) return;
120
- js = d.createElement(s); js.id = id;
121
- js.src = "//connect.facebook.net/<?php echo $this->params['wpdevart_comments_box_locale']; ?>/sdk.js#xfbml=1&appId=<?php echo $this->params['wpdevart_comment_facebook_app_id']; ?>&version=v10.0";
122
- fjs.parentNode.insertBefore(js, fjs);
123
- }(document, 'script', 'facebook-jssdk'));</script>
124
  <?php
125
  }
126
  /*Function for creating content Iframe*/
83
  public function generete_front_javascript(){
84
  wp_enqueue_script('thickbox');
85
  wp_enqueue_style('thickbox');
86
+ echo '<meta property="fb:app_id" content="'.esc_attr($this->params['wpdevart_comment_facebook_app_id']).'"/>';
87
 
88
  }
89
 
114
  }
115
  ?>
116
  <div id="fb-root"></div>
117
+ <script async defer crossorigin="anonymous" src="https://connect.facebook.net/<?php echo esc_html($this->params['wpdevart_comments_box_locale']); ?>/sdk.js#xfbml=1&version=v13.0&appId=<?php echo esc_attr($this->params['wpdevart_comment_facebook_app_id']); ?>&autoLogAppEvents=1"></script>
 
 
 
 
 
 
118
  <?php
119
  }
120
  /*Function for creating content Iframe*/
includes/library.php CHANGED
@@ -22,8 +22,7 @@ class wpdevart_comment_setting{
22
  self::$id_for_iframe++;
23
  $output_code='';
24
  //Iframe default parameters
25
- $defaults=array(
26
-
27
  "iframe_id" => 'wpdevar_comment_'.self::$id_for_iframe,
28
  "facebook_app_id" => '',
29
  "order_type" => 'social',
@@ -49,10 +48,10 @@ class wpdevart_comment_setting{
49
  );
50
  $comment_box_src=add_query_arg($comment_box_array_query,'https://www.facebook.com/plugins/comments.php');
51
 
52
- $output_code.='<div id="'.$params['iframe_id'].'" style="width:'.( (strpos($params['width'],'%')===false)?$params['width'].'px':$params['width']).';text-align:'.$params['title_text_position'].';">
53
- <span style="padding: 10px;font-size:'.$params['title_text_font_size'].'px;font-family:'.$params['title_text_font_famely'].';color:'.$params['title_text_color'].';">'.$params['title_text'].'</span>
54
- <div class="fb-comments" data-href="'.$params['curent_url'].'" data-order-by="'.$params['order_type'].'" data-numposts="'.$params['count_of_comments'].'" data-width="'.$params['width'].'" style="display:block;"></div></div>';
55
- $output_code.= '<style>#'.$params['iframe_id'].' span,#'.$params['iframe_id'].' iframe{'.( (strpos($params['width'],'%')===false)?'':'width:'.$params['width'].' !important;').'} #'.$params['iframe_id'].' iframe{max-height: 100% !important;}</style>';
56
  return $output_code;
57
  }
58
 
22
  self::$id_for_iframe++;
23
  $output_code='';
24
  //Iframe default parameters
25
+ $defaults=array(
 
26
  "iframe_id" => 'wpdevar_comment_'.self::$id_for_iframe,
27
  "facebook_app_id" => '',
28
  "order_type" => 'social',
48
  );
49
  $comment_box_src=add_query_arg($comment_box_array_query,'https://www.facebook.com/plugins/comments.php');
50
 
51
+ $output_code.='<div id="'.esc_attr($params['iframe_id']).'" style="width:'.( (strpos($params['width'],'%')===false)?esc_attr($params['width']).'px':esc_attr($params['width'])).';text-align:'.esc_attr($params['title_text_position']).';">
52
+ <span style="padding: 10px;font-size:'.esc_attr($params['title_text_font_size']).'px;font-family:'.esc_attr($params['title_text_font_famely']).';color:'.esc_attr($params['title_text_color']).';">'.esc_html($params['title_text']).'</span>
53
+ <div class="fb-comments" data-href="'.esc_url($params['curent_url']).'" data-order-by="'.esc_attr($params['order_type']).'" data-numposts="'.esc_attr($params['count_of_comments']).'" data-width="'.esc_attr($params['width']).'" style="display:block;"></div></div>';
54
+ $output_code.= '<style>#'.esc_attr($params['iframe_id']).' span,#'.esc_attr($params['iframe_id']).' iframe{'.( (strpos($params['width'],'%')===false)?'':'width:'.esc_attr($params['width']).' !important;').'} #'.esc_attr($params['iframe_id']).' iframe{max-height: 100% !important;}</style>';
55
  return $output_code;
56
  }
57
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wpdevart
3
  Tags: Facebook, facebook comments, social comments, comments, wordpress comments
4
  Requires at least: 2.9
5
  Tested up to: 5.9
6
- Stable tag: 2.4.9
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -104,6 +104,10 @@ Yes, If you are logged in(Fb account) then you will see the moderate options for
104
 
105
  == Changelog ==
106
 
 
 
 
 
107
  = 2.4.9 ==
108
 
109
  * Changed a default option.
3
  Tags: Facebook, facebook comments, social comments, comments, wordpress comments
4
  Requires at least: 2.9
5
  Tested up to: 5.9
6
+ Stable tag: 2.5.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
104
 
105
  == Changelog ==
106
 
107
+ = 2.5.0 ==
108
+
109
+ * Bug fixed.
110
+
111
  = 2.4.9 ==
112
 
113
  * Changed a default option.