// ADD THIS TO ALL SITES add_action('rest_api_init', function () { register_rest_route('alexk1919/v1', '/update-meta/(?P\d+)', array( 'methods' => 'POST', 'callback' => 'update_post_meta_callback', 'permission_callback' => function () { return current_user_can('edit_posts'); } )); }); function update_post_meta_callback($data) { $postId = $data['id']; $meta = $data->get_json_params(); if (isset($meta['rank_math_focus_keyword'])) { update_post_meta($postId, 'rank_math_focus_keyword', $meta['rank_math_focus_keyword']); } if (isset($meta['rank_math_description'])) { update_post_meta($postId, 'rank_math_description', $meta['rank_math_description']); } return new WP_REST_Response('Meta updated', 200); }Dr. Andrew Seung Ho Park - acupuntura.com

Médico Fisiatra e Neurofisiologista pela USP.