WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 6 weeks ago

Last modified 6 weeks ago

#53413 closed enhancement (fixed)

Update the docs for $wp_version

Reported by: azaozz Owned by: SergeyBiryukov
Milestone: 5.9 Priority: low
Severity: normal Version:
Component: General Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

In addition to holding the version number the WordPress version string is used to bust caches and to enable development mode for scripts when running from /src. Ideally that should be explained in the DocBlock for $wp_version.

Attachments (1)

53413.PNG (63.6 KB) - added by muhammadfaizanhaidar 6 weeks ago.
updated doc block for $wp_version global variable.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
4 months ago

  • Keywords good-first-bug added

#2 follow-up: @muhammadfaizanhaidar
6 weeks ago

Hi @azaozz @SergeyBiryukov I would love to contribute to this ticket. I need to know either I need to update $wp_version doc block in version.php where it has been defined or somewhere else also? Thanks

#3 in reply to: ↑ 2 @azaozz
6 weeks ago

Replying to muhammadfaizanhaidar:

Yes, the docblock in version.php is the right place. Thanks.

This ticket was mentioned in PR #1675 on WordPress/wordpress-develop by MuhammadFaizanHaidar.


6 weeks ago

  • Keywords has-patch added

Updated the doc block for $wp_version
Updated the doc block to "The WordPress version string. Holds the current version number for WordPress Core, used to bust caches and to enable development mode for scripts when running from /src."

Trac ticket: https://core.trac.wordpress.org/ticket/53413

File details
wp-includes/version.php line 12.

https://github.com/MuhammadFaizanHaidar/wordpress-develop/blob/master/src/wp-includes/version.php

#5 @muhammadfaizanhaidar
6 weeks ago

@azaozz @SergeyBiryukov I have just uploaded a patch please review and tell me if any changes are required. Thanks!

@muhammadfaizanhaidar
6 weeks ago

updated doc block for $wp_version global variable.

#6 @SergeyBiryukov
6 weeks ago

  • Milestone changed from Future Release to 5.9

#7 @SergeyBiryukov
6 weeks ago

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

In 51809:

Docs: Update description for the $wp_version global.

In addition to holding the version number, the WordPress version string is used to bust caches and to enable development mode for scripts when running from the /src directory.

Follow-up to [803], [2585], [6554], [47230].

Props muhammadfaizanhaidar, azaozz.
Fixes #53413.

Note: See TracTickets for help on using tickets.