Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37701 closed defect (bug) (fixed)

Update documentation for wp_register_style

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

Description

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
8 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
8 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
8 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
8 years ago

Thank guys #noobalert - every day learning something new.

Note: See TracTickets for help on using tickets.