WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 2 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:

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 4 years ago.
general-template.php containing the updated bloginfo() parameter

Download all attachments as: .zip

Change History (7)

@jtlowe224 years ago

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

comment:1 @jtlowe224 years ago

  • Type changed from defect (bug) to enhancement

comment:2 @linuxologos4 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 4 years ago by linuxologos (previous) (diff)

comment:3 @linuxologos4 years ago

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

comment:4 @westi4 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.

comment:5 @mbijon2 years ago

  • Keywords 2nd-opinion needs-codex removed

comment:6 @markoheijnen2 years ago

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