Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created October 31, 2011 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/1327899 to your computer and use it in GitHub Desktop.
Save billerickson/1327899 to your computer and use it in GitHub Desktop.
Interstrategy Business Listings - default array
<?php
$defaults = array(
'post_type' => array(
'slug' => 'businesses',
'args' => array(
'labels' => array(
'name' => 'Businesses',
'singular_name' => 'Business',
'add_new' => 'Add New',
'add_new_item' => 'Add New Business',
'edit_item' => 'Edit Business',
'new_item' => 'New Business',
'view_item' => 'View Business',
'search_items' => 'Search Businesses',
'not_found' => 'No Businesses found',
'not_found_in_trash' => 'No Businesses found in trash',
'parent_item_colon' => '',
'menu_name' => 'Businesses'
),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','editor', 'excerpt')
),
),
'taxonomy' => array(
'slug' => 'business-category',
'args' => array(
'hierarchical' => true,
'labels' => array(
'name' => 'Categories',
'singular_name' => 'Category',
'search_items' => 'Search Categories',
'all_items' => 'All Categories',
'parent_item' => 'Parent Category',
'parent_item_colon' => 'Parent Category:',
'edit_item' => 'Edit Category',
'update_item' => 'Update Category',
'add_new_item' => 'Add New Category',
'new_item_name' => 'New Category Name',
'menu_name' => 'Category'
),
'show_ui' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'business-category' ),
)
),
'meta_box' => array(
'id' => 'business-details',
'title' => 'Business Details',
'pages' => array('businesses'),
'context' => 'normal',
'priority' => 'high',
'show_names' => true,
'fields' => array(
array(
'name' => 'Address Line 1',
'id' => 'be_business_listings_address_1',
'desc' => '',
'type' => 'text',
),
array(
'name' => 'Address Line 2',
'id' => 'be_business_listings_address_2',
'desc' => '',
'type' => 'text',
),
array(
'name' => 'Telephone',
'id' => 'be_business_listings_telephone',
'desc' => '',
'type' => 'text_medium'
),
array(
'name' => 'Website',
'id' => 'be_business_listings_website',
'desc' => '',
'type' => 'text',
),
array(
'name' => 'Email',
'id' => 'be_business_listings_email',
'desc' => '',
'type' => 'text'
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment