Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
- function your_prefix_function_name( $meta_boxes ) {
- $prefix = '';
- $meta_boxes[] = [
- 'title' => __( 'Job Details Custom Table', 'your-text-domain' ),
- 'id' => 'job-details-custom-table',
- 'post_types' => ['job'],
- 'storage_type' => 'custom_table',
- 'table' => 'wp_1p_my_jobmeta',
- 'validation' => [
- 'rules' => [
- $prefix . 'job_ct_inquiry_email' => [
- 'email' => true,
- ],
- ],
- 'messages' => [
- $prefix . 'job_ct_inquiry_email' => [
- 'email' => 'Please enter a valid email',
- ],
- ],
- ],
- 'tabs' => [
- 'job_taxonomies' => [
- 'label' => 'Job Taxonomies',
- 'icon' => 'admin-tools',
- ],
- 'general_details' => [
- 'label' => 'General Details',
- 'icon' => 'admin-network',
- ],
- 'salary' => [
- 'label' => 'Salary',
- 'icon' => 'tickets-alt',
- ],
- 'hiring_organization' => [
- 'label' => 'Hiring Organization',
- 'icon' => 'id-alt',
- ],
- 'application_details' => [
- 'label' => 'Application Details',
- 'icon' => 'megaphone',
- ],
- 'main_details' => [
- 'label' => 'Main Details',
- 'icon' => 'admin-post',
- ],
- 'contact_details' => [
- 'label' => 'Contact Details',
- 'icon' => 'phone',
- ],
- 'advertisement_details' => [
- 'label' => 'Advertisement Details',
- 'icon' => 'megaphone',
- ],
- ],
- 'fields' => [
- [
- 'name' => __( 'Job Category Position', 'your-text-domain' ),
- 'id' => $prefix . 'job_category_position',
- 'type' => 'taxonomy',
- 'taxonomy' => ['position'],
- 'field_type' => 'checkbox_tree',
- 'remove_default' => true,
- 'columns' => 3,
- 'tab' => 'job_taxonomies',
- ],
- [
- 'name' => __( 'Job Category Status', 'your-text-domain' ),
- 'id' => $prefix . 'job_category_status',
- 'type' => 'taxonomy',
- 'desc' => __( 'Select \'ongoing\' for all the Job', 'your-text-domain' ),
- 'taxonomy' => ['category'],
- 'field_type' => 'checkbox_list',
- 'remove_default' => true,
- 'columns' => 3,
- 'tab' => 'job_taxonomies',
- ],
- [
- 'name' => __( 'Job Category Country', 'your-text-domain' ),
- 'id' => $prefix . 'job_category_country',
- 'type' => 'taxonomy',
- 'taxonomy' => ['country'],
- 'field_type' => 'select_advanced',
- 'remove_default' => true,
- 'columns' => 3,
- 'tab' => 'job_taxonomies',
- ],
- [
- 'name' => __( 'Job Category Field', 'your-text-domain' ),
- 'id' => $prefix . 'job_category_field',
- 'type' => 'taxonomy',
- 'taxonomy' => ['job-field'],
- 'field_type' => 'checkbox_tree',
- 'remove_default' => true,
- 'columns' => 3,
- 'tab' => 'job_taxonomies',
- ],
- [
- 'name' => __( 'Research Subjects', 'your-text-domain' ),
- 'id' => $prefix . 'research_subjects',
- 'type' => 'taxonomy',
- 'desc' => __( 'Type the research subjects to select the content', 'your-text-domain' ),
- 'taxonomy' => ['post_tag'],
- 'field_type' => 'select_advanced',
- 'add_new' => true,
- 'remove_default' => true,
- 'multiple' => true,
- 'columns' => 3,
- 'tab' => 'job_taxonomies',
- ],
- [
- 'name' => __( 'Position Name', 'your-text-domain' ),
- 'id' => $prefix . 'job_position_name',
- 'type' => 'text',
- 'desc' => __( 'Enter the given position name in the advertisement', 'your-text-domain' ),
- 'size' => 7,
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'Job Type', 'your-text-domain' ),
- 'id' => $prefix . 'job_type',
- 'type' => 'select',
- 'desc' => __( 'Select Full Time / Part Time', 'your-text-domain' ),
- 'options' => [
- 'Full-Time' => __( 'Full-Time', 'your-text-domain' ),
- 'Part-Time' => __( 'Part-Time', 'your-text-domain' ),
- 'Contract' => __( 'Contract', 'your-text-domain' ),
- 'Temporary' => __( 'Temporary', 'your-text-domain' ),
- 'Intern' => __( 'Intern', 'your-text-domain' ),
- 'Other' => __( 'Other', 'your-text-domain' ),
- ],
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'No of Positions', 'your-text-domain' ),
- 'id' => $prefix . 'job_no_positions',
- 'type' => 'text',
- 'desc' => __( 'Mention One/Two/More/Few/100', 'your-text-domain' ),
- 'std' => 'One',
- 'size' => 6,
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'Deadline Date Time', 'your-text-domain' ),
- 'id' => $prefix . 'job_deadline_date_time',
- 'type' => 'datetime',
- 'desc' => __( 'Select the date and time as given in the advertisement', 'your-text-domain' ),
- 'size' => 6,
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'Deadline Time Zone', 'your-text-domain' ),
- 'id' => $prefix . 'job_deadline_timezone',
- 'type' => 'text',
- 'desc' => __( 'Select the Time Zone GMT', 'your-text-domain' ),
- 'size' => -1,
- 'datalist' => [
- 'id' => '60c9b644a57ca',
- 'options' => [
- '(GMT +1)
- ',
- '(GMT +2)
- ',
- '(GMT +3)
- ',
- '(GMT +3:30)
- ',
- '(GMT +4)
- ',
- '(GMT +5)
- ',
- '(GMT +5:30)
- ',
- '(GMT +6)
- ',
- '(GMT +7)
- ',
- '(GMT +8)
- ',
- '(GMT +9)
- ',
- '(GMT +9:30)
- ',
- '(GMT +10)
- ',
- '(GMT +11)
- ',
- '(GMT +12)
- ',
- '(GMT -1)
- ',
- '(GMT -3)
- ',
- '(GMT -3:30)
- ',
- '(GMT -4)
- ',
- '(GMT -5)
- ',
- '(GMT -6)
- ',
- '(GMT -7)
- ',
- '(GMT -8)
- ',
- '(GMT -9)
- ',
- '(GMT -10)
- ',
- '(GMT-11)',
- ],
- ],
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'Joining Date', 'your-text-domain' ),
- 'id' => $prefix . 'job_joining_date',
- 'type' => 'text',
- 'desc' => __( 'Mention the joining date as given in the advertisement', 'your-text-domain' ),
- 'placeholder' => __( 'Sep 01, 2021 or ASAP', 'your-text-domain' ),
- 'size' => 6,
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'Contract Period', 'your-text-domain' ),
- 'id' => $prefix . 'job_contract_period',
- 'type' => 'text',
- 'desc' => __( 'Mention the years/month. If not available, Leave it for default value', 'your-text-domain' ),
- 'std' => 'Not Mentioned',
- 'size' => 3,
- 'tab' => 'general_details',
- ],
- [
- 'name' => __( 'Schema Currency', 'your-text-domain' ),
- 'id' => $prefix . 'job_currency',
- 'type' => 'select',
- 'label_description' => __( 'This is for Schema', 'your-text-domain' ),
- 'desc' => __( 'Select the Currency name (USD)', 'your-text-domain' ),
- 'options' => [
- 'EURO' => __( 'EURO', 'your-text-domain' ),
- 'DKK' => __( 'DKK (Denmark)', 'your-text-domain' ),
- 'USD' => __( 'USD (America)', 'your-text-domain' ),
- 'KRW' => __( 'KRW (South Korea)', 'your-text-domain' ),
- 'INR' => __( 'INR (India)', 'your-text-domain' ),
- 'GBP' => __( 'GBP (England)', 'your-text-domain' ),
- ],
- 'columns' => 3,
- 'tab' => 'salary',
- ],
- [
- 'name' => __( 'Schema Value', 'your-text-domain' ),
- 'id' => $prefix . 'job_value',
- 'type' => 'text',
- 'label_description' => __( 'This is for Schema', 'your-text-domain' ),
- 'desc' => __( 'Mention the salary value (40,000)', 'your-text-domain' ),
- 'size' => 3,
- 'columns' => 3,
- 'tab' => 'salary',
- ],
- [
- 'name' => __( 'Schema Payroll', 'your-text-domain' ),
- 'id' => $prefix . 'job_payroll',
- 'type' => 'select',
- 'label_description' => __( 'This is for Schema', 'your-text-domain' ),
- 'desc' => __( 'Mention Salary for Year/Month/Week', 'your-text-domain' ),
- 'options' => [
- 'YEAR' => __( 'Year', 'your-text-domain' ),
- 'MONTH' => __( 'Month', 'your-text-domain' ),
- 'WEEK' => __( 'Week', 'your-text-domain' ),
- 'DAY' => __( 'Day', 'your-text-domain' ),
- 'HOUR' => __( 'Hour', 'your-text-domain' ),
- ],
- 'columns' => 3,
- 'tab' => 'salary',
- ],
- [
- 'name' => __( 'Actual Salary', 'your-text-domain' ),
- 'id' => $prefix . 'job_salary',
- 'type' => 'text',
- 'label_description' => __( 'Mentioned Salary in the Advertisement', 'your-text-domain' ),
- 'desc' => __( 'Mention as 5,000 USD/Month or leave to default value', 'your-text-domain' ),
- 'std' => 'According to Standard Norms',
- 'size' => 6,
- 'columns' => 3,
- 'tab' => 'salary',
- ],
- [
- 'name' => __( 'University Name', 'your-text-domain' ),
- 'id' => $prefix . 'job_uni_name',
- 'type' => 'post',
- 'desc' => __( 'Type the Name of the University', 'your-text-domain' ),
- 'post_type' => ['emp'],
- 'field_type' => 'select',
- 'columns' => 3,
- 'tab' => 'hiring_organization',
- ],
- [
- 'name' => __( 'University URL', 'your-text-domain' ),
- 'id' => $prefix . 'job_uni_url',
- 'type' => 'text',
- 'label_description' => __( 'Select the University name to link the URL', 'your-text-domain' ),
- 'desc' => __( 'If not in the list, paste the University URL without https://', 'your-text-domain' ),
- 'columns' => 3,
- 'tab' => 'hiring_organization',
- ],
- [
- 'name' => __( 'University Section', 'your-text-domain' ),
- 'id' => $prefix . 'job_uni_section',
- 'type' => 'text',
- 'placeholder' => __( 'Type the Section name/Department', 'your-text-domain' ),
- 'size' => 6,
- 'columns' => 3,
- 'tab' => 'hiring_organization',
- ],
- [
- 'name' => __( 'University Department', 'your-text-domain' ),
- 'id' => $prefix . 'job_uni_dept',
- 'type' => 'text',
- 'placeholder' => __( 'Type the Department/School name/Locality', 'your-text-domain' ),
- 'required' => true,
- 'columns' => 3,
- 'tab' => 'hiring_organization',
- ],
- [
- 'name' => __( 'University City Name', 'your-text-domain' ),
- 'id' => $prefix . 'job_uni_city',
- 'type' => 'text',
- 'desc' => __( 'City Name', 'your-text-domain' ),
- 'size' => 6,
- 'columns' => 3,
- 'tab' => 'hiring_organization',
- ],
- [
- 'name' => __( 'University Post Code', 'your-text-domain' ),
- 'id' => $prefix . 'job_uni_post_code',
- 'type' => 'text',
- 'desc' => __( 'Pin code of the University Location', 'your-text-domain' ),
- 'size' => 3,
- 'columns' => 3,
- 'tab' => 'hiring_organization',
- ],
- [
- 'name' => __( 'Educational Qualification', 'your-text-domain' ),
- 'id' => $prefix . 'edu_qualification',
- 'type' => 'checkbox_list',
- 'options' => [
- 'PhD Degree' => __( 'PhD Degree', 'your-text-domain' ),
- 'Masters Degree' => __( 'Masters Degree', 'your-text-domain' ),
- 'Bachelors Degree' => __( 'Bachelors Degree', 'your-text-domain' ),
- 'Relevant Experience' => __( 'Relevant Experience', 'your-text-domain' ),
- ],
- 'tab' => 'application_details',
- ],
- [
- 'name' => __( 'Qualification Details', 'your-text-domain' ),
- 'id' => $prefix . 'job_qualifi_details',
- 'type' => 'wysiwyg',
- 'desc' => __( 'All qualification related information, if necessary add sub-heading (h3 tag) like preference, attitude,..', 'your-text-domain' ),
- 'tab' => 'application_details',
- ],
- [
- 'name' => __( 'How to Apply', 'your-text-domain' ),
- 'id' => $prefix . 'job_how_to_apply',
- 'type' => 'wysiwyg',
- 'tab' => 'application_details',
- ],
- [
- 'name' => __( 'Reference Number', 'your-text-domain' ),
- 'id' => $prefix . 'job_ref_number',
- 'type' => 'text',
- 'label_description' => __( 'Job Reference Number or Text given in the Post', 'your-text-domain' ),
- 'desc' => __( 'If nothing available, please use \'-\'', 'your-text-domain' ),
- 'std' => '-',
- 'columns' => 3,
- 'tab' => 'application_details',
- ],
- [
- 'name' => __( 'Documents Required', 'your-text-domain' ),
- 'id' => $prefix . 'job_doc_req',
- 'type' => 'wysiwyg',
- 'tab' => 'application_details',
- ],
- [
- 'name' => __( 'Responsibilities', 'your-text-domain' ),
- 'id' => $prefix . 'job_responsibilities',
- 'type' => 'wysiwyg',
- 'desc' => __( 'Responsibilities or Job description', 'your-text-domain' ),
- 'tab' => 'main_details',
- ],
- [
- 'name' => __( 'About Information', 'your-text-domain' ),
- 'id' => $prefix . 'job_about',
- 'type' => 'group',
- 'desc' => __( 'Title of the content (about the project or anything else)', 'your-text-domain' ),
- 'clone' => true,
- 'sort_clone' => true,
- 'add_button' => __( '+ Add more', 'your-text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Job CT About Title', 'your-text-domain' ),
- 'id' => $prefix . 'job_ct_about_title',
- 'type' => 'text',
- 'placeholder' => __( 'Enter the title of the content', 'your-text-domain' ),
- ],
- [
- 'name' => __( 'Job CT About Content', 'your-text-domain' ),
- 'id' => $prefix . 'job_ct_about_content',
- 'type' => 'wysiwyg',
- ],
- ],
- 'tab' => 'main_details',
- ],
- [
- 'name' => __( 'Note or Other Details', 'your-text-domain' ),
- 'id' => $prefix . 'job_note',
- 'type' => 'wysiwyg',
- 'desc' => __( 'Type the Notes or other information about the position else leave it', 'your-text-domain' ),
- 'std' => 'Nothing to mention',
- 'tab' => 'main_details',
- ],
- [
- 'name' => __( 'Inquiry Details', 'your-text-domain' ),
- 'id' => $prefix . 'job_inquiry',
- 'type' => 'group',
- 'clone' => true,
- 'add_button' => __( '+ add more', 'your-text-domain' ),
- 'fields' => [
- [
- 'name' => __( 'Name', 'your-text-domain' ),
- 'id' => $prefix . 'job_ct_inquiry_name',
- 'type' => 'text',
- 'desc' => __( 'Name of the person', 'your-text-domain' ),
- 'columns' => 4,
- ],
- [
- 'name' => __( 'Designation', 'your-text-domain' ),
- 'id' => $prefix . 'job_ct_inquiry_designation',
- 'type' => 'text',
- 'desc' => __( 'Designation of the person', 'your-text-domain' ),
- 'std' => 'Incharge',
- 'columns' => 4,
- ],
- [
- 'name' => __( 'Email', 'your-text-domain' ),
- 'id' => $prefix . 'job_ct_inquiry_email',
- 'type' => 'email',
- 'desc' => __( 'email address', 'your-text-domain' ),
- 'columns' => 4,
- ],
- [
- 'name' => __( 'Phone Number', 'your-text-domain' ),
- 'id' => $prefix . 'job_ct_inquiry_phone',
- 'type' => 'tel',
- 'desc' => __( 'phone number', 'your-text-domain' ),
- 'std' => '-',
- 'columns' => 4,
- ],
- ],
- 'tab' => 'contact_details',
- ],
- [
- 'name' => __( 'Job Adv Title', 'your-text-domain' ),
- 'id' => $prefix . 'job_adv_title',
- 'type' => 'text',
- 'desc' => __( 'Paste the title of position given in the advertisement', 'your-text-domain' ),
- 'columns' => 6,
- 'tab' => 'advertisement_details',
- ],
- [
- 'name' => __( 'Job Adv URL', 'your-text-domain' ),
- 'id' => $prefix . 'job_adv_url',
- 'type' => 'url',
- 'columns' => 6,
- 'tab' => 'advertisement_details',
- ],
- ],
- ];
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement