Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#9634 closed defect (bug) (invalid)

Filter on logout link + Diff

Reported by: nicolagreco's profile nicolagreco Owned by: nicolagreco's profile 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 16 years ago.

Download all attachments as: .zip

Change History (4)

#1 @nicolagreco
16 years ago

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

#2 @nicolagreco
16 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' );

#3 @Denis-de-Bernardy
16 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.