WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#41153 closed defect (bug) (fixed)

Formally deprecate screen_icon() and get_screen_icon()

Reported by: DrewAPicture Owned by: ippei-sumida
Milestone: 4.9 Priority: normal
Severity: normal Version: 3.8
Component: Administration Keywords: good-first-bug has-patch
Focuses: Cc:

Description

Previously, screen_icon() and get_screen_icon() were "informally" deprecated during the 3.8 cycle in [26537] for #26119.

The informal deprecation happened due to the proximity to final release. We're now more than 10 releases later and these two functions were never formally deprecated – that is, completed with _deprecated_function() calls.

This has now come up in #41121. So I think we should probably formally deprecate them now without much issue.

Attachments (1)

41153.diff (580 bytes) - added by Ippei Sumida 2 years ago.

Download all attachments as: .zip

Change History (6)

@Ippei Sumida
2 years ago

#1 @swissspidy
2 years ago

@Ippei Sumida Thanks for your patch! Would you mind updating it according to the inline docs recommendations in https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-2-deprecated-functions?

#2 @Ippei Sumida
2 years ago

@swissspidy Thank you for your checking! inline docs is following now. It seems no problem, I think.
Would you mind telling me what's wrong?

<?php
/**
 * Displays a screen icon.
 *
 * @since 2.7.0
 * @since 3.8.0 Screen icons are no longer used in WordPress. This function no longer produces output.
 * @deprecated 3.8.0 Use get_screen_icon()
 * @see get_screen_icon()
 */

/**
 * Retrieves the screen icon (no longer used in 3.8+).
 *
 * @deprecated 3.8.0
 *
 * @return string
 */

#3 @DrewAPicture
2 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to ippei-sumida
  • Status changed from new to assigned

Assigning to mark the good-first-bug as "claimed".

#4 @DrewAPicture
2 years ago

  • Milestone changed from Awaiting Review to 4.9

#5 @DrewAPicture
2 years ago

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

In 41274:

Administration: Explicitly deprecate screen_icon() and get_screen_icon(), which were soft-deprecated in [26537] for 3.8.0.

Props ippei-sumida for the initial patch.
Fixes #41153.

Note: See TracTickets for help on using tickets.