Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist for my article Building a Gutenberg sidebar plugin Part 5: Outputting data https://vanaf1979.nl/building-a-gutenberg-sidebar-plugin-part-5-outputting-data/
<?php
public function add_title_to_head( String $title ) : string {
global $post;
$title = \trim( \get_post_meta( $post->ID , 'metatags_browser_title' , true ) );
return $title > '' ? $title : $post->post_title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment