/** * Plugin Name: Expose Yoast SEO meta to REST API * Description: Makes _yoast_wpseo_* fields writable via the WP REST API for agent-driven SEO edits (Linear MAR-60). */ add_action('init', function () { $keys = ['_yoast_wpseo_metadesc', '_yoast_wpseo_title', '_yoast_wpseo_canonical']; foreach ($keys as $key) { register_post_meta('post', $key, [ 'show_in_rest' => true, 'single' => true, 'type' => 'string', 'auth_callback' => function () { return current_user_can('edit_posts'); }, ]); } });











