refactor: drop the featured-project picker in favour of the project list

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-15 14:58:19 -05:00
1 parent 7c0eb51dcc
commit 77dc2ee33b
12 files changed
+6 -362

No files matched your search

-53
View File
@@ -262,59 +262,6 @@ function chrnx_get_featured_story_ids( int $limit = 3 ): array {
return $selected;
}
/**
* Select projects for the Selected work stage: hand-picked first, then recent.
*
* Sticky already belongs to the home featured stories, so the editorial choice
* lives in its own per-post flag instead of competing for the same signal.
*
* @param int $limit Maximum projects, bounded to 12.
* @return int[] Selected project post IDs.
*/
function chrnx_get_selected_project_ids( int $limit = 3 ): array {
$limit = min( 12, max( 0, $limit ) );
if ( 0 === $limit ) {
return array();
}
$topic_query = array(
array(
'taxonomy' => 'chrnx_topic',
'field' => 'slug',
'terms' => 'projects',
),
);
$selected = chrnx_get_eligible_editorial_post_ids(
array(
'posts_per_page' => $limit,
'tax_query' => $topic_query,
'meta_query' => array(
array(
'key' => 'chrnx_project_featured',
'value' => '1',
),
),
)
);
$remaining = $limit - count( $selected );
if ( $remaining > 0 ) {
$selected = array_merge(
$selected,
chrnx_get_eligible_editorial_post_ids(
array(
'posts_per_page' => $remaining,
'post__not_in' => $selected,
'tax_query' => $topic_query,
)
)
);
}
return $selected;
}
/**
* Validate a request taxonomy slug against an existing editorial term.
*