public
Created

  • Download Gist
reproduce-23684.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?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' );

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.