Make WordPress Core

Opened 19 years ago

Closed 18 years ago

#6606 closed enhancement (fixed)

Pass tag name when using shortcodes

Reported by: Viper007Bond Owned by: tellyworth
Priority: normal Milestone: 2.7
Component: General Version: 2.5
Severity: normal Keywords: has-patch 2nd-opinion
Cc: Focuses:

Description

As far as I can tell, there's no way to know what tag a shortcode function is currently handling. This means one function can't handle multiple tags without the tags using wrapper functions to pass the tag.

Attached is a patch that passes the tag.

Suggested for 2.5.1 as well.

Attachments (3)

6606.patch​ (584 bytes ) - added by Viper007Bond 19 years ago.
6606.2.patch​ (581 bytes ) - added by Viper007Bond 19 years ago.
Pass a blank string rather than FALSE for the content
6606.3.patch​ (583 bytes ) - added by Viper007Bond 19 years ago.
Duh, no, pass NULL since it's not set. A blank string would be for [tag]tag.

Download all attachments as: .zip

Change History (7)

#1 @Viper007Bond
19 years ago

I meant "This means one function can't handle multiple tags without the tags going through wrapper functions first to pass the tag name to the main function."

@Viper007Bond
19 years ago

Pass a blank string rather than FALSE for the content

@Viper007Bond
19 years ago

Duh, no, pass NULL since it's not set. A blank string would be for [tag]tag.

#2 @ryan
19 years ago

  • Owner changed from anonymous to tellyworth

#3 @mdawaffe
18 years ago

  • Milestone 2.9 → 2.7

+1

#4 @ryan
18 years ago

  • Resolution → fixed
  • Status new → closed

(In [8613]) Pass tag name when using shortcodes. Props Viper007Bond. fixes #6606

Note: See TracTickets for help on using tickets.