Advertisement
Guest User

mp6_adminbar_search_dashicon

a guest
Jul 5th, 2013
1,898
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.83 KB | None | 0 0
  1. diff --git wp-content/plugins/mp6/css/admin-bar.css wp-content/plugins/mp6/css/admin-bar.css
  2. index 22026e4..5e66f97 100644
  3. --- wp-content/plugins/mp6/css/admin-bar.css
  4. +++ wp-content/plugins/mp6/css/admin-bar.css
  5. @@ -412,7 +412,6 @@
  6.         color: #ccc;
  7.         text-shadow: #444 0px -1px 0px;
  8.         background-color: rgba( 255, 255, 255, 0 );
  9. -       background-image: url('../../../../wp-includes/images/admin-bar-sprite.png?d=20120830');
  10.         background-position: 3px 2px;
  11.         background-repeat: no-repeat;
  12.         border: none;
  13. @@ -478,6 +477,26 @@
  14.         display: none;
  15.  }
  16.  
  17. +#wpadminbar #adminbarsearch .adminbar-input,
  18. +#wpadminbar #adminbarsearch .adminbar-search-input {
  19. +       background-image: none !important;
  20. +}
  21. +
  22. +#wpadminbar #adminbarsearch:before {
  23. +       font-family: 'dashicons';
  24. +       font-size: 16pt;
  25. +       content: '\f179';
  26. +       text-shadow: none;
  27. +       color: #aaa;
  28. +       position: absolute;
  29. +       left: 1px;
  30. +}
  31. +
  32. +#wpadminbar #adminbarsearch {
  33. +       cursor: pointer;
  34. +       position: relative;
  35. +}
  36. +
  37.  /**
  38.   * Site Menu
  39.   */
  40. diff --git wp-content/plugins/mp6/mp6.php wp-content/plugins/mp6/mp6.php
  41. index 1155853..2e97dac 100644
  42. --- wp-content/plugins/mp6/mp6.php
  43. +++ wp-content/plugins/mp6/mp6.php
  44. @@ -144,4 +144,18 @@ function mp6_override_toolbar_margin() {
  45.         }
  46.  </style>
  47.  <?php endif;
  48. -}
  49. \ No newline at end of file
  50. +}
  51. +
  52. +// Add click-through support for the adminbar search icon
  53. +add_action( 'wp_after_admin_bar_render', 'mp6_adminbar_search_icon' );
  54. +function mp6_adminbar_search_icon() {
  55. +?>
  56. +<script type="text/javascript">
  57. +;( function ( $ ) {
  58. +       $( '#wpadminbar #adminbarsearch' ).on( 'click.mp6', function() {
  59. +               $( '#wpadminbar #adminbarsearch .adminbar-search-input' ).focus();
  60. +       });
  61. +})( jQuery );
  62. +</script>
  63. +<?php
  64. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement