Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
  2.  
  3. function your_prefix_register_meta_boxes( $meta_boxes ) {
  4.     $prefix = '';
  5.  
  6.     $meta_boxes[] = array (
  7.         'title' => esc_html__( 'Filtración', 'text-domain' ),
  8.         'id' => 'filtracion',
  9.         'post_types' => array(
  10.             0 => 'articulo',
  11.             1 => 'noticia',
  12.             2 => 'para-empresa',
  13.         ),
  14.         'context' => 'normal',
  15.         'priority' => 'high',
  16.         'fields' => array(
  17.             array (
  18.                 'id' => $prefix . 'text_63oz10nwock',
  19.                 'type' => 'text',
  20.                 'name' => esc_html__( 'Post type', 'text-domain' ),
  21.                 'desc' => esc_html__( 'Current post type.', 'text-domain' ),
  22.                 'required' => 1,
  23.             ),
  24.             array (
  25.                 'id' => $prefix . 'author_hva4qxl9l8',
  26.                 'type' => 'user',
  27.                 'name' => esc_html__( 'Post author', 'text-domain' ),
  28.                 'desc' => esc_html__( 'Current post author.', 'text-domain' ),
  29.                 'field_type' => 'select_advanced',
  30.                 'required' => 1,
  31.                 'multiple' => true,
  32.             ),
  33.             array (
  34.                 'id' => $prefix . 'date_mgw46wuomoh',
  35.                 'type' => 'date',
  36.                 'name' => esc_html__( 'Post Date', 'text-domain' ),
  37.                 'desc' => esc_html__( 'Current post date.', 'text-domain' ),
  38.                 'required' => 1,
  39.             ),
  40.         ),
  41.     );
  42.  
  43.     return $meta_boxes;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement