I have a hook, that detects opening the post(publication):
add_action('the_post', 'post_callback');
function post_callback($post) {
$post->post_title = "New title";
$post->post_content = "New content";
}
It replaces post_title, $post->post_content
data on the custom values.
How to change HTML meta data on the page(title, description) inside function: post_callback
?