Skip to content

Instantly share code, notes, and snippets.

@kovshenin
Created May 9, 2013 12:13
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 kovshenin/5547104 to your computer and use it in GitHub Desktop.
Save kovshenin/5547104 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: My Plugin
*/
function my_admin_enqueue_scripts() {
wp_enqueue_script( 'jquery-ui-button' );
}
add_action( 'admin_enqueue_scripts', 'my_admin_enqueue_scripts' );
function my_admin_footer() {
?>
<script>
jQuery(document).ready(function($){
$('#my-radio').buttonset();
});
</script>
<div id="my-radio">
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
</div>
<?php
}
add_action( 'admin_footer', 'my_admin_footer' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment