|
@@ -6,11 +6,11 @@ discard block |
|
|
block discarded – undo |
|
6
|
6
|
use Flynt\Features\Components\Component; |
|
7
|
7
|
use Flynt\Utils\Asset; |
|
8
|
8
|
|
|
9
|
|
-add_action('wp_enqueue_scripts', function () { |
|
|
9
|
+add_action('wp_enqueue_scripts', function() { |
|
10
|
10
|
Component::enqueueAssets('HeroPostHeader', []); |
|
11
|
11
|
}); |
|
12
|
12
|
|
|
13
|
|
-add_filter('Flynt/addComponentData?name=HeroPostHeader', function ($data) { |
|
|
13
|
+add_filter('Flynt/addComponentData?name=HeroPostHeader', function($data) { |
|
14
|
14
|
$data['post'] = Timber::get_post(); |
|
15
|
15
|
$data['providers'] = getShareProviders( |
|
16
|
16
|
$data['post']->post_title, |
|
@@ -45,7 +45,7 @@ discard block |
|
|
block discarded – undo |
|
45
|
45
|
] |
|
46
|
46
|
]; |
|
47
|
47
|
|
|
48
|
|
- $providers = array_map(function ($provider) use ($postTitle, $postUrl, $postExcerpt) { |
|
|
48
|
+ $providers = array_map(function($provider) use ($postTitle, $postUrl, $postExcerpt) { |
|
49
|
49
|
$shareUrl = str_replace('$url', $postUrl, $provider['url']); |
|
50
|
50
|
$shareUrl = str_replace('$title', $postTitle, $shareUrl); |
|
51
|
51
|
$shareUrl = str_replace('$summary', $postExcerpt, $shareUrl); |
Please login to merge, or discard this patch.