Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<?php
// filter the Gravity Forms button type
add_filter("gform_submit_button_1", "form_submit_button", 10, 2);
function form_submit_button($button, $form){
return "<button class='button' id='gform_submit_button_{$form["id"]}'><span><i class='fa fa-share fa-2x'></i> Send </span></button>";
}
//Change hook of gform_submit_button_X to the form that you are using
//Change <span><i class='fa fa-share fa-2x'></i> Send </span> to Font awesome and text of your choice
@Satori83
Satori83 / gist:430ae97aa4950521ee5d
Created January 27, 2015 05:02
Wordpress Remove My Sites and Hide Menu Items
//Remove MY SITES in Nav Menu for Admins
function remove_admin_bar_links() {
global $wp_admin_bar, $current_user;
if ($current_user->ID != 2) {
$wp_admin_bar->remove_menu('my-sites'); // Remove the my sites link
$wp_admin_bar->remove_menu('new-content'); // Remove the content link
}
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );