Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#37701 closed defect (bug) (fixed)

Update documentation for wp_register_style

Reported by: rklis Owned by:
Milestone: WordPress.org Priority: normal
Severity: normal Version: 4.6
Component: WordPress.org Site Keywords:
Focuses: docs Cc:


Documentation for https://codex.wordpress.org/Function_Reference/wp_register_style needs to be updated.

It is returning (bool) true/false instead of void. It is very helpful for duplicate IDs, it would be good if it reminds us in doc :)

Change History (4)

#1 @tareiking
5 years ago

  • Keywords needs-codex 2nd-opinion added

The function return value is correctly referenced as bool https://developer.wordpress.org/reference/functions/wp_register_style#return

(bool) Whether the script has been registered. True on success, false on failure.

Codex return value needs to be updated to match.

#2 @SergeyBiryukov
5 years ago

  • Component changed from Help/About to Script Loader

Hi @rklis, welcome to Trac!

Codex is a wiki (like Wikipedia), which means anyone with a WordPress.org account (including you!) can edit content themselves if information is outdated or incorrect.

#3 @dd32
5 years ago

  • Component changed from Script Loader to WordPress.org site
  • Keywords needs-codex 2nd-opinion removed
  • Milestone changed from Awaiting Review to WordPress.org
  • Resolution set to fixed
  • Status changed from new to closed

@tareiking has updated the codex.

@rklis The codex is a Wiki, any logged in user can update the codex when you find a bug in the documentation there, especially if you'd like to improve upon the documentation that's already there.

#4 @rklis
5 years ago

Thank guys #noobalert - every day learning something new.

Note: See TracTickets for help on using tickets.