Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1. add_filter( 'rwmb_meta_boxes', 'book_meta_boxes' );
  2. function book_meta_boxes( $meta_boxes ) {
  3.  
  4.   $meta_boxes[] = array(
  5.     'title'      => esc_html__( 'Embed', 'book-pt' ),
  6.     'post_types' => 'book',
  7.     'priority'   => 'low',
  8.  
  9.     'tabs'      => array(
  10.         'website' => array(
  11.             'label' => __( 'Website', 'book-pt' ),
  12.         ),
  13.         'facebook'  => array(
  14.             'label' => __( 'Facebook', 'book-pt' ),
  15.         ),
  16.     ),
  17.  
  18.     'fields'     => array(
  19.       array(
  20.         'id'   => "_website",
  21.         'type' => 'custom_html',
  22.         'tab'  => 'website',
  23.         'class' => 'embed-tab',
  24.         'std'  => 'test',
  25.       ),
  26.       array(
  27.         'name' => esc_html__( 'Facebook', 'book-pt' ),
  28.         'id'   => "_facebook",
  29.         'tab'  => 'facebook',
  30.         'tooltip' => esc_html__( 'Tooltip content', 'book-pt' ),
  31.         'type' => 'url',
  32.       ),
  33.     )
  34.   );
  35.  
  36.   return $meta_boxes;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement