<?php /* JOB */

wpj_add_shortcode( 'job_map_overview',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_map_overview', [ 'args' => $atts ] );
});
wpj_add_shortcode( 'job_categories_list',      function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_all_categories_and_subcategories', [ 'include_parents_without_children' => false ] );
});
wpj_add_shortcode( 'job_popular_categories',   function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_popular_categories', [ 'taxonomy' => 'job_cat', 'number' => '6', 'display_title' => 'no' ] );
});
wpj_add_shortcode( 'recently_viewed_jobs',     function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_recently_viewed', [ 'uid' => '', 'display_title' => 'no' ] );
});
wpj_add_shortcode( 'recently_bought_job',      function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_recently_bought', [ 'uid' => '', 'display_title' => 'no' ] );
});
wpj_add_shortcode( 'job_posts_list',           function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_posts_list', [ 'args' => $atts ] );
});
wpj_add_shortcode( 'job_posts_list_3',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_latest_job_posts', [ 'cols' => 3, 'load_type' => 'button' ] );
});
wpj_add_shortcode( 'job_posts_list_4',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_latest_job_posts', [ 'cols' => 4, 'load_type' => 'button' ] );
});
wpj_add_shortcode( 'user_favorites_jobs_list', function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_user_favorites_jobs_list' );
});

/* MY ACCOUNT */

wpj_add_shortcode( 'user_account_notices',     function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_user_account_notices' );
});
wpj_add_shortcode( 'job_bulk_action_button',   function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_bulk_action_button' );
});
wpj_add_shortcode( 'user_jobs_number',         function( $atts = '' ) {
	$_atts = shortcode_atts( [ 'uid' => '', 'order_status' => '' ], $atts );
	return  '<span class="item-count">' . wpj_get_user_jobs_count( $_atts['uid'], $_atts['order_status'] ) . '</span>';
});
wpj_add_shortcode( 'user_posted_jobs_list',    function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_user_posted_jobs_list', [ 'tab' => '' ] );
});

/* POST NEW */

wpj_add_shortcode( 'post_new_job_notices',     function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_post_new_notices' );
});

/* SINGLE JOB */

wpj_add_shortcode( 'job_author',               function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_author', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_cover',                function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_cover_image', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_location',             function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_location', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_stars_number',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_rating_stars', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_reviews_number',       function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_reviews_number', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_queue_number',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_order_queue_number', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_delivery_days_number', function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_delivery_days_number', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_social_share_panel',   function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_social_share_icons', [ 'include_favorites' => '' ] );
});
wpj_add_shortcode( 'job_description',          function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_description', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_instructions',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_buyer_instructions', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_faq',                  function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_faq', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_audio',                function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_audio', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_preview',              function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_preview', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_map',                  function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_map', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_package_table',        function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_packages_for_pc', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_package_tabs',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_packages_for_mobile', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_payment_form',         function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_order_form', [ 'pid' => '', 'display_location' => '', 'with_label' => '' ] );
});
wpj_add_shortcode( 'job_payment_buy_button',   function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_order_button', [ 'button_type' => '', 'pid' => '' ] );
});
wpj_add_shortcode( 'job_reviews',              function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_review_text' );
});
wpj_add_shortcode( 'job_suggested_list',       function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_suggested_jobs_list', [ 'pid' => '', 'author' => '' ] );
});
wpj_add_shortcode( 'job_custom_fields',        function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_custom_fields', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_package_sidebar',      function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_packages_for_sidebar', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_or_offer_button',      function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_or_offer_button', [ 'pid' => '', 'page' => 'single_job', 'location' => '' ] );
});
wpj_add_shortcode( 'job_user_icons',           function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_user_info_icons', [ 'uid' => '', 'filter' => '', 'pid' => '' ] );
});
wpj_add_shortcode( 'job_tags',                 function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_tags', [ 'pid' => '' ] );
});
wpj_add_shortcode( 'job_views',                function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_views', [ 'pid' => '', 'display_label' => false ] );
});
wpj_add_shortcode( 'job_basic_details',        function( $atts = '' ) {
	return wpj_fnc_to_shortcode( $atts, 'wpj_display_job_basic_details', [ 'pid' => '', 'display_location' => '', 'package_nr' => '' ] );
});