Opened 2 years ago

Closed 2 years ago

Last modified 5 months ago

#16177 closed enhancement (invalid)

bloginfo() to return https/ssl url

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

Description

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);
  break;

Attachments (1)

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

Download all attachments as: .zip

Change History (7)

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

  • Type changed from defect (bug) to enhancement

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 2 years ago by linuxologos (previous) (diff)
  • Keywords 2nd-opinion close needs-codex added; bloginfo https ssl secure url removed
  • 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.

  • Keywords 2nd-opinion needs-codex removed
  • Keywords close removed
Note: See TracTickets for help on using tickets.