Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Conversation

@Ladsgroup
Copy link
Member

This would help greatly if we want to share in twitter or facebook and shows a nice little card. We already done that for Wikipedia articles and Wikidata items.

Useful links:

header.php Outdated
<?php if ( is_single() ) {
echo '<meta property="og:image" content="' . the_post_thumbnail( 'large' ) . '"/>';
echo '<meta property="og:description" content="' . bloginfo( 'description' ) . '"/>';
echo '<meta property="og:title" content="' . single_post_title() . '"/>';
Copy link
Member

@Krinkle Krinkle May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably these three values need escaping?

Also, single_post_title() echoes by default instead of returning, which means it will echo it before the current line (if understand correctly).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and done

header.php Outdated
<link rel="pingback" href="<?php echo esc_attr( get_bloginfo( 'pingback_url' ) ); ?>" />
<?php if ( is_single() ) {
echo '<meta property="og:image" content="' . the_post_thumbnail( 'large' ) . '"/>';
echo '<meta property="og:description" content="' . bloginfo( 'description' ) . '"/>';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bloginfo() echoes, use get_bloginfo() instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

header.php Outdated
<link rel="shortcut icon" href="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/images/favicon.ico" />
<link rel="pingback" href="<?php echo esc_attr( get_bloginfo( 'pingback_url' ) ); ?>" />
<?php if ( is_single() ) {
echo '<meta property="og:image" content="' . the_post_thumbnail( 'large' ) . '"/>';
Copy link
Member

@Krinkle Krinkle May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Ladsgroup
Copy link
Member Author

Thanks for the review

@Ladsgroup
Copy link
Member Author

@Volker-E
Copy link
Contributor

Volker-E commented Jun 1, 2017

LGTM code-wise. Waiting for legal feedback…

@Volker-E Volker-E self-requested a review June 19, 2017 11:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants