jfb_admin_notices

The WP-FB-AutoConnect jfb admin notices function.

Description

jfb_admin_notices(); 

Usage

  1. if ( !function_exists( 'jfb_admin_notices' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-fb-autoconnect/AdminPage.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jfb_admin_notices(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/AdminPage.php  
  1. function jfb_admin_notices() 
  2. global $jfb_homepage; 
  3. //Version 2.1.0 moved to a new version of the Facebook API that required changes on both the free and premium plugins; 
  4. //warn Premium users who have upgraded their free plugin, but not their addon. 
  5. if( defined('JFB_PREMIUM') && version_compare(JFB_PREMIUM_VER, 30) == -1 ) 
  6. ?><div class="error"><p> 
  7. <strong><?php _e("Warning", 'wp-fb-autoconnect')?>:</strong>  
  8. <?php echo sprintf(__("This version of WP-FB-AutoConnect is only compatible with Premium addon version 30 or better (you're currently using version %s). If you haven't done so already, please read the important information in FAQ46 of the plugin documentation:", 'wp-fb-autoconnect'), JFB_PREMIUM_VER) ?> <a target='store' href='<?php echo $jfb_homepage?>/#faq46'><b>here</b></a><br/><br/> 
  9. <?php _e("If you'd like to revert to a previous version of the free plugin until you're ready to update the addon, previous versions can be downloaded from:", 'wp-fb-autoconnect') ?> <a target="prev" href='http://wordpress.org/extend/plugins/wp-fb-autoconnect/developers/'><b>here</b></a> 
  10. </p></div><?php 
  11.  
  12. //Warn if the user's server doesn't have json_decode 
  13. if (!function_exists('json_decode')) 
  14. ?><div class="error"><p><strong><?php _e("Warning", 'wp-fb-autoconnect')?>:</strong> <?php _e("WP-FB-AutoConnect requires the JSON PHP extension to work. Please install / enable it before attempting to use this plugin.", 'wp-fb-autoconnect')?></p></div><?php 
  15.  
  16. //Warn if w3 total cache is enabled 
  17. global $opt_jfb_hidew3warning; 
  18. if( isset($_REQUEST[$opt_jfb_hidew3warning]) ) update_option($opt_jfb_hidew3warning, 1); 
  19. if (!get_option($opt_jfb_hidew3warning) && is_plugin_active("w3-total-cache/w3-total-cache.php")) 
  20. {?> 
  21. <div class="error"> 
  22. <p><strong><?php _e("Warning", 'wp-fb-autoconnect')?>:</strong> <?php _e("In some situations, W3-Total-Cache has been reported to cause problems with WP-FB-AutoConnect's Facebook logins. If you're experiencing issues with WP-FB-AutoConnect (for instance, the Widget doesn't properly show the logged-in state immediately after a login), please try temporarily disabling W3-Total-Cache. If that fixes it, you may re-enable W3-Total-Cache and try selectively enabling its various caching/CDN options until you find a combination that works for you.", 'wp-fb-autoconnect')?></p> 
  23. <?php echo '<a href="?' . http_build_query(array_merge($_GET, array($opt_jfb_hidew3warning => "1"))) . '">'.__("Hide this message", 'wp-fb-autoconnect') . '</a>'; ?> 
  24. </div> 
  25. <?php 
  26.  
  27. //Warn if it looks like we're on wpengine 
  28. global $opt_jfb_hidewpenginewarning; 
  29. if( isset($_REQUEST[$opt_jfb_hidewpenginewarning]) ) update_option($opt_jfb_hidewpenginewarning, 1); 
  30. if (!get_option($opt_jfb_hidewpenginewarning) && defined('WPMU_PLUGIN_DIR') && file_exists(WPMU_PLUGIN_DIR . "/wpengine-common/plugin.php")) 
  31. {?> 
  32. <div class="error"> 
  33. <p><strong><?php _e("Warning", 'wp-fb-autoconnect')?>:</strong> <?php _e("It looks like your site is running on WPEngine. Some users have reported that WPEngine's built-in caching causes problems with WP-FB-AutoConnect's Facebook logins. If you're experiencing issues with WP-FB-AutoConnect (for instance, the Widget doesn't properly show the logged-in state immediately after a login), please contact WPEngine support and ask them to add a cache exclusion for the WP-FB-AutoConnect plugin folder (and for the Premium addon, if you're using it).", 'wp-fb-autoconnect')?></p> 
  34. <?php echo '<a href="?' . http_build_query(array_merge($_GET, array($opt_jfb_hidewpenginewarning => "1"))) . '">'.__('Hide this message', 'wp-fb-autoconnect').'</a>'; ?> 
  35. </div> 
  36. <?php 
  37. }