Plugin Directory

Changeset 438973


Ignore:
Timestamp:
09/16/2011 09:52:26 AM (14 years ago)
Author:
roberto.c
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • nextgen-gallery-comments/tags/0.1.5/readme.txt

    r438970 r438973  
    6464If you want to customize it, copy it and paste in your theme inside `nggallery` folder (if this not exists, create it. This folder is needed to customize [NextGEN Gallery templates](http://nextgen-gallery.com/templates/))
    6565
     66= If i click the logout button in gallery comment form, the page is bad redirected. How can i fix it? =
     67
     68You have to use a filter to change the logout url:
     69
     70add_filter('your_function','rcwd_comment_form_defaults');
     71function your_function($defaults){
     72   global $user_identity, $post_id;
     73   if(get_query_var('gallery') != ''){
     74      $logout_url = esc_attr($_SERVER["REQUEST_URI"]);
     75   }else{
     76      $logout_url = get_permalink($post_id);
     77   }
     78   $defaults['logged_in_as'] = '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', $logout_url ) ) ) . '</p>';
     79
     80}
     81
    6682== Changelog ==
    6783
Note: See TracChangeset for help on using the changeset viewer.