Skip to content

Instantly share code, notes, and snippets.

@robneu
Last active August 29, 2015 14:00
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 robneu/11156724 to your computer and use it in GitHub Desktop.
Save robneu/11156724 to your computer and use it in GitHub Desktop.
<?php
/**
* Add custom icons using Dashicons for Gravity Forms.
*
* This outputs some extra stlying to force Gravity Forms to use a modern
* dashicon in the wp-admin sidebar.
*
* @author Robert Neu
* @link http://melchoyce.github.io/dashicons/
*/
function prefix_gforms_admin_css() {
$css = '<style type="text/css">';
$css .= '#adminmenu #toplevel_page_gf_edit_forms div.wp-menu-image img { display: none }';
$css .= '#adminmenu #toplevel_page_gf_edit_forms div.wp-menu-image:before { content: "\f175"; }';
$css .= '</style>';
echo $css;
}
add_action('admin_head', 'prefix_gforms_admin_css');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment