Advertisement
Guest User

Untitled

a guest
Feb 26th, 2018
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.37 KB | None | 0 0
  1.  /**
  2.    * Extra links
  3.    */
  4.   $meta_boxes[] = array(
  5.     'title'          => 'Extra Footer Links',
  6.     'settings_pages' => 'my_footer',
  7.  
  8.     'fields' => array(
  9.       array(
  10.         'id'         => 'extra_links',
  11.         'type'       => 'group',
  12.         'clone'      => true,
  13.         'sort_clone' => true,
  14.         'max_clone'  => 2,
  15.  
  16.         'fields' => array(
  17.           array(
  18.             'name'        => 'Link Type',
  19.             'id'          => 'link_type',
  20.             'type'        => 'radio',
  21.             'options'     => array(
  22.               'type_post' => 'Link to post',
  23.               'type_url'  => 'External link'
  24.             ),
  25.           ),
  26.  
  27.           array(
  28.             'name'       => 'Post or page',
  29.             'id'         => 'link_post',
  30.             'type'       => 'post',
  31.             'field_type' => 'select_advanced',
  32.             'post_type'  => array( 'page', 'post' ),
  33.             'visible'    => array( 'link_type', 'type_post' ),
  34.           ),
  35.  
  36.           array(
  37.             'name'       => 'External link',
  38.             'id'         => 'link_external',
  39.             'type'       => 'text',
  40.             'visible'    => array( 'link_type', 'type_url' ),
  41.           ),
  42.  
  43.           array(
  44.             'name'   => 'Link text',
  45.             'id'     => 'link_text',
  46.             'type'   => 'text',
  47.           ),
  48.         ),
  49.       ),
  50.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement