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.

Max Chirkov has written 1 article