<?php
/**
 * Template part for displaying the job description block
 *
 * @link        https://matadorjobs.com/
 *
 * @since       3.90
 *
 * @package     Matador Jobs
 * @subpackage  Blocks
 * @author      Matador Software LLC, Jeremy Scott, Paul Bearne
 * @copyright   (c) 2017-2025, Matador Software, LLC
 *
 * @license     https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
 */

$wrapper_attributes = get_block_wrapper_attributes();

$job_id = isset( $attributes['postId'] ) ? $attributes['postId'] : null;

$limit = ( isset( $attributes['limit'] ) && $attributes['isLimited'] ) ? $attributes['limit'] : 'full';

printf(
	'<div %1$s>%2$s</div>',
	$wrapper_attributes,
	matador_get_the_job_description( $job_id, $limit ),
);
