WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#23924 closed defect (bug) (duplicate)

get_template_part() doesn't pass variables

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

Description

If I'm not mistaken neither locate_template(); nor get_template_part(); passes variables. This is different than PHP's include() and thus causes unexpected behavior.

When someone includes a file then there's a 95% chance that they will want to use its variables but it's not possible at this moment.

Change History (1)

#1 @ocean90
8 years ago

  • Component changed from General to Template
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 3.5.1 deleted

Duplicate of #21676.

Note: See TracTickets for help on using tickets.