Created
November 13, 2015 01:24
-
-
Save JulioPotier/c125e569da04ff307cb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'admin_head-edit-tags.php', 'baw_admin_enqueue_scripts' ); | |
function baw_admin_enqueue_scripts() { | |
global $taxnow; | |
if ( 'category' != $taxnow ) { | |
return; | |
} | |
wp_enqueue_style( 'wp-color-picker' ); | |
wp_enqueue_script( 'wp-color-picker' ); | |
add_action( 'admin_footer', 'baw_term_colors_print_scripts' ); | |
} | |
function baw_term_colors_print_scripts() { | |
?> | |
<script type="text/javascript"> | |
jQuery( document ).ready( function( $ ) { | |
$( '#baw_term_color' ).wpColorPicker(); | |
} ); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment