Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28346 closed defect (bug) (fixed)

Deprecated notice for get_current_site_name() does not mention its alternative

Reported by: jesin's profile jesin Owned by:
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: General Keywords: has-patch commit
Focuses: docs, multisite Cc:

Description

Using get_current_site_name() displays the following PHP notice.

get_current_site_name is deprecated since version 3.9 with no alternative available.

But the alternative for this function is get_current_site() and the codex clearly mentions this.

Attachments (3)

28346.diff (563 bytes) - added by jesin 10 years ago.
28346.2.diff (582 bytes) - added by jesin 10 years ago.
Corrected inline docs in the previous patch
28346.3.diff (505 bytes) - added by jesin 10 years ago.
Replacement for wp_cache_reset()

Download all attachments as: .zip

Change History (10)

@jesin
10 years ago

#1 @kpdesign
10 years ago

Hi Jesin, thanks for the patch!

Quick note on the docs - there should only be one @deprecated tag in the block. Could you change the line to the following, and submit a new patch please?

* @deprecated 3.9.0 Use get_current_site() instead.

@jesin
10 years ago

Corrected inline docs in the previous patch

#2 follow-up: @jesin
10 years ago

  • Keywords has-patch added

Hi Kim,

I have done that. But I find many functions in deprecated.php, ms-deprecated.php and pluggable-deprecated.php have two @deprecated tags.

@jesin
10 years ago

Replacement for wp_cache_reset()

#3 in reply to: ↑ 2 @kpdesign
10 years ago

  • Focuses docs added

Replying to jesin:

I have done that. But I find many functions in deprecated.php, ms-deprecated.php and pluggable-deprecated.php have two @deprecated tags.

Thanks for the new patch.

Most of the functions in those files were moved there (and the @deprecated tags added) before the inline docs standard was written last year. Those blocks have not been updated to the new standard.

I'll add this issue to our agenda for discussion at this week's Inline Docs meeting.

#4 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.0

#5 @DrewAPicture
10 years ago

  • Keywords commit added

28346.2.diff looks good.

@jesin: Don't worry about fixing the older deprecated tags here. If we decide to update them, we'll do them all at once at a future date.

#6 @SergeyBiryukov
10 years ago

28346.3.diff reverts a part of [22111]. wp_cache_switch_to_blog() doesn't appear to be a direct replacement for wp_cache_reset().

#7 @SergeyBiryukov
10 years ago

  • Focuses multisite added
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [28573].

Note: See TracTickets for help on using tickets.