Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Extra links
- */
- $meta_boxes[] = array(
- 'title' => 'Extra Footer Links',
- 'settings_pages' => 'my_footer',
- 'fields' => array(
- array(
- 'id' => 'extra_links',
- 'type' => 'group',
- 'clone' => true,
- 'sort_clone' => true,
- 'max_clone' => 2,
- 'fields' => array(
- array(
- 'name' => 'Link Type',
- 'id' => 'link_type',
- 'type' => 'radio',
- 'options' => array(
- 'type_post' => 'Link to post',
- 'type_url' => 'External link'
- ),
- ),
- array(
- 'name' => 'Post or page',
- 'id' => 'link_post',
- 'type' => 'post',
- 'field_type' => 'select_advanced',
- 'post_type' => array( 'page', 'post' ),
- 'visible' => array( 'link_type', 'type_post' ),
- ),
- array(
- 'name' => 'External link',
- 'id' => 'link_external',
- 'type' => 'text',
- 'visible' => array( 'link_type', 'type_url' ),
- ),
- array(
- 'name' => 'Link text',
- 'id' => 'link_text',
- 'type' => 'text',
- ),
- ),
- ),
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement