[wp-trac] [WordPress Trac] #35553: Wrap documentation PHP code snippets in backticks, not PHP tags.

WordPress Trac noreply at wordpress.org
Thu Jan 21 08:30:18 UTC 2016


#35553: Wrap documentation PHP code snippets in backticks, not PHP tags.
--------------------------+-----------------------------
 Reporter:  dotancohen    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35553>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list