WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 5 years ago

#9927 closed enhancement (maybelater)

deprecate category_description() in favor of get_category_description()

Reported by: ramiy Owned by: westi
Milestone: Priority: normal
Severity: minor Version: 2.8
Component: Taxonomy Keywords: has-patch
Focuses: Cc:

Description


Attachments (6)

9927.patch (1.4 KB) - added by ramiy 12 years ago.
9927.2.patch (1.4 KB) - added by ramiy 11 years ago.
ver.2
9927.3.patch (1.4 KB) - added by ramiy 11 years ago.
sorry, here is the latest
9927.4.patch (2.1 KB) - added by ramiy 11 years ago.
category_description() & tag_description()
9927.5.patch (3.2 KB) - added by ramiy 11 years ago.
category_description() & tag_description() & term_description()
9927.6.patch (3.2 KB) - added by DrewAPicture 7 years ago.
refresh + docs fixes

Download all attachments as: .zip

Change History (22)

@ramiy
12 years ago

#1 @ramiy
12 years ago

  • Keywords has-patch added; category removed

#2 @westi
12 years ago

  • Milestone changed from 2.8 to 2.9
  • Owner set to westi
  • Status changed from new to accepted

Nice idea. Not for 2.8

#3 @ramiy
12 years ago

if you liked this change, check #9882 too.

#4 @Denis-de-Bernardy
11 years ago

patch needs a slight update to change the versions, else probably good to go

#5 @peaceablewhale
11 years ago

How about tag_description(), which was introduced in 2.8?

@ramiy
11 years ago

ver.2

@ramiy
11 years ago

sorry, here is the latest

@ramiy
11 years ago

category_description() & tag_description()

#6 @ramiy
11 years ago

  • category_description() deprecate in favor of get_category_description()
  • tag_description() deprecate in favor of get_tag_description()

The old function are still in use in deprecated.php file.

#7 @ryan
11 years ago

  • Milestone changed from 2.9 to 3.0

#8 @nacin
11 years ago

  • Type changed from feature request to enhancement

This is a good idea, though I'm not convinced this is worth it. If we're going to do this, we'll need to rename term_description() as well.

#9 follow-up: @ramiy
11 years ago

nacin, we can rename term_description() as well.

#10 in reply to: ↑ 9 @nacin
11 years ago

Replying to ramiy:

nacin, we can rename term_description() as well.

I wasn't convinced it was worth it because that's three functions to rename, simply for get_* consistency. Surely we have other functions that don't start with "get_", especially those that also don't start with "the_", that return a value. I suppose this is considered a template tag, so I understand why we should probably do it here.

#11 @nacin
11 years ago

  • Component changed from Template to Inline Docs

@ramiy
11 years ago

category_description() & tag_description() & term_description()

#12 @nacin
11 years ago

  • Milestone changed from 3.0 to 3.1

#13 @nacin
10 years ago

  • Milestone changed from Awaiting Triage to Future Release

#14 @ericlewis
7 years ago

  • Component changed from Inline Docs to Taxonomy

Seems more properly categorized Taxonomy, this doesn't look like Inline Docs to me

@DrewAPicture
7 years ago

refresh + docs fixes

#15 @DrewAPicture
7 years ago

9927.6.patch is a refresh at r25361, and fixes the formatting for the deprecated functions.

#16 @wonderboymusic
5 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from accepted to closed

category-template.php is full of deprecate-able funcs, but there are too many uses in the wild for this to be worth worrying about right now: https://github.com/search?l=php&p=1&q=category_description&type=Code&utf8=%E2%9C%93

Note: See TracTickets for help on using tickets.