[wp-hackers] Using the new UI for plugins

Ryan Boren ryan at boren.nu
Fri Mar 28 04:01:07 GMT 2008


On Thu, Mar 27, 2008 at 4:31 PM, Andrew Ferguson <andrew at fergcorp.com> wrote:
> I saw that too, I wanted to do stuff that emulated the boxes on the "write"
>
>  I've found that including the following code in header:
>
>  wp_enqueue_script('postbox');
>  wp_enqueue_script('post');
>
>
>  And then using:
>
>  <div class="postbox">
>      <h3>Example Heading Title</h3>
>      <div class="inside">
>           //Content here
>      </div>
>  </div>
>
>  ...allows me to get the nice collapsible boxes. I'm currently working on how
>  to get a the mini side bar on the right.

add_meta_box() is an easier way of doing that and will protect you
from any box markup changes that happen in the future.

http://trac.wordpress.org/browser/trunk/wp-admin/includes/template.php#L1032


More information about the wp-hackers mailing list