Bug 151764 - Fix social meta for home page
Summary: Fix social meta for home page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jon Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-02 12:22 PST by Jon Davis
Modified: 2015-12-08 12:43 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.76 KB, patch)
2015-12-07 16:02 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Patch (5.70 KB, patch)
2015-12-08 09:48 PST, Jon Davis
no flags Details | Formatted Diff | Diff
Patch (5.86 KB, patch)
2015-12-08 11:38 PST, Jon Davis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Davis 2015-12-02 12:22:49 PST
The social meta for schema.org, Twitter Card and Open Graph is not useful for the homepage.
Comment 1 Jon Davis 2015-12-07 16:02:44 PST
Created attachment 266824 [details]
Patch
Comment 2 Timothy Hatcher 2015-12-07 16:10:25 PST
Comment on attachment 266824 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=266824&action=review

> Websites/webkit.org/wp-content/plugins/social-meta.php:42
> +<?php if ( '' !== ( $twitter_handle = get_the_author_meta('twitter') ) ): ?>

The reverse order reads better to me.

($twitter_handle = get_the_author_meta('twitter')) != ""

Do you even need the != ""? Empty string is false in PHP. Just the extra () should work.

The mix of ' and " bothers me too.
Comment 3 Timothy Hatcher 2015-12-07 16:15:48 PST
Comment on attachment 266824 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=266824&action=review

> Websites/webkit.org/wp-content/plugins/social-meta.php:14
> +        $type = "article";

I forgot single vs double quotes have differences in PHP, unlike JS.  These string here should likely be single quoted to match other static strings.
Comment 4 Jon Davis 2015-12-08 09:48:53 PST
Created attachment 266900 [details]
Patch
Comment 5 Jon Davis 2015-12-08 11:38:06 PST
Created attachment 266919 [details]
Patch
Comment 6 WebKit Commit Bot 2015-12-08 12:43:53 PST
Comment on attachment 266919 [details]
Patch

Clearing flags on attachment: 266919

Committed r193772: <http://trac.webkit.org/changeset/193772>
Comment 7 WebKit Commit Bot 2015-12-08 12:43:56 PST
All reviewed patches have been landed.  Closing bug.