@@ -323,30 +323,13 @@ function manual_setup($setup): void {
323
323
];
324
324
site_header ($ setup ["this " ][1 ] . " - Manual " , $ config );
325
325
326
- $ id = substr ($ setup ['this ' ][0 ], 0 , -4 );
327
- $ repo = strtolower ($ config ['lang ' ]); // pt_BR etc.
328
-
329
- $ edit_url = "https://github.com/php/doc- {$ repo }" ;
330
- // If the documentation source information is available (generated using
331
- // doc-base/configure.php and PhD) then try and make a source-specific URL.
332
- if (isset ($ setup ['source ' ])) {
333
- $ source_lang = $ setup ['source ' ]['lang ' ];
334
- if ($ source_lang === $ repo || $ source_lang === 'base ' ) {
335
- $ edit_url = "https://github.com/php/doc- {$ source_lang }/blob/master/ {$ setup ['source ' ]['path ' ]}" ;
336
- }
337
- }
338
-
339
326
$ languageChooser = manual_language_chooser ($ config ['lang ' ], $ config ['thispage ' ]);
340
327
341
328
echo <<<PAGE_TOOLS
342
329
<div class="page-tools">
343
330
<div class="change-language">
344
331
{$ languageChooser }
345
332
</div>
346
- <div class="edit-bug">
347
- <a href=" {$ edit_url }">Submit a Pull Request</a>
348
- <a href="https://github.com/php/doc- {$ repo }/issues/new?body=From%20manual%20page:%20https:%2F%2Fphp.net%2F $ id%0A%0A---">Report a Bug</a>
349
- </div>
350
333
</div>
351
334
PAGE_TOOLS ;
352
335
}
@@ -381,9 +364,35 @@ CHANGE_LANG;
381
364
return trim ($ r );
382
365
}
383
366
384
- function manual_footer (): void {
367
+ function manual_footer ($ setup ): void {
385
368
global $ USERNOTES , $ __RELATED ;
386
369
370
+ $ id = substr ($ setup ['this ' ][0 ], 0 , -4 );
371
+ $ repo = strtolower ($ setup ["head " ][1 ]); // pt_BR etc.
372
+
373
+ $ edit_url = "https://github.com/php/doc- {$ repo }" ;
374
+ // If the documentation source information is available (generated using
375
+ // doc-base/configure.php and PhD) then try and make a source-specific URL.
376
+ if (isset ($ setup ['source ' ])) {
377
+ $ source_lang = $ setup ['source ' ]['lang ' ];
378
+ if ($ source_lang === $ repo || $ source_lang === 'base ' ) {
379
+ $ edit_url = "https://github.com/php/doc- {$ source_lang }/blob/master/ {$ setup ['source ' ]['path ' ]}" ;
380
+ }
381
+ }
382
+
383
+ echo <<<CONTRIBUTE
384
+ <div class="contribute">
385
+ <h3 class="title">Improve This Page</h3>
386
+ <div class="edit-bug">
387
+ <a href="https://github.com/php/doc-base/blob/master/README.md" title="This will take you to our contribution guidelines on GitHub." target="_blank" rel="noopener noreferrer">Learn how improve this page</a>
388
+ •
389
+ <a href=" {$ edit_url }">Submit a Pull Request</a>
390
+ •
391
+ <a href="https://github.com/php/doc- {$ repo }/issues/new?body=From%20manual%20page:%20https:%2F%2Fphp.net%2F $ id%0A%0A---">Report a Bug</a>
392
+ </div>
393
+ </div>
394
+ CONTRIBUTE ;
395
+
387
396
manual_notes ($ USERNOTES );
388
397
site_footer ([
389
398
'related_menu ' => $ __RELATED ['toc ' ],
0 commit comments