/* Template Name: User Submit Content
* The template for displaying submit forms for front-end content submission
*
* @package WordPress
* @subpackage BookYourTravel
* @since Book Your Travel 1.0
*/
global $enable_accommodations;
global $frontend_submit;
if ( !is_user_logged_in() || !$enable_accommodations || !current_user_can($frontend_submit->get_manage_permissions()) ) {
wp_redirect( get_home_url() );
exit;
}
get_header('accommodation');
byt_breadcrumbs();
get_sidebar('under-header');
global $post;
$page_id = $post->ID;
$page_custom_fields = get_post_custom( $page_id );
$current_url = get_permalink( $page_id );
$content_type = 'accommodation';
if (isset($page_custom_fields['frontend_submit_content_type'])) {
$content_type = $page_custom_fields['frontend_submit_content_type'][0];
$frontend_submit->prepare_form($content_type);
}
$my_account_page_id = get_current_language_page_id(of_get_option('my_account_page', ''));
$my_account_page = get_permalink($my_account_page_id);
$submit_room_types_url_id = get_current_language_page_id(of_get_option('submit_room_types_url', ''));
$submit_room_types_url = get_permalink($submit_room_types_url_id);
$submit_accommodations_url_id = get_current_language_page_id(of_get_option('submit_accommodations_url', ''));
$submit_accommodations_url = get_permalink($submit_accommodations_url_id);
$submit_accommodation_vacancies_url_id = get_current_language_page_id(of_get_option('submit_accommodation_vacancies_url', ''));
$submit_accommodation_vacancies_url = get_permalink($submit_accommodation_vacancies_url_id);
$list_user_room_types_url_id = get_current_language_page_id(of_get_option('list_user_room_types_url', ''));
$list_user_room_types_url = get_permalink($list_user_room_types_url_id);
$list_user_accommodations_url_id = get_current_language_page_id(of_get_option('list_user_accommodations_url', ''));
$list_user_accommodations_url = get_permalink($list_user_accommodations_url_id);
$list_user_accommodation_vacancies_url_id = get_current_language_page_id(of_get_option('list_user_accommodation_vacancies_url', ''));
$list_user_accommodation_vacancies_url = get_permalink($list_user_accommodation_vacancies_url_id);
?>
Create vacancies