Skip to content

Instantly share code, notes, and snippets.

@intelliweb
Created October 2, 2014 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intelliweb/98561715aa06c7e90ec9 to your computer and use it in GitHub Desktop.
Save intelliweb/98561715aa06c7e90ec9 to your computer and use it in GitHub Desktop.
WP: The search form in the admin bar can cause a security warning over HTTPS (SSL). This snippet disables the search form in the admin bar.
<?php
// Disable search icon and input in admin bar
add_action( 'wp_before_admin_bar_render', 'intw_disable_admin_bar_search' );
function intw_disable_admin_bar_search() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('search');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment