Skip to content

Instantly share code, notes, and snippets.

@trepmal
Created December 6, 2011 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trepmal/1436969 to your computer and use it in GitHub Desktop.
Save trepmal/1436969 to your computer and use it in GitHub Desktop.
WordPress: Testing bulleted and numbered lists
<?php
//Plugin Name: Bulleted Lists
new Bulleted_List();
class Bulleted_List {
function __construct() {
add_action( 'admin_menu', array( &$this, 'menu' ) );
add_action( 'add_meta_boxes', array( &$this, 'box_setup' ) );
}
function menu() {
add_options_page( 'Bulleted Lists', 'Bulleted Lists Test', 'edit_posts', __FILE__, array( &$this, 'page' ) );
}
function box_setup() {
add_meta_box('bulleted_lists_mb', 'Bulleted Lists Test', array( &$this, 'page' ), 'post', 'side', 'high' );
}
function page() {
?>
<ul>
<li>ul <em>no class</em></li>
<li>alpha</li>
<li>beta</li>
<li>gamma</li>
</ul>
<hr />
<ul class="ul-disc">
<li>ul.ul-disc</li>
<li>alpha</li>
<li>beta</li>
<li>gamma</li>
</ul>
<hr />
<ul class="ul-square">
<li>ul.ul-square</li>
<li>alpha</li>
<li>beta</li>
<li>gamma</li>
</ul>
<ol>
<hr />
<li>ol <em>no class</em></li>
<li>jack</li>
<li>queen</li>
<li>king</li>
</ol>
<hr />
<ol class="ol-decimal">
<li>ol.ol-decimal</li>
<li>jack</li>
<li>queen</li>
<li>king</li>
</ol>
<?php
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment