social: use photo entry image

This commit is contained in:
onli 2016-09-08 00:05:42 +02:00
parent 39894418eb
commit ba0e8d93ba
2 changed files with 4 additions and 1 deletions

View file

@ -1,7 +1,8 @@
0.12:
* Ignore smileys graphics for og:image
* Use entry picture from the timeline theme if set
* Use entry picture from the photo theme if set
0.11:
* Re-use description set in the metadesc-plugin

View file

@ -162,6 +162,8 @@ class serendipity_event_social extends serendipity_event {
$social_image = $this->get_config('social_image', '');
if (isset($entry['properties']) && isset($entry['properties']['timeline_image'])) {
$social_image = $entry['properties']['timeline_image'];
} else if (isset($entry['properties']) && isset($entry['properties']['ep_featuredImage'])) {
$social_image = $entry['properties']['ep_featuredImage'];
} else {
// This is searching for the first image in an entry to use as facebook article image.
// A better approach would be to register in the entry editor when an image was added