WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template:Trac



Description

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


Usage

{{Trac| $file_path | $branch_tag_trunk }}


Parameters

1 - $file_path
(string) (required) Path to file.
Default: None
2 - $branch_tag_trunk
(string) (optional) Path to 'branch version', 'tag version' or 'trunk'.
Default: tags/{{CurrentVersion}}
3 - $line
(string) (optional) Line in source file where tag is declared. Required $branch_tag_trunk parameter tags/version
Default: None

Usage

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