feat: model projects as posts with a picked Selected work

Projects were hardcoded h3 elements in a pattern: no URL, no feed, no
search, uneditable without touching PHP. They follow the podcast model
now, a chrnx_topic term plus posts.

Adds a chrnx_project_featured flag with an editor toggle so the stage
lists chosen projects first and fills with the most recent. Sticky was
already spoken for by the home featured stories, so the choice needed
its own signal. journal-stream gains a pinned topic attribute, reusing
the archive filter, pagination and empty state it already had.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:41:24 -05:00
1 parent a3ba692669
commit f55d9d9b45
14 files changed
+539 -31

No files matched your search

+5 -2
View File
@@ -45,7 +45,7 @@ class EditorAssetsTest extends WP_UnitTestCase {
* Clear only the CHRNX editor script state.
*/
private function reset_editor_scripts() {
foreach ( array( 'chrnx-editor-taxonomies', 'chrnx-editor-podcast' ) as $handle ) {
foreach ( array( 'chrnx-editor-taxonomies', 'chrnx-editor-podcast', 'chrnx-editor-project', 'chrnx-editor-track' ) as $handle ) {
wp_dequeue_script( $handle );
wp_deregister_script( $handle );
}
@@ -83,13 +83,14 @@ class EditorAssetsTest extends WP_UnitTestCase {
)
);
$this->assertSame( array( 'chrnx-editor-taxonomies', 'chrnx-editor-podcast' ), $handles );
$this->assertSame( array( 'chrnx-editor-taxonomies', 'chrnx-editor-podcast', 'chrnx-editor-project', 'chrnx-editor-track' ), $handles );
$expected_dependencies = array( 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins' );
foreach (
array(
'chrnx-editor-taxonomies' => 'assets/js/editor-taxonomies.js',
'chrnx-editor-podcast' => 'assets/js/editor-podcast.js',
'chrnx-editor-project' => 'assets/js/editor-project.js',
) as $handle => $asset
) {
$this->assertArrayHasKey( $handle, $scripts->registered );
@@ -122,6 +123,8 @@ class EditorAssetsTest extends WP_UnitTestCase {
do_action( 'enqueue_block_editor_assets' );
$this->assertFalse( wp_script_is( 'chrnx-editor-taxonomies', 'enqueued' ) );
$this->assertFalse( wp_script_is( 'chrnx-editor-podcast', 'enqueued' ) );
$this->assertFalse( wp_script_is( 'chrnx-editor-project', 'enqueued' ) );
$this->assertFalse( wp_script_is( 'chrnx-editor-track', 'enqueued' ) );
}
}