Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#9882 closed enhancement (wontfix)

deprecate cat_is_ancestor_of() in favor of is_cat_ancestor_of()

Reported by: ramiy's profile ramiy Owned by: ramiy's profile 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 15 years ago.
9882.2.patch (2.3 KB) - added by johnbillion 14 years ago.
refreshed patch for 3.0

Download all attachments as: .zip

Change History (12)

#1 @Denis-de-Bernardy
15 years ago

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

#2 @Denis-de-Bernardy
15 years ago

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

@ramiy
15 years ago

#3 @ramiy
15 years ago

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

#4 @Denis-de-Bernardy
15 years ago

  • Milestone changed from 2.8.1 to 2.9

enhancement

#5 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch removed

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

#6 @ramiy
15 years ago

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

#7 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

@johnbillion
14 years ago

refreshed patch for 3.0

#8 @johnbillion
14 years ago

  • Milestone changed from Future Release to 3.0

refreshed patch for 3.0

#9 @nacin
14 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 ) {

#10 @nacin
14 years ago

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