WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14870 closed defect (bug) (fixed)

first parameter of wp_admin_css() is not optional in docblock

Reported by: hakre Owned by:
Milestone: 3.1 Priority: normal
Severity: minor Version: 3.1
Component: Inline Docs Keywords: has-patch
Focuses: Cc:

Description

It is either a documentation problem or a code problem:

wp_admin_css( 'css/global' );
wp_admin_css();
wp_admin_css( 'css/colors' );
wp_admin_css( 'css/ie' );

See second line. In /wordpress-trunk/wp-admin/admin-header.php line 37.

Attachments (2)

14870.patch (354 bytes) - added by hakre 4 years ago.
Not optional.
14870.2.patch (699 bytes) - added by hakre 4 years ago.
Documentation problem.

Download all attachments as: .zip

Change History (9)

hakre4 years ago

Not optional.

hakre4 years ago

Documentation problem.

comment:1 hakre4 years ago

I provided a patch for both cases, I think it's the documentation problem (second patch) as the parameter is optional in code.

comment:2 nacin4 years ago

function wp_admin_css( $file = 'wp-admin', $force_echo = false ) looks optional to me.

comment:3 hakre4 years ago

  • Summary changed from first parameter of wp_admin_css() is not optional to first parameter of wp_admin_css() is not optional in docblock

comment:4 hakre4 years ago

  • Component changed from General to Inline Docs

comment:5 hakre4 years ago

  • Version set to 3.1

comment:6 nacin4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15616]) Make note of an optional argument. props hakre, fixes #14870.

comment:7 nacin4 years ago

  • Milestone changed from Awaiting Review to 3.1
Note: See TracTickets for help on using tickets.