Tag Archive: metaboxes
Blurbette Plugin: Metabox Abstract
One of the biggest benefits of OOP is the ability to extend classes. Depending on how the classes are organized and structured, one class can take care of a lot of tedious or repetitive work, enabling you to benefit by extending it and simply defining a few additional elements.
An abstract class is one that can only be extended — it ...
Blurbette Plugin: Options Metabox
The last class in the project blueprint is the Options metabox on the Blurbette admin edit panel. The aim is to present all possible contexts in which a Blurbette could appear, and offer checkboxes for each. As a bonus, if the Blurbette was copied from a post, indicate so with a link back to the post’s edit panel.
Here’s an example:
...
Admin-triggered e-mail
Here’s something that touches on lots of topics. A ‘send e-mail’ button within an admin panel, that opens up a ThickBox window with a standalone form and wp_editor.
The metabox
This requires two functions: one hooked into ‘add_meta_boxes’ which calls the second, the metabox output function:
Most of the second function builds the URL for the button’s href attribute. It points to a ...
Members Only
Recently, I was tasked with coding a ‘members only’ site which required a login to view all but a few pages. This turned out to be a surprisingly simple task, so I thought I’d share the code here. The job broke down into three tasks:
Allow anyone who’s logged in or else redirect to the Login page. Otherwise, allow if the current ...