WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 21 months ago

#42273 new defect (bug)

Template_url calls index pge

Reported by: wassimo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8.2
Component: Themes Keywords: reporter-feedback
Focuses: template Cc:

Description

get_bloginfo("template_url")

When i use the function with these arguments
The function calls index.php and then return the url

So u can fix that by stop calling index

Test the code with

Mkdir() << inside index.php

Then use the function in page.php or single.php template
And see!.

Hope u credit me for this bug

Wasim .

Change History (5)

#1 @SergeyBiryukov
21 months ago

  • Component changed from General to Themes
  • Focuses template added

#2 @ocean90
21 months ago

  • Keywords reporter-feedback added

Hello @wassimo, welcome to WordPress Trac!

Does it still happen with all plugins disabled and a default theme activated?

#3 follow-up: @SergeyBiryukov
21 months ago

I'm not sure I see the issue, get_bloginfo( 'template_url' ) calls get_template_directory_uri(), which works in all templates and does not depend on index.php in any way.

#4 in reply to: ↑ 3 ; follow-up: @wassimo
21 months ago

Replying to SergeyBiryukov:

I'm not sure I see the issue, get_bloginfo( 'template_url' ) calls get_template_directory_uri(), which works in all templates and does not depend on index.php in any way.

It calls index.php in the template

Tou can create empty index.php with function like mkdir
Then get_bloginfo with template _url
U can see it will calls index.php and create a folder

#5 in reply to: ↑ 4 @SergeyBiryukov
21 months ago

Replying to wassimo:

Tou can create empty index.php with function like mkdir
Then get_bloginfo with template _url
U can see it will calls index.php and create a folder

WordPress calls index.php as a part of the template hierarchy. If I put a mkdir() call there, it would always be executed, with or without get_bloginfo( 'template_url' ). I don't see a bug here.

Version 0, edited 21 months ago by SergeyBiryukov (next)
Note: See TracTickets for help on using tickets.