feat(editorial): widen sections and add local track pages

Unify the editorial canvas across section pages, keep release tracks out of Journal, and give each song a listening surface with audio, metadata, platform links, sharing, and optional featured art. Document and seed the local The No Names fixture without changing production data.
This commit is contained in:
chrnx committed 2026-08-27 20:24:39 -05:00
1 parent 135b462bd2
commit 76917decd0
23 files changed
+770 -50

No files matched your search

+9
View File
@@ -27,5 +27,14 @@ function chrnx_enqueue_assets() {
array( 'chrnx-layout' ),
CHRNX_VERSION
);
if ( is_singular( 'post' ) ) {
wp_enqueue_script(
'chrnx-track-share',
get_theme_file_uri( 'assets/js/track-share.js' ),
array(),
CHRNX_VERSION,
true
);
}
}
add_action( 'wp_enqueue_scripts', 'chrnx_enqueue_assets' );
+13
View File
@@ -124,6 +124,12 @@ function chrnx_get_eligible_editorial_post_ids( $extra_args = array() ) {
'cache_results' => false,
'suppress_filters' => false,
'chrnx_require_nonempty_title' => true,
'tax_query' => array(
array(
'taxonomy' => 'chrnx_release',
'operator' => 'NOT EXISTS',
),
),
),
$extra_args,
array( 'posts_per_page' => $limit )
@@ -487,6 +493,13 @@ function chrnx_get_journal_query_args( array $request ): array {
if ( ! empty( $tax_query ) ) {
$args['tax_query'] = $tax_query;
}
$args['tax_query'][] = array(
'taxonomy' => 'chrnx_release',
'operator' => 'NOT EXISTS',
);
if ( 1 < count( $args['tax_query'] ) ) {
$args['tax_query']['relation'] = 'AND';
}
$search = chrnx_sanitize_journal_search( $request['s'] ?? '' );
if ( '' !== $search ) {
+1 -1
View File
@@ -127,7 +127,7 @@ function chrnx_get_platform_links_markup( array $links, $class_name = 'chrnx-pla
}
$items .= sprintf(
// The icon path data is a fixed literal, never user input.
'<li><a class="%1$s__link" href="%2$s" target="_blank" rel="noopener noreferrer external"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">%3$s</svg><span class="chrnx-screen-reader-text">%4$s</span></a></li>',
'<li><a class="%1$s__link" href="%2$s" target="_blank" rel="noopener noreferrer external"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">%3$s</svg><span class="%1$s__label">%4$s</span></a></li>',
esc_attr( $class_name ),
esc_url( $url ),
$platforms[ $platform ]['icon'], // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+1
View File
@@ -52,6 +52,7 @@ function chrnx_get_editorial_taxonomies() {
'el-hermoso-caos' => __( 'El Hermoso Caos que habita en mi cabeza', 'chrnx' ),
'ando-bien-arriba' => __( 'Ando Bien Arriba', 'chrnx' ),
'aqui-se-rompio-una-jerga' => __( 'Aquí se Rompió una Jerga', 'chrnx' ),
'side-b' => __( 'Side B', 'chrnx' ),
),
),
'chrnx_project' => array(
+3 -2
View File
@@ -24,8 +24,9 @@ function chrnx_auth_track_meta( $allowed, $meta_key, $post_id ) {
*/
function chrnx_get_track_meta_definitions() {
$definitions = array(
'chrnx_track_number' => 'absint',
'chrnx_track_audio' => 'absint',
'chrnx_track_number' => 'absint',
'chrnx_track_audio' => 'absint',
'chrnx_track_description' => 'sanitize_textarea_field',
);
foreach ( array_keys( chrnx_get_release_platforms() ) as $platform ) {