_x( 'Leasing Specials', 'leasing','ar' ), 'singular_name' => _x( 'Leasing Specials', 'leasing','ar' ), 'menu_name' => _x( 'Leasing Specials', 'admin menu','ar' ), 'name_admin_bar' => _x( 'Leasing Specials', 'add new on admin bar','ar'), 'add_new' => _x( 'Add New', 'leasing','ar' ), 'add_new_item' => __( 'Add New Leasing Specials','ar' ), 'new_item' => __( 'New Leasing Specials','ar' ), 'edit_item' => __( 'Edit Leasing Specials','ar' ), 'view_item' => __( 'View Leasing Specials','ar' ), 'all_items' => __( 'All Leasing Specials','ar' ), 'search_items' => __( 'Search Leasing Specials','ar' ), 'parent_item_colon' => __( 'Parent Leasing Specials:','ar' ), 'not_found' => __( 'No Leasing Specials found.','ar' ), 'not_found_in_trash' => __( 'No v found in Trash.','ar') ); $args = array( 'labels' => $labels, 'description' => __('Leasing Specials Description','ar'), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => 'leasing', 'rewrite' => array('slug'=>'leasing'), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => true, 'supports' => array('title'), 'menu_icon' => ABR_PLUGIN_DIR_URL.'img/leasing.png', ); register_post_type('leasing',$args); } function cf_leasing_special_register_metabox(){ $cf_leasing = new_cmb2_box(array( 'id' => 'cf_leasing_metabox', 'title' => __('New Leasing Special','ar'), 'object_types' => array('leasing') )); $cf_leasing->add_field(array( 'name' => __('Publishing Date','ar'), 'id' => 'cf_leasing_publish_date', 'type' => 'text_date', )); $cf_leasing->add_field(array( 'name' => __('Expire Date','ar'), 'id' => 'cf_leasing_expire_date', 'type' => 'text_date', )); $cf_leasing->add_field( array( 'name' => __('Description','ar'), 'id' => 'cf_leasing_description', 'type' => 'wysiwyg', 'options' => array('textarea_rows'=>5), )); $cf_leasing->add_field(array( 'name' => __('Select Apartments','ar'), 'id' => 'cf_leasing_apartment', 'type' => 'multicheck', 'show_option_none' =>false, 'options' => Cf_Abr_Apartment::get_apartment_id_title_ARR() )); } } add_action('plugins_loaded',array('CF_AR_Leasing_Special','init'));