add_action('init', 'openHousesMetaBox'); function openHousesMetaBox() { require_once(hjimembershipMembership::$dir . '/common/utils/MetaBoxes.php'); $newMetaBox['openHouses'] = array( 'id' => 'openHouses', 'title' => __('Open Houses', 'rel'), 'object_types' => array('listing'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array( array( 'name' => 'Date & Time', 'id' => '_pl_open_house_datetime', 'type' => 'text_datetime_timestamp', 'repeatable' => true, ), array( 'name' => __('Agent', 'rel'), 'id' => '_pl_open_house_agent', 'type' => 'text', ), array( 'name' => __('Phone', 'rel'), 'id' => '_pl_open_house_phone', 'type' => 'text', ) ) ); // Default priority for all meta boxes is 10. hjicommonutilsMetaBoxes::add($newMetaBox, $priority = 9); }

adding-custom-meta-boxes

add_action('init', 'openHousesMetaBox');

function openHousesMetaBox()
{
	require_once(hjimembershipMembership::$dir . '/common/utils/MetaBoxes.php');

	$newMetaBox['openHouses'] = array(
            'id'           => 'openHouses',
            'title'        => __('Open Houses', 'rel'),
            'object_types'        => array('listing'),
            'context'      => 'normal',
            'priority'     => 'high',
            'show_names'   => true,
            'fields'       => array(
                array(
				    'name' => 'Date & Time',
				    'id'   => '_pl_open_house_datetime',
				    'type' => 'text_datetime_timestamp',
				    'repeatable'      => true,
				),
                array(
                    'name'      => __('Agent', 'rel'),
                    'id'        => '_pl_open_house_agent',
                    'type'      => 'text',
                ),
                array(
                    'name'      => __('Phone', 'rel'),
                    'id'        => '_pl_open_house_phone',
                    'type'      => 'text',
                )
            )
        );

        // Default priority for all meta boxes is 10.
	hjicommonutilsMetaBoxes::add($newMetaBox, $priority = 9);
}
This entry was posted in   .
Bookmark the   permalink.

Matt Barrett has written 1 article

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>