Make WordPress Core

Opened 17 years ago

Closed 13 years ago

Last modified 10 years ago

#11890 closed enhancement (wontfix)

allow get_the_content to accept post ID

Reported by: williamsba1 Owned by: williamsba1
Priority: normal Milestone:
Component: Template Version: 2.9.1
Severity: normal Keywords:
Cc: Focuses:

Description

The function get_the_content currently doesn't accept a post ID as a parameter. I'm suggesting adding this as a fourth parameter allowing this function to work like get_the_title does.

I'll supply a patch if this sounds like a good idea

Change History (4)

#1 @Denis-de-Bernardy
17 years ago

  • Component GeneralTemplate
  • Keywords close added
  • Milestone UnassignedFuture Release
  • Version2.9.1

It's one of those weirdness'. it's at least partially due to the fact that the_content() and the_permalink() each have a highly popular filter that get_the_content() and get_permalink() don't have.

Suggesting wontfix and that we revisit this after we re-engineer this part of WP.

#2 @c3mdigital
13 years ago

  • Keywords close removed
  • Resolutionwontfix
  • Status newclosed

We tried it in [24301] then removed it in [24598].

For get_the_content() and the_content(), this only worsens the function prototype. It muddies theme-specific display (more links, etc) with filtered content. apply_filters( 'the_content', $post->post_content ) is sufficient practice for now.

#3 @SergeyBiryukov
13 years ago

  • Milestone Future Release

#4 @ocean90
10 years ago

#34480 was marked as a duplicate.

Note: See TracTickets for help on using tickets.