#35553 closed defect (bug) (fixed)
Wrap documentation PHP code snippets in backticks, not PHP tags.
| Reported by: | dotancohen | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | Comments | Version: | 4.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description (last modified by )
The src/wp-includes/taxonomy.php file contains a PHPDoc comment with the following PHP snippet:
`<?php $taxonomies = get_object_taxonomies('post'); ?>`
To be in consistency with other PHP snippets, this should be changed to:
`$taxonomies = get_object_taxonomies('post')`
I have searched for other similar instances in the WP code, but found only this single example, the other two hits are different contexts:
$ grep -rP "\*.*\?php" *
src/wp-includes/js/customize-loader.js: * e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open Customizer</a>
src/wp-includes/taxonomy.php: * `<?php $taxonomies = get_object_taxonomies('post'); ?>` Should
src/wp-admin/includes/file.php: <input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> />
Note that this change is not simply academic. The redundant PHP tags break VIM PHPDoc processing.
Find patch attached to ticket. Thank you.
Attachments (2)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Diff file which resolves the issue.