Trac

From SytechPedia



Description[edit]

Link to the source code on https://core.trac.wordpress.org/browser/.


Usage[edit]

{{Trac| $file_path | $branch_tag_trunk }}


Parameters[edit]

|1 - $file_path=string

|2 - $branch_tag_trunk=string

|3 - $line=string

Usage[edit]

Link to the latest stable version:

{{Trac|wp-includes/version.php}}

Output: wp-includes/version.php

Link to trunk:

{{Trac|wp-includes/version.php|trunk}}

Output: wp-includes/version.php

Link to branch 2.9:

{{Trac|wp-includes/version.php|branches/2.9}}

Output: wp-includes/version.php

Link to tag 3.0.1:

{{Trac|wp-includes/version.php|tags/3.0.1}}

Output: wp-includes/version.php

Link to tag 3.0.1 line 3:

{{Trac|wp-includes/version.php|tags/3.0.1|3}}

Output: wp-includes/version.php

Link to tag 3.0.1 with link text '3.0.1':

{{Trac|3.0.1|tags}}

Output: 3.0.1


Issues[edit]

Trac tags/branches older than 3.7 do not have the wikipedia source code in the base 'src' folder. A conditional should be placed on the second parameter to check if the tag/branch is 3.6.1 or lower and not include the hard-coded 'src/' path of the URL.