bws_admin_notices

The Google Sitemap by BestWebSoft bws admin notices function.

Description

bws_admin_notices(); 

Usage

  1. if ( !function_exists( 'bws_admin_notices' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-sitemap-by-bestwebsoft/bws_menu/bws_functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bws_admin_notices(); 
  7.  

Defined (1)

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

/bws_menu/bws_functions.php  
  1. function bws_admin_notices() { 
  2. global $bws_versions_notice_array, $bws_plugin_banner_to_settings; 
  3.  
  4. /** versions notice */ 
  5. if ( ! empty( $bws_versions_notice_array ) ) { 
  6. foreach ( $bws_versions_notice_array as $key => $value ) { ?> 
  7. <div class="update-nag"><?php 
  8. echo sprintf( 
  9. "<strong>%s</strong> %s <strong>WordPress %s</strong> %s",  
  10. $value['name'],  
  11. __( 'requires', 'bestwebsoft' ),  
  12. $value['version'],  
  13. __( 'or higher! We do not guarantee that our plugin will work correctly. Please upgrade to WordPress latest version.', 'bestwebsoft' ) 
  14. ); 
  15. ?></div> 
  16. <?php } 
  17.  
  18. /** banner_to_settings notice */ 
  19. if ( ! empty( $bws_plugin_banner_to_settings ) ) {  
  20. if ( 1 == count( $bws_plugin_banner_to_settings ) ) { ?> 
  21. <div class="updated" style="padding: 0; margin: 0; border: none; background: none;"> 
  22. <div class="bws_banner_on_plugin_page bws_banner_to_settings"> 
  23. <div class="icon"> 
  24. <img title="" src="<?php echo esc_attr( $bws_plugin_banner_to_settings[0]['banner_url'] ); ?>" alt="" /> 
  25. </div>  
  26. <div class="text"> 
  27. <strong><?php _e( 'Thank you for installing', 'bestwebsoft' ); ?> <?php echo $bws_plugin_banner_to_settings[0]['plugin_info']['Name']; ?> plugin!</strong><br /> 
  28. <?php _e( "Let's get started", 'bestwebsoft' ); ?>:  
  29. <a href="<?php echo $bws_plugin_banner_to_settings[0]['settings_url']; ?>"><?php _e( 'Settings', 'bestwebsoft' ); ?></a>  
  30. <?php if ( false != $bws_plugin_banner_to_settings[0]['post_type_url'] ) { ?> 
  31. <?php _e( 'or', 'bestwebsoft' ); ?>  
  32. <a href="<?php echo $bws_plugin_banner_to_settings[0]['post_type_url']; ?>"><?php _e( 'Add New', 'bestwebsoft' ); ?></a> 
  33. <?php } ?> 
  34. </div> 
  35. <form action="" method="post"> 
  36. <button class="notice-dismiss bws_hide_settings_notice" title="<?php _e( 'Close notice', 'bestwebsoft' ); ?>"></button> 
  37. <input type="hidden" name="bws_hide_settings_notice_<?php echo $bws_plugin_banner_to_settings[0]['plugin_options_name']; ?>" value="hide" /> 
  38. <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ); ?> 
  39. </form> 
  40. </div> 
  41. </div>  
  42. <?php } else { ?> 
  43. <div class="updated" style="padding: 0; margin: 0; border: none; background: none;"> 
  44. <div class="bws_banner_on_plugin_page bws_banner_to_settings_joint">  
  45. <form action="" method="post"> 
  46. <button class="notice-dismiss bws_hide_settings_notice" title="<?php _e( 'Close notice', 'bestwebsoft' ); ?>"></button> 
  47. <div class="bws-text"> 
  48. <div class="icon"> 
  49. <span class="dashicons dashicons-admin-plugins"></span> 
  50. </div>  
  51. <strong><?php _e( 'Thank you for installing plugins by BestWebSoft!', 'bestwebsoft' ); ?></strong> 
  52. <div class="hide-if-no-js bws-more-links"> 
  53. <a href="#" class="bws-more"><?php _e( 'More Details', 'bestwebsoft' ); ?></a>  
  54. <a href="#" class="bws-less hidden"><?php _e( 'Less Details', 'bestwebsoft' ); ?></a>  
  55. </div>  
  56. <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_settings_nonce_name' ); ?>  
  57. <div class="clear"></div> 
  58. </div> 
  59. <div class="bws-details hide-if-js"> 
  60. <?php foreach ( $bws_plugin_banner_to_settings as $value ) { ?>  
  61. <div>  
  62. <strong><?php echo str_replace( ' by BestWebSoft', '', $value['plugin_info']['Name'] ); ?></strong> <a href="<?php echo $value['settings_url']; ?>"><?php _e( 'Settings', 'bestwebsoft' ); ?></a>  
  63. <?php if ( false != $value['post_type_url'] ) { ?> 
  64.  | <a target="_blank" href="<?php echo $value['post_type_url']; ?>"><?php _e( 'Add New', 'bestwebsoft' ); ?></a> 
  65. <?php } ?> 
  66. <input type="hidden" name="bws_hide_settings_notice_<?php echo $value['plugin_options_name']; ?>" value="hide" /> 
  67. </div>  
  68. <?php } ?>  
  69. </div> 
  70. </div> 
  71. </form> 
  72. </div> 
  73. <?php }