WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#9634 closed defect (bug) (invalid)

Filter on logout link + Diff

Reported by: nicolagreco Owned by: nicolagreco
Milestone: Priority: normal
Severity: normal Version: 2.7.1
Component: Users Keywords: has-patch
Focuses: Cc:

Description

If i would like to add &cal=1 on every wp_logout() call i can't, cause the $redirect_to is not passed by a filter in wp-login.php

Look at the diff file.

here is a workflow of that change

function force_gets($args) {

$args .= '&cal=1';

}
add_filter( 'wp_logout_link', 'force_gets' );

Attachments (1)

logoutlink-filter.patch (347 bytes) - added by nicolagreco 6 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 @nicolagreco6 years ago

  • Summary changed from Filter on logut link + Diff to Filter on logout link + Diff

comment:2 @nicolagreco6 years ago

another example could be

function force_gets($args) {

global $current_user

if ( 2 != (int)$current_user->ID )

$args .= '&user=2';

}
add_filter( 'wp_logout_link', 'force_gets' );

comment:3 @Denis-de-Bernardy6 years ago

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

there is a logout_url filter in trunk.

Note: See TracTickets for help on using tickets.