Last active
October 10, 2018 21:13
-
-
Save eto4detak/a48e703133393a6c9cff1bf2d528b818 to your computer and use it in GitHub Desktop.
wp php add_meta_box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('add_meta_boxes', 'wpestate_add_property_metaboxes'); | |
if( !function_exists('wpestate_add_property_metaboxes') ): | |
function wpestate_add_property_metaboxes() { | |
add_meta_box('new_tabbed_interface', esc_html__('Property Details', 'wpresidence-core'), 'estate_tabbed_interface', 'estate_property', 'normal', 'default' ); | |
} | |
endif; // end wpestate_add_property_metaboxes | |
if( !function_exists('estate_tabbed_interface') ): | |
function estate_tabbed_interface(){ | |
global $post; | |
print'<div class="property_options_wrapper meta-options"> | |
<div class="property_options_wrapper_list"> | |
<div class="property_tab_item active_tab" data-content="property_details">'.esc_html__('Property Details','wpresidence-core').'</div> | |
<div class="property_tab_item " data-content="property_media">'.esc_html__('Property Media','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_customs">'.esc_html__('Property Custom Fields','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_map" id="property_map_trigger">'.esc_html__('Map','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_features">'.esc_html__('Amenities and Features','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_agent">'.esc_html__('Agent','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_floor">'.esc_html__('Floor Plans','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_paid">'.esc_html__('Paid Submission','wpresidence-core').'</div> | |
<div class="property_tab_item" data-content="property_subunits">'.esc_html__('Property Subunits','wpresidence-core').'</div> | |
</div> | |
<div class="property_options_content_wrapper"> | |
<div class="property_tab_item_content active_tab" id="property_details"><h3>'.esc_html__('Property Details','wpresidence-core').'</h3>'; | |
wpestate_estate_box(); | |
print'</div> | |
<div class="property_tab_item_content " id="property_media"><h3>'.esc_html__('Property Media','wpresidence-core').'</h3>'; | |
wpestate_property_add_media(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_customs"><h3>'.esc_html__('Property Custom','wpresidence-core').'</h3>'; | |
wpestate_custom_details_box(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_map"><h3>'.esc_html__('Map','wpresidence-core').'</h3>'; | |
wpestate_map_estate_box(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_features"><h3>'.esc_html__('Amenities and Features','wpresidence-core').'</h3>'; | |
wpestate_amenities_estate_box(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_agent"><h3>'.esc_html__('Responsible Agent / User','wpresidence-core').'</h3>'; | |
wpestate_agentestate_box(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_floor"><h3>'.esc_html__('Floor Plans','wpresidence-core').'</h3>'; | |
wpestate_floorplan_box(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_paid"><h3>'.esc_html__('Paid Submission','wpresidence-core').'</h3>'; | |
wpestate_estate_paid_submission(); | |
print'</div> | |
<div class="property_tab_item_content" id="property_subunits"><h3>'.esc_html__('Property Subunits','wpresidence-core').'</h3>'; | |
wpestate_propery_subunits(); | |
print'</div> | |
</div> | |
</div>'; | |
} | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment