bws_plugins_admin_head

The Google Sitemap by BestWebSoft bws plugins admin head function.

Description

bws_plugins_admin_head(); 

Usage

  1. if ( !function_exists( 'bws_plugins_admin_head' ) ) { 
  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_plugins_admin_head(); 
  7.  

Defined (1)

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

/bws_menu/bws_functions.php  
  1. function bws_plugins_admin_head() { 
  2. global $bws_shortcode_list, $wp_version, $post_type; 
  3. if ( isset( $_GET['page'] ) && $_GET['page'] == "bws_panel" ) { ?> 
  4. <noscript> 
  5. <style type="text/css"> 
  6. .bws_product_button { 
  7. display: inline-block; 
  8. </style> 
  9. </noscript> 
  10. <?php } 
  11. if ( 4.2 > $wp_version ) { 
  12. $plugin_dir_array = explode( '/', plugin_basename( __FILE__ ) ); 
  13. $plugin_dir = $plugin_dir_array[0]; ?> 
  14. <style type="text/css"> 
  15. .bws_hide_settings_notice,  
  16. .bws_hide_premium_options { 
  17. width: 11px; 
  18. height: 11px; 
  19. border: none; 
  20. background: url("<?php echo plugins_url( $plugin_dir . '/bws_menu/images/close_banner.png' ); ?>") no-repeat center center; 
  21. box-shadow: none; 
  22. float: right; 
  23. margin: 8px; 
  24. .bws_hide_settings_notice:hover,  
  25. .bws_hide_premium_options:hover { 
  26. cursor: pointer; 
  27. .bws_hide_premium_options { 
  28. position: relative; 
  29. </style> 
  30. <?php } 
  31. if ( ! empty( $bws_shortcode_list ) ) { ?> 
  32. <!-- TinyMCE Shortcode Plugin --> 
  33. <script type='text/javascript'> 
  34. var bws_shortcode_button = { 
  35. 'label': '<?php esc_attr_e( "Add BWS Shortcode", "bestwebsoft" ); ?>',  
  36. 'title': '<?php esc_attr_e( "Add BWS Plugins Shortcode", "bestwebsoft" ); ?>',  
  37. 'icon_url': '<?php echo plugins_url( "images/shortcode-icon.png" , __FILE__ ); ?>',  
  38. 'function_name': [ 
  39. <?php foreach ( $bws_shortcode_list as $key => $value ) { 
  40. if ( isset( $value['js_function'] ) ) 
  41. echo "'" . $value['js_function'] . "', ";  
  42. } ?> 
  43. ],  
  44. 'wp_version' : '<?php echo $wp_version; ?>' 
  45. }; 
  46. </script> 
  47. <!-- TinyMCE Shortcode Plugin --> 
  48. <?php if ( isset( $post_type ) && in_array( $post_type, array( 'post', 'page' ) ) ) { 
  49. $tooltip_args = array( 
  50. 'tooltip_id' => 'bws_shortcode_button_tooltip',  
  51. 'css_selector' => '.mce-bws_shortcode_button',  
  52. 'actions' => array( 
  53. 'click' => false,  
  54. 'onload' => true 
  55. ),  
  56. 'content' => '<h3>' . __( 'Add shortcode', 'bestwebsoft' ) . '</h3><p>' . __( "Add BestWebSoft plugins' shortcodes using this button.", 'bestwebsoft' ) . '</p>',  
  57. 'position' => array(  
  58. 'edge' => 'right' 
  59. ),  
  60. 'set_timeout' => 2000 
  61. ); 
  62. if ( $wp_version < '3.9' ) 
  63. $tooltip_args['css_selector'] = '.mce_add_bws_shortcode'; 
  64. bws_add_tooltip_in_admin( $tooltip_args ); 
  65. }