feat: UiProse prose component with link highjacking

This commit is contained in:
2026-01-13 22:19:23 -05:00
parent 764bc6aeea
commit 40becf1135
9 changed files with 909 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
<?php
// Convert absolute URLs to relative in link query
add_filter( 'wp_link_query', 'moonshine_tinymce_relative_urls' );
function moonshine_tinymce_relative_urls( $results ) {
foreach ( $results as &$result ) {
if ( empty( $result['permalink'] ) ) {
continue;
}
$result['permalink'] = str_replace( get_home_url(), '', $result['permalink'] );
}
return $results;
}