[wp-trac] [WordPress Trac] #31248: Optimizations for wp-admin/includes/template.php

WordPress Trac noreply at wordpress.org
Fri Feb 6 12:08:38 UTC 2015


#31248: Optimizations for wp-admin/includes/template.php
----------------------------+-----------------------------
 Reporter:  ipm-frommen     |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  docs, template  |
----------------------------+-----------------------------
 Originally, I just wanted to replace the missing short description of the
 `get_inline_data` function with the comment directly placed above the
 PHPDoc block. But then I fixed several other things that either my IDE
 complained about or that I just saw while plowing through the code.

 Applying the attached patch does the following:

 * add short description to `get_inline_data` function;
 * replace default value `'1'` of `int` variable `$position` in
 `wp_comment_reply` function with `1`;
 * replace empty `return;` statements for `_list_meta_row` function with
 `@return string` PHPDoc comment with `return '';`;
 * replace default value `false` of `string` variable `$selected` in
 `wp_dropdown_roles` function with `''`;
 * replace loose comparison with strict string comparison in
 `wp_dropdown_roles` function;
 * remove unused (last!) argument `$limit_styles` in `iframe_header`
 function (as well as the according PHPDoc comment);
 * remove unused globalization of `$current_user` variable in
 `iframe_header` function;
 * add missing `@return string` PHPDoc comment for `get_submit_button`
 function;
 * replace default values `null` of `string` variable `$text` and `array`
 variable `$other_attribues` in `get_submit_button` function with
 appropirate values (i.e., `''` and `array()`);
 * add missing `@param` PHPDoc comments for `enqueue_scripts` and
 `dismiss_pointers_for_new_users` functions.

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


More information about the wp-trac mailing list