/** * 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'); }, ]); } }); Code Tutorials Archives | Page 7 of 16 | Rollbar

Code Tutorials

Python

See all posts

JavaScript

See all posts

Java

See all posts

PHP

See all posts

Ruby

See all posts

DOTNET

See all posts

C#

See all posts

GoLang

See all posts

C++

See all posts

Scala

See all posts