File tree 2 files changed +22
-23
lines changed
2 files changed +22
-23
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,9 @@ function site_header(string $title = 'Hypertext Preprocessor', array $config = [
424
424
{
425
425
global $ MYSITE ;
426
426
427
+ $ meta_image_path = $ MYSITE . 'images/meta-image.png ' ;
428
+ $ meta_description = "PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world. " ;
429
+
427
430
$ defaults = [
428
431
"lang " => myphpnet_language (),
429
432
"current " => "" ,
@@ -432,6 +435,25 @@ function site_header(string $title = 'Hypertext Preprocessor', array $config = [
432
435
'layout_span ' => 9 ,
433
436
"cache " => false ,
434
437
"headsup " => "" ,
438
+ 'meta_tags ' => <<<META
439
+ <meta name="Description" content=" {$ meta_description }" />
440
+
441
+ <meta name="twitter:card" content="summary_large_image" />
442
+ <meta name="twitter:site" content="@official_php" />
443
+ <meta name="twitter:title" content="PHP: Hypertext Preprocessor" />
444
+ <meta name="twitter:description" content=" {$ meta_description }" />
445
+ <meta name="twitter:creator" content="@official_php" />
446
+ <meta name="twitter:image:src" content=" {$ meta_image_path }" />
447
+
448
+ <meta itemprop="name" content="PHP: Hypertext Preprocessor" />
449
+ <meta itemprop="description" content=" $ meta_description" />
450
+ <meta itemprop="image" content=" {$ meta_image_path }" />
451
+
452
+ <meta property="og:image" content=" {$ meta_image_path }" />
453
+ <meta property="og:description" content=" $ meta_description" />
454
+
455
+ <link href="https://fosstodon.org/@php" rel="me" />
456
+ META
435
457
];
436
458
437
459
$ config = array_merge ($ defaults , $ config );
Original file line number Diff line number Diff line change 118
118
</div>
119
119
EOF ;
120
120
121
- // Write out common header
122
- $ meta_image_path = $ MYSITE . 'images/meta-image.png ' ;
123
- $ meta_description = "PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world. " ;
124
-
125
121
site_header ("Hypertext Preprocessor " ,
126
122
[
127
123
'current ' => 'home ' ,
149
145
],
150
146
'css ' => ['home.css ' ],
151
147
'intro ' => $ intro ,
152
- 'meta_tags ' => <<<META
153
- <meta name="Description" content=" {$ meta_description }" />
154
-
155
- <meta name="twitter:card" content="summary_large_image" />
156
- <meta name="twitter:site" content="@official_php" />
157
- <meta name="twitter:title" content="PHP: Hypertext Preprocessor" />
158
- <meta name="twitter:description" content=" {$ meta_description }" />
159
- <meta name="twitter:creator" content="@official_php" />
160
- <meta name="twitter:image:src" content=" {$ meta_image_path }" />
161
-
162
- <meta itemprop="name" content="PHP: Hypertext Preprocessor" />
163
- <meta itemprop="description" content=" $ meta_description" />
164
- <meta itemprop="image" content=" {$ meta_image_path }" />
165
-
166
- <meta property="og:image" content=" {$ meta_image_path }" />
167
- <meta property="og:description" content=" $ meta_description" />
168
-
169
- <link href="https://fosstodon.org/@php" rel="me" />
170
- META
171
148
],
172
149
);
173
150
You can’t perform that action at this time.
0 commit comments