render(); $html = ob_get_clean(); $return_object = array( 'html' => $html ); echo json_encode($return_object);exit; } add_action('wp_ajax_mkdf_listing_job_get_custom_field_html','mkdf_listing_job_get_custom_field_html'); } if(!function_exists('mkdf_listing_job_get_option_field_html')){ function mkdf_listing_job_get_option_field_html(){ if(isset($_POST['parentId'])){ $id = $_POST['parentId']; }else{ $id = ''; } $field = new Lib\CustomOptionField('', '', $id); ob_start(); $field->render(); $html = ob_get_clean(); $return_array = array( 'html' => $html ); echo json_encode($return_array);exit; } add_action('wp_ajax_mkdf_listing_job_get_option_field_html','mkdf_listing_job_get_option_field_html'); } if(!function_exists('mkdf_listing_job_add_repeater_option_button')){ /** * Generate html for repeater button */ function mkdf_listing_job_add_repeater_option_button(){ $html = ''; $html .= ''; $html .= esc_html__('Add new', 'mkdf-listing'); $html .= ''; print staffscout_mikado_display_content_output($html); } add_action('mkdf_listing_job_action_add_repeater_option_trigger', 'mkdf_listing_job_add_repeater_option_button'); } if(!function_exists('mkdf_listing_job_delete_repeater_option_button')){ /** * Generate html for repeater button */ function mkdf_listing_job_delete_repeater_option_button(){ $html = ''; $html .= ''; $html .= esc_html__('Remove', 'mkdf-listing'); $html .= ''; print staffscout_mikado_display_content_output($html); } add_action('mkdf_listing_job_action_delete_repeater_option_trigger', 'mkdf_listing_job_delete_repeater_option_button'); } if(!function_exists('mkdf_listing_job_taxonomy_delete_custom_row')){ /** * Generate html for row close button */ function mkdf_listing_job_taxonomy_delete_custom_row(){ $html = ''; $html .= ''; $html .= ''.esc_html('x').''; $html .= ''; print staffscout_mikado_display_content_output($html); } add_action('mkdf_listing_job_action_delete_custom_row', 'mkdf_listing_job_taxonomy_delete_custom_row'); } if(!function_exists('mkdf_listing_job_expand_custom_row_trigger')){ function mkdf_listing_job_expand_custom_row_trigger(){ $html = ''; $html .= ''; $html .= ''.esc_html('-').''; $html .= ''; print staffscout_mikado_display_content_output($html); } add_action('mkdf_listing_job_action_expand_custom_row', 'mkdf_listing_job_expand_custom_row_trigger'); }