Difference between revisions of "Template:MW src"
Jump to navigation
Jump to search
Template documentation
Joelmartin (talk | contribs) m (1 revision imported) |
Joelmartin (talk | contribs) m (Text replacement - "<tvar|1>" to "") |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<languages/> | <languages/> | ||
− | </noinclude>{{#switch: | + | </noinclude>{{#switch: |
| = | | = | ||
− | + | [https://doc.wikimedia.org/mediawiki-core/master/php/{{{1}}}_8{{{2}}}_source.html <tvar|file>{{#if:{{{1|}}}|{{{1}}}.{{{2}}}|{{BASEPAGENAME}}}} source code] on MediaWiki master. | |
| #default = | | #default = | ||
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:MW src|noshift=1}} | {{#invoke:Template translation|renderTranslatedTemplate|template=Template:MW src|noshift=1}} | ||
Line 9: | Line 9: | ||
{{Documentation|content= | {{Documentation|content= | ||
− | |||
− | |||
− | + | == Usage == | |
+ | |||
+ | |||
This template generates a link to the source code of the file in MediaWiki master in the generated PHP [[Doxygen]] documentation. | This template generates a link to the source code of the file in MediaWiki master in the generated PHP [[Doxygen]] documentation. | ||
− | |||
− | |||
− | < | + | {{Note|1= Doxygen's treatment of source files tends to be... odd. It strips all comments that look like Doxygen tags and structure commands, assuming you'll follow its link "Go to the documentation of this file." Instead of this template you can use <tvar|file>{{tl|git file}}.}} |
− | == Parameters == | + | |
− | + | ||
+ | == Parameters == | ||
+ | |||
<nowiki>{{MW src|name|ext}}</nowiki> | <nowiki>{{MW src|name|ext}}</nowiki> | ||
− | + | ||
− | + | ||
where: | where: | ||
− | |||
− | |||
− | |||
− | < | + | * ''name'' - file name. |
− | == Examples == | + | * ''ext'' - file extension, e.g. <code>.php</code>, <code>.inc</code>, etc. |
− | + | ||
+ | |||
+ | == Examples == | ||
+ | |||
* <nowiki>{{MW src|Maintenance|php}}</nowiki> | * <nowiki>{{MW src|Maintenance|php}}</nowiki> | ||
{{MW src|Maintenance|php}} | {{MW src|Maintenance|php}} |
Latest revision as of 18:13, 21 December 2019
[https://doc.wikimedia.org/mediawiki-core/master/php/{{{1}}}_8{{{2}}}_source.html <tvar

Usage
This template generates a link to the source code of the file in MediaWiki master in the generated PHP Doxygen documentation.
file>{{git file}}.
Parameters
{{MW src|name|ext}}
where:
- name - file name.
- ext - file extension, e.g.
.php
,.inc
, etc.
Examples
- {{MW src|Maintenance|php}}
[https://doc.wikimedia.org/mediawiki-core/master/php/Maintenance_8php_source.html <tvar