Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#16177 closed enhancement (invalid)

bloginfo() to return https/ssl url

Reported by: jtlowe22 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: General Keywords:
Focuses: Cc:


bloginfo() should include a parameter that allows the function to return the 'https' URL string.

example: bloginfo("secure_url")

case 'secure_url' :
  $output =  home_url();
  $output = str_replace('http://', 'https://', $output);

Attachments (1)

general-template.php (78.8 KB) - added by jtlowe22 7 years ago.
general-template.php containing the updated bloginfo() parameter

Download all attachments as: .zip

Change History (7)

7 years ago

general-template.php containing the updated bloginfo() parameter

#1 @jtlowe22
7 years ago

  • Type changed from defect (bug) to enhancement

#2 @linuxologos
7 years ago

Why not use home_url( , 'https' ) instead?

BTW, bloginfo( 'url' ) is deprecated according to the codex, but actually it's not in the core...

Last edited 7 years ago by linuxologos (previous) (diff)

#3 @linuxologos
7 years ago

  • Keywords 2nd-opinion close needs-codex added; bloginfo https ssl secure url removed

#4 @westi
7 years ago

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

we are not adding new sections to bloginfo.

You should use the already existing functions with are SSL aware like home_url, site_url etc.

#5 @mbijon
5 years ago

  • Keywords 2nd-opinion needs-codex removed

#6 @markoheijnen
5 years ago

  • Keywords close removed
Note: See TracTickets for help on using tickets.