Created
September 29, 2013 16:53
-
-
Save scarstens/6754238 to your computer and use it in GitHub Desktop.
Script that adds or enqueues javascript to a wp-admin page (a specified page, not all of them)
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
| function my_enqueue($hook) { | |
| if( 'users.php' != $hook && 'user-meta-manager' != $_GET['page']) | |
| return; | |
| wp_enqueue_script( 'jquery-ui-sortable'); | |
| } | |
| add_action( 'admin_enqueue_scripts', 'my_enqueue' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment