WD Facebook Feed – Custom Facebook Feed Plugin - Version 1.0.27

Version Description

  • Changed: Show notification to install Backup WD plugin only on plugin pages.
Download this release

Release Info

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

Code changes from version 1.0.26 to 1.0.27

Files changed (2) hide show
  1. facebook-feed-wd.php +77 -54
  2. readme.txt +4 -1
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.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,71 +912,94 @@ function ffwd_language_load() {
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 );
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.27
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
+ function ffwd_bp_install_notice() {
 
 
 
 
 
 
 
916
 
917
+ // Remove old notice.
918
+ if ( get_option('wds_bk_notice_status') !== FALSE ) {
919
+ update_option('wds_bk_notice_status', '1', 'no');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
920
  }
921
 
922
+ // Show notice only on plugin pages.
923
+ if ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), '_ffwd') === FALSE ) {
924
+ return '';
925
+ }
926
 
927
+ $meta_value = get_option('wd_bk_notice_status');
928
+ if ( $meta_value === '' || $meta_value === FALSE ) {
929
+ ob_start();
930
+ $prefix = WD_FB_PREFIX;
931
+ $nicename = 'Facebook Feed WD';
932
+ $url = WD_FFWD_URL;
933
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_bp_dismiss' ), admin_url('admin-ajax.php'));
934
+ $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd'));
935
+ ?>
936
+ <div class="notice notice-info" id="wd_bp_notice_cont">
937
+ <p>
938
+ <img id="wd_bp_logo_notice" src="<?php echo $url . '/images/logo.png'; ?>" />
939
+ <?php echo sprintf(__("%s advises: Install brand new FREE %s plugin to keep your images and website safe.", $prefix), $nicename, '<a href="https://wordpress.org/plugins/backup-wd/" title="' . __("More details", $prefix) . '" target="_blank">' . __("Backup WD", $prefix) . '</a>'); ?>
940
+ <a class="button button-primary" href="<?php echo $install_url; ?>">
941
+ <span onclick="jQuery.post('<?php echo $dismiss_url; ?>');"><?php _e("Install", $prefix); ?></span>
942
+ </a>
943
+ </p>
944
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss" onclick="jQuery('#wd_bp_notice_cont').hide(); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
945
+ </div>
946
+ <style>
947
+ @media only screen and (max-width: 500px) {
948
+ body #wd_backup_logo {
949
+ max-width: 100%;
950
+ }
951
+ body #wd_bp_notice_cont p {
952
+ padding-right: 25px !important;
953
+ }
954
+ }
955
+ #wd_bp_logo_notice {
956
+ width: 40px;
957
+ float: left;
958
+ margin-right: 10px;
959
+ }
960
+ #wd_bp_notice_cont {
961
+ position: relative;
962
+ }
963
+ #wd_bp_notice_cont a {
964
+ margin: 0 5px;
965
+ }
966
+ #wd_bp_notice_cont .dashicons-dismiss:before {
967
+ content: "\f153";
968
+ background: 0 0;
969
+ color: #72777c;
970
+ display: block;
971
+ font: 400 16px/20px dashicons;
972
+ speak: none;
973
+ height: 20px;
974
+ text-align: center;
975
+ width: 20px;
976
+ -webkit-font-smoothing: antialiased;
977
+ -moz-osx-font-smoothing: grayscale;
978
+ }
979
+ .wd_bp_notice_dissmiss {
980
+ margin-top: 5px;
981
+ }
982
+ </style>
983
+ <?php
984
+ echo ob_get_clean();
985
+ }
986
  }
987
 
988
+ if ( !is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
989
+ add_action('admin_notices', 'ffwd_bp_install_notice');
 
 
 
 
 
 
990
  }
 
991
 
992
+ if ( !function_exists('wd_bps_install_notice_status') ) {
993
+ // Add usermeta to db.
994
+ function wd_bps_install_notice_status() {
995
+ update_option('wd_bk_notice_status', '1', 'no');
996
+ }
997
+ add_action('wp_ajax_wd_bp_dismiss', 'wd_bps_install_notice_status');
998
  }
999
 
1000
  function ffwd_version() {
1001
 
1002
+ $version = '1.0.27';
1003
 
1004
  if ( get_option( 'ffwd_version' ) === false ) {
1005
  add_option( 'ffwd_version', $version );
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.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,9 @@ Upgrade to [Facebook Feed Pro](https://web-dorado.com/products/wordpress-faceboo
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 1.0.26 =
63
  * Fixed: Unexpected error when saving feed
64
  * Added: Notice to install Backup WD plugin
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.27
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.27 =
63
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
64
+
65
  = 1.0.26 =
66
  * Fixed: Unexpected error when saving feed
67
  * Added: Notice to install Backup WD plugin