WD Facebook Feed – Custom Facebook Feed Plugin - Version 1.0.26

Version Description

  • Fixed: Unexpected error when saving feed
  • Added: Notice to install Backup WD plugin
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Facebook Feed – Custom Facebook Feed Plugin
Version 1.0.26
Comparing to
See all releases

Code changes from version 1.0.25 to 1.0.26

admin/models/FFWDModelUninstall_ffwd.php CHANGED
@@ -1,41 +1,46 @@
1
  <?php
2
 
3
- class FFWDModelUninstall_ffwd {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function delete_db_tables() {
22
- global $wpdb;
23
- $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_info");
24
- $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_data");
25
- $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_option");
26
- $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_theme");
27
- $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_shortcode");
28
- delete_option('ffwd_admin_notice');
29
- delete_option("ffwd_version");
30
- delete_option( "ffwd_subscribe_done" );
31
- }
32
- ////////////////////////////////////////////////////////////////////////////////////////
33
- // Getters & Setters //
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- // Private Methods //
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- // Listeners //
40
- ////////////////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
41
  }
1
  <?php
2
 
3
+ class FFWDModelUninstall_ffwd
4
+ {
5
+ ////////////////////////////////////////////////////////////////////////////////////////
6
+ // Events //
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ ////////////////////////////////////////////////////////////////////////////////////////
9
+ // Constants //
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ ////////////////////////////////////////////////////////////////////////////////////////
12
+ // Variables //
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ ////////////////////////////////////////////////////////////////////////////////////////
15
+ // Constructor & Destructor //
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ public function __construct()
18
+ {
19
+ }
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ // Public Methods //
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ public function delete_db_tables()
24
+ {
25
+ global $wpdb;
26
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_info");
27
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_data");
28
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_option");
29
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_theme");
30
+ $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_shortcode");
31
+ delete_option('ffwd_admin_notice');
32
+ delete_option("ffwd_version");
33
+ delete_option("ffwd_subscribe_done");
34
+ delete_option('wds_bk_notice_status');
35
+
36
+ }
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Getters & Setters //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Private Methods //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
+ ////////////////////////////////////////////////////////////////////////////////////////
44
+ // Listeners //
45
+ ////////////////////////////////////////////////////////////////////////////////////////
46
  }
admin/views/FFWDViewInfo_ffwd.php CHANGED
@@ -73,7 +73,7 @@ class FFWDViewInfo_ffwd
73
 
74
  <form class="wrap" id="ffwd_info_form" method="post" action="admin.php?page=info_ffwd" style="width:99%;">
75
 
76
-
77
  <?php wp_nonce_field('info_ffwd', 'ffwd_nonce'); ?>
78
 
79
  <div class="ffwd_plugin_header">
@@ -592,6 +592,7 @@ class FFWDViewInfo_ffwd
592
 
593
  <script src="http://malsup.github.io/jquery.form.js"></script>
594
  <form class="wrap" method="post" id="ffwd_info_form" action="admin.php?page=info_ffwd" style="width:99%;">
 
595
  <?php wp_nonce_field('info_ffwd', 'ffwd_nonce'); ?>
596
  <!-- <span class="wd-fb-icon"></span> -->
597
  <div class="ffwd_plugin_header">
73
 
74
  <form class="wrap" id="ffwd_info_form" method="post" action="admin.php?page=info_ffwd" style="width:99%;">
75
 
76
+ <h2></h2>
77
  <?php wp_nonce_field('info_ffwd', 'ffwd_nonce'); ?>
78
 
79
  <div class="ffwd_plugin_header">
592
 
593
  <script src="http://malsup.github.io/jquery.form.js"></script>
594
  <form class="wrap" method="post" id="ffwd_info_form" action="admin.php?page=info_ffwd" style="width:99%;">
595
+ <h2></h2>
596
  <?php wp_nonce_field('info_ffwd', 'ffwd_nonce'); ?>
597
  <!-- <span class="wd-fb-icon"></span> -->
598
  <div class="ffwd_plugin_header">
admin/views/FFWDViewOptions_ffwd.php CHANGED
@@ -68,6 +68,8 @@ class FFWDViewOptions_ffwd
68
  </script>
69
  <form method="post" class="wrap" action="admin.php?page=options_ffwd" style="width:99%;">
70
  <?php wp_nonce_field('options_ffwd', 'ffwd_nonce'); ?>
 
 
71
  <div class="ffwd_plugin_header">
72
  <span class="option-icon"></span>
73
  <h2 class="ffwd_page_name">Edit options</h2>
68
  </script>
69
  <form method="post" class="wrap" action="admin.php?page=options_ffwd" style="width:99%;">
70
  <?php wp_nonce_field('options_ffwd', 'ffwd_nonce'); ?>
71
+ <h2></h2>
72
+
73
  <div class="ffwd_plugin_header">
74
  <span class="option-icon"></span>
75
  <h2 class="ffwd_page_name">Edit options</h2>
admin/views/FFWDViewThemes_ffwd.php CHANGED
@@ -150,6 +150,7 @@ class FFWDViewThemes_ffwd
150
  </div>
151
  <form class="wrap" method="post" id="themes_form" action="admin.php?page=themes_ffwd" style="width:99%;">
152
  <?php wp_nonce_field('themes_ffwd', 'ffwd_nonce'); ?>
 
153
 
154
  <div class="ffwd_plugin_header">
155
  <span class="theme_icon"></span>
150
  </div>
151
  <form class="wrap" method="post" id="themes_form" action="admin.php?page=themes_ffwd" style="width:99%;">
152
  <?php wp_nonce_field('themes_ffwd', 'ffwd_nonce'); ?>
153
+ <h2></h2>
154
 
155
  <div class="ffwd_plugin_header">
156
  <span class="theme_icon"></span>
admin/views/FFWDViewUninstall_ffwd.php CHANGED
@@ -29,6 +29,7 @@ class FFWDViewUninstall_ffwd {
29
  <form method="post" action="admin.php?page=uninstall_ffwd" style="width:99%;">
30
  <?php wp_nonce_field( 'uninstall_ffwd', 'ffwd_nonce' ); ?>
31
  <div class="wrap">
 
32
  <span class="uninstall_icon"></span>
33
  <h2>Uninstall Facebook Feed WD</h2>
34
  <p>
29
  <form method="post" action="admin.php?page=uninstall_ffwd" style="width:99%;">
30
  <?php wp_nonce_field( 'uninstall_ffwd', 'ffwd_nonce' ); ?>
31
  <div class="wrap">
32
+ <h2></h2>
33
  <span class="uninstall_icon"></span>
34
  <h2>Uninstall Facebook Feed WD</h2>
35
  <p>
css/ffwd_tables.css CHANGED
@@ -1084,4 +1084,8 @@ span.no {
1084
 
1085
  .ffwd_upgrade a, .ffwd_upgrade a:hover {
1086
  text-decoration: none !important;
1087
- }
 
 
 
 
1084
 
1085
  .ffwd_upgrade a, .ffwd_upgrade a:hover {
1086
  text-decoration: none !important;
1087
+ }
1088
+ a.button-primary
1089
+ {
1090
+ color: #FFFFFF !important;
1091
+ }
css/wd_bp_install.css ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @media only screen and (max-width: 500px) {
2
+ body #wd_backup_logo {
3
+ max-width: 100%;
4
+ }
5
+ body #wd_bp_notice_cont p {
6
+ padding-right: 25px !important;
7
+ }
8
+ }
9
+
10
+ #wd_bp_logo_notice {
11
+ width: 40px;
12
+ float: left;
13
+ margin-right: 10px;
14
+ }
15
+
16
+ #wd_bp_notice_cont {
17
+ position: relative;
18
+ }
19
+
20
+ .wds_backup_install p {
21
+ padding-top: 0px;
22
+ margin-top: 0px;
23
+ }
24
+
25
+ #wd_bp_notice_cont a {
26
+ margin: 0 5px;
27
+ }
28
+
29
+ #wd_bp_notice_cont .dashicons-dismiss:before {
30
+ content: "\f153";
31
+ background: 0 0;
32
+ color: #72777c;
33
+ display: block;
34
+ font: 400 16px/20px dashicons;
35
+ speak: none;
36
+ height: 20px;
37
+ text-align: center;
38
+ width: 20px;
39
+ -webkit-font-smoothing: antialiased;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ }
42
+
43
+ .wd_bp_notice_dissmiss {
44
+ margin-top: 5px;
45
+ }
facebook-feed-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Facebook Feed WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
6
  * Description:Facebook Feed WD is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
- * Version: 1.0.25
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -912,9 +912,71 @@ function ffwd_language_load() {
912
 
913
  add_action( 'init', 'ffwd_language_load' );
914
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
915
  function ffwd_version() {
916
 
917
- $version = '1.0.25';
918
 
919
  if ( get_option( 'ffwd_version' ) === false ) {
920
  add_option( 'ffwd_version', $version );
4
  * Plugin Name: Facebook Feed WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
6
  * Description:Facebook Feed WD is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
+ * Version: 1.0.26
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
912
 
913
  add_action( 'init', 'ffwd_language_load' );
914
 
915
+ if (!function_exists('wd_bp_install_notice')) {
916
+ $wd_bp_plugin_url = WD_FFWD_URL;
917
+ function wd_bp_script_style()
918
+ {
919
+ global $wd_bp_plugin_url;
920
+ wp_enqueue_script('wd_bck_install', $wd_bp_plugin_url . '/js/wd_bp_install.js', array('jquery'));
921
+ wp_enqueue_style('wd_bck_install', $wd_bp_plugin_url . '/css/wd_bp_install.css');
922
+ }
923
+
924
+ add_action('admin_enqueue_scripts', 'wd_bp_script_style');
925
+
926
+ /**
927
+ * Show notice to install backup plugin
928
+ */
929
+ function wd_bp_install_notice()
930
+ {
931
+ global $wd_bp_plugin_url;
932
+ $prefix = 'wds';
933
+ $meta_value = get_option('wds_bk_notice_status');
934
+ if ($meta_value === '' || $meta_value === false) {
935
+ ob_start();
936
+ ?>
937
+ <div class="notice notice-info" id="wd_bp_notice_cont">
938
+ <p>
939
+ <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/images/logo.png'; ?>">
940
+ <?php _e("Hey! Install brand new FREE", $prefix) ?>
941
+ <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
942
+ target="_blank"><?php _e("Backup WD", $prefix) ?></a>
943
+ <?php _e("plugin to keep your images and website safe.", $prefix) ?>
944
+ <a class="button button-primary"
945
+ href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
946
+ <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
947
+ </a>
948
+ </p>
949
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span
950
+ class="screen-reader-text"></span>
951
+ </button>
952
+ </div>
953
+ <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
954
+ <?php
955
+ echo ob_get_clean();
956
+ }
957
+ }
958
+
959
+
960
+ if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
961
+ add_action('admin_notices', 'wd_bp_install_notice');
962
+ }
963
+
964
+ /**
965
+ * Add usermeta to db
966
+ *
967
+ * empty: notice,
968
+ * 1 : never show again
969
+ */
970
+ function wd_bp_install_notice_status() {
971
+ update_option('wds_bk_notice_status', '1', 'no');
972
+ }
973
+ add_action('wp_ajax_wd_bp_dismiss', 'wd_bp_install_notice_status');
974
+
975
+ }
976
+
977
  function ffwd_version() {
978
 
979
+ $version = '1.0.26';
980
 
981
  if ( get_option( 'ffwd_version' ) === false ) {
982
  add_option( 'ffwd_version', $version );
framework/WDFacebookFeed.php CHANGED
@@ -1621,6 +1621,12 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
1621
  print ('Sorry, your server does not allow remote fopen or have CURL');
1622
  }
1623
  $facebook_graph_results = json_decode($facebook_graph_results, true);
 
 
 
 
 
 
1624
  return $facebook_graph_results;
1625
  }
1626
 
1621
  print ('Sorry, your server does not allow remote fopen or have CURL');
1622
  }
1623
  $facebook_graph_results = json_decode($facebook_graph_results, true);
1624
+ if (array_key_exists("error", $facebook_graph_results)) {
1625
+ if ($facebook_graph_results['error']['code'] == 2) {
1626
+ return self::decap_do_curl($facebook_graph_url);
1627
+ }
1628
+ }
1629
+
1630
  return $facebook_graph_results;
1631
  }
1632
 
images/backup_logo.png ADDED
Binary file
images/logo.png ADDED
Binary file
js/wd_bp_install.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function () {
2
+ /*Ajax hide notice forever */
3
+ jQuery(".wd_bp_notice_dissmiss").on("click", function () {
4
+ jQuery("#wd_bp_notice_cont").hide();
5
+ jQuery.post(wd_bp_url);
6
+ })
7
+ });
8
+
9
+ // Set option status 1 - never show again during install btn click in notice
10
+ function wd_bp_notice_install() {
11
+ jQuery.post(wd_bp_url);
12
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
4
  Tags: customizable facebook feed, facebook, facebook events, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, facebook likebox
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
- Stable tag: 1.0.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,10 @@ Upgrade to [Facebook Feed Pro](https://web-dorado.com/products/wordpress-faceboo
59
 
60
  == Changelog ==
61
 
 
 
 
 
62
  = 1.0.25 =
63
  * Fixed: Updated library to prevent conflict with PHP version 7
64
 
4
  Tags: customizable facebook feed, facebook, facebook events, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, facebook likebox
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
+ Stable tag: 1.0.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  == Changelog ==
61
 
62
+ = 1.0.26 =
63
+ * Fixed: Unexpected error when saving feed
64
+ * Added: Notice to install Backup WD plugin
65
+
66
  = 1.0.25 =
67
  * Fixed: Updated library to prevent conflict with PHP version 7
68