Make WordPress Core

Opened 7 years ago

Closed 3 years ago

#42273 closed defect (bug) (worksforme)

Template_url calls index pge

Reported by: wassimo's profile wassimo Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.2
Component: Themes Keywords: reporter-feedback close
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 (7)

#1 @SergeyBiryukov
7 years ago

  • Component changed from General to Themes
  • Focuses template added

#2 @ocean90
7 years 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
7 years 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
7 years 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
7 years 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 7 years ago by SergeyBiryukov (next)

#6 @hellofromTonya
3 years ago

  • Keywords close added

Hello @wassimo,

Does this problem persist for you today? If yes, please share more information for us to investigate.

I'm marking this as a close candidate per Sergey's last comment: "I don't see a bug here."

#7 @hellofromTonya
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Closing this ticket. However, if the problem persists, please reopen and provide more information to help us further investigate.

Note: See TracTickets for help on using tickets.