[webkit-reviews] review granted: [Bug 206327] Add support for categories and custom post types to the social meta plugin : [Attachment 387935] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 16 11:43:17 PST 2020


Devin Rousso <drousso at apple.com> has granted Jon Davis <jond at apple.com>'s
request for review:
Bug 206327: Add support for categories and custom post types to the social meta
plugin
https://bugs.webkit.org/show_bug.cgi?id=206327

Attachment 387935: Patch

https://bugs.webkit.org/attachment.cgi?id=387935&action=review




--- Comment #4 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 387935
  --> https://bugs.webkit.org/attachment.cgi?id=387935
Patch

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

r=me, but this needs to be rebased

> Websites/webkit.org/wp-content/plugins/social-meta.php:32
> +	   $description = "A repository of all ".get_bloginfo('name')."blog
posts.";

Style: I think we should have spaces around `.`
Also, I think there should be a space before "blog".

> Websites/webkit.org/wp-content/plugins/social-meta.php:48
> +	   $title = get_bloginfo('name')." Blog ".get_the_archive_title();
> +	   $description = "A collection of ".get_bloginfo('name')." blog
posts.";

Ditto (32)

> Websites/webkit.org/wp-content/plugins/social-meta.php:60
> +	       preg_match_all('/<img.+src(set)?=[\'"]([^\s\'"]+).*[\'"].*>/i',
$post->post_content, $matches);

This means that we will never use dark mode images.  Is that OK, or do we
prefer that instead?

> Websites/webkit.org/wp-content/plugins/social-meta.php:61
> +	       if (isset($matches[2][0])) $image_url = $matches[2][0];

Style: please put the body of the `if` on a separate line.


More information about the webkit-reviews mailing list