This commit is contained in:
Ben Goldsworthy 2021-01-23 13:54:14 +00:00
parent aba542d60d
commit f650e53d9b
4 changed files with 118 additions and 116 deletions

View file

@ -14,6 +14,7 @@
// Gets all of the roles attached to the given organisation.
$company = get_queried_object();
echo '<!-- ' . wp_kses_post( $company->name ) . '-->';
// phpcs:disable WordPress.DB.SlowDBQuery.slow_db_query_tax_query
$args = array(
'post_type' => array( 'job' ),
'tax_query' => array(
@ -25,6 +26,7 @@
),
'posts_per_page' => -1,
);
// phpcs:enable
$loop = new WP_Query( $args );
?>
@ -66,7 +68,7 @@
$end_date = get_post_meta( get_the_ID(), 'end-date', true );
$item_title = htmlspecialchars_decode( strip_tags( get_the_title() ) );
$item_title = htmlspecialchars_decode( wp_strip_all_tags( get_the_title() ) );
$start = get_the_date();
$end = ( ! $end_date || ( $end_date && $end_date > gmdate( 'Y-m-d' ) ) ) ? gmdate( 'Y-m-d' ) : $end_date;
echo wp_kses_post( "[ '" . html_entity_decode( $companies[ $lowest_depth_company ]->name ) . "', '$item_title', new Date('$start'), new Date('$end') ],\n" );