WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 2 years ago

Last modified 2 years ago

#7352 closed enhancement (fixed)

Improvement for wp_loginout and wp_register

Reported by: Txanny Owned by: Nicholas91
Priority: normal Milestone:
Component: Template Version: 2.6
Severity: normal Keywords:
Cc: dragos.nicholas@…

Description

I'm developing some themes and plugins that use this functions: wp_register() and wp_loginout(). Both functions display the output directly to the page, which makes a bit more difficult composing some templates and plugins.

I think could be interesting have the possibility to pass a parameter telling the functions if them should display or return the value. And also, both functions to have the same $before and $after parameters.

The patch implements this parameters. The default values for them makes the function to work exactly as it works now, but add some flexibility to template and plugin coders.

Attachments (1)

general-template.patch (1.4 KB) - added by Txanny 5 years ago.
Patch to enhance this functions by adding some parameters

Download all attachments as: .zip

Change History (8)

Txanny5 years ago

Patch to enhance this functions by adding some parameters

comment:1 ryan5 years ago

  • Milestone changed from 2.7 to 2.8

Moving enhancements to 2.8.

comment:2 Nicholas914 years ago

  • Cc dragos.nicholas@… added
  • Keywords has-patch added
  • Owner changed from anonymous to Nicholas91
  • Status changed from new to assigned

comment:3 Denis-de-Bernardy4 years ago

  • Keywords needs-patch added; wp_loginout wp_register has-patch removed
  • Milestone changed from 2.8 to Future Release

patch needs a refresh

comment:4 solarissmoke2 years ago

  • Keywords needs-patch removed
  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in [13048]

comment:5 hakre2 years ago

Keep in mind that there are output buffer functions in PHP and you can use echo to deal for anything in case that's not provided by the original function:

ob_start();
function_that_echos();
$ouput = ob_get_clean();

and

echo function_that_returns();
Last edited 2 years ago by hakre (previous) (diff)

comment:6 hakre2 years ago

Related/Duplcate: #11842

comment:7 nacin2 years ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.