WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#9882 closed enhancement (wontfix)

deprecate cat_is_ancestor_of() in favor of is_cat_ancestor_of()

Reported by: ramiy Owned by: ramiy
Milestone: Priority: lowest
Severity: minor Version: 2.7.1
Component: Template Keywords: has-patch
Focuses: Cc:

Description

change the name "cat_is_ancestor_of()" function to "is_cat_ancestor_of()" like all "is_*()" Conditional tags.

Attachments (2)

9882.patch (1.9 KB) - added by ramiy 5 years ago.
9882.2.patch (2.3 KB) - added by johnbillion 4 years ago.
refreshed patch for 3.0

Download all attachments as: .zip

Change History (12)

comment:1 Denis-de-Bernardy5 years ago

  • Component changed from General to Template
  • Keywords needs-patch added
  • Milestone changed from 2.8 to Future Release

comment:2 Denis-de-Bernardy5 years ago

  • Summary changed from cat_is_ancestor_of() to deprecate cat_is_ancestor_of() in favor of is_cat_ancestor_of()

ramiy5 years ago

comment:3 ramiy5 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 2.8.1

comment:4 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.8.1 to 2.9

enhancement

comment:5 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch removed

the deprecated function belongs in wp-includes/deprecated.php

comment:6 ramiy4 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to ramiy
  • Status changed from new to accepted

comment:7 ryan4 years ago

  • Milestone changed from 2.9 to Future Release

johnbillion4 years ago

refreshed patch for 3.0

comment:8 johnbillion4 years ago

  • Milestone changed from Future Release to 3.0

refreshed patch for 3.0

comment:9 nacin4 years ago

I'm not convinced here's a need for this. It's not a straight up conditional, it's more complex. We also have a handful of functions we use that are similar, and it's arguably more confusing. We also might be introducing post_is_of_type.

./wp-admin/import/blogger.php:116:	function token_is_valid() {
./wp-admin/includes/image.php:317:function file_is_valid_image($path) {
./wp-admin/includes/image.php:331:function file_is_displayable_image($path) {
./wp-admin/includes/misc.php:635:function win_is_writable($path) {
./wp-includes/category.php:209:function cat_is_ancestor_of( $cat1, $cat2 ) {
./wp-includes/functions.php:2048:function path_is_absolute( $path ) {
./wp-includes/functions.php:3084:function url_is_accessable_via_ssl($url)
./wp-includes/ms-functions.php:1146:function upload_is_user_over_quota( $echo = true ) {
./wp-includes/ms-functions.php:1270:function upload_is_file_too_big( $upload ) {
./wp-includes/post.php:3578:function wp_attachment_is_image( $post_id = 0 ) {
./wp-includes/post.php:4422:function wp_is_post_revision( $post ) {
./wp-includes/post.php:4438:function wp_is_post_autosave( $post ) {

comment:10 nacin4 years ago

  • Milestone 3.0 deleted
  • Resolution set to wontfix
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.