WordPress.org

Make WordPress Core

Opened 20 months ago

Last modified 20 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
20 months ago

  • Component changed from General to Themes
  • Focuses template added

#2 @ocean90
20 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
20 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
20 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
20 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 loads 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.

Last edited 20 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.