Ticket #7790: 7790.003.diff
| File 7790.003.diff, 8.2 KB (added by , 17 years ago) |
|---|
-
wp-login.php
272 272 switch ($action) { 273 273 274 274 case 'logout' : 275 275 check_admin_referer('log-out'); 276 276 wp_logout(); 277 277 278 278 $redirect_to = 'wp-login.php?loggedout=true'; -
wp-includes/functions.php
2201 2201 $trans['edit']['theme'] = array( __( 'Your attempt to edit this theme file: "%s" has failed.' ), 'use_id' ); 2202 2202 $trans['switch']['theme'] = array( __( 'Your attempt to switch to this theme: "%s" has failed.' ), 'use_id' ); 2203 2203 2204 $trans['log']['out'] = array( sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'sitename' ) ), false ); 2205 2204 2206 if ( isset( $trans[$verb][$noun] ) ) { 2205 2207 if ( !empty( $trans[$verb][$noun][1] ) ) { 2206 2208 $lookup = $trans[$verb][$noun][1]; … … 2234 2236 $html = wp_specialchars( wp_explain_nonce( $action ) ); 2235 2237 if ( wp_get_referer() ) 2236 2238 $html .= "</p><p><a href='" . remove_query_arg( 'updated', clean_url( wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; 2239 elseif ( 'log-out' == $action ) 2240 $html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_nonce_url( site_url('wp-login.php?action=logout', 'login'), 'log-out' ) ); 2241 2237 2242 wp_die( $html, $title); 2238 2243 } 2239 2244 -
wp-includes/general-template.php
104 104 */ 105 105 function wp_loginout() { 106 106 if ( ! is_user_logged_in() ) 107 $link = '<a href="' . site_url('wp-login.php', 'login') . '">' . __('Log in') . '</a>';107 $link = '<a href="' . wp_login_url() . '">' . __('Log in') . '</a>'; 108 108 else 109 $link = '<a href="' . site_url('wp-login.php?action=logout', 'login') . '">' . __('Log out') . '</a>';109 $link = '<a href="' . wp_logout_url() . '">' . __('Log out') . '</a>'; 110 110 111 111 echo apply_filters('loginout', $link); 112 112 } 113 113 114 114 /** 115 * Returns the Log Out URL. 116 * 117 * Returns the URL that allows the user to log out of the site 118 * 119 * @since 2.7 120 * @uses wp_nonce_url() To protect against CSRF 121 * @uses site_url() To generate the log in URL 122 * 123 * @param string $redirect Path to redirect to on logout. 124 */ 125 function wp_logout_url($redirect = '') { 126 if ( strlen($redirect) ) 127 $redirect = "&redirect_to=$redirect"; 128 129 return wp_nonce_url( site_url("wp-login.php?action=logout$redirect", 'login'), 'log-out' ); 130 } 131 132 /** 133 * Returns the Log In URL. 134 * 135 * Returns the URL that allows the user to log in to the site 136 * 137 * @since 2.7 138 * @uses site_url() To generate the log in URL 139 * 140 * @param string $redirect Path to redirect to on login. 141 */ 142 function wp_login_url($redirect = '') { 143 if ( strlen($redirect) ) 144 $redirect = "?redirect_to=$redirect"; 145 146 return site_url("wp-login.php$redirect", 'login'); 147 } 148 149 /** 115 150 * Display the Registration or Admin link. 116 151 * 117 152 * Display a link which allows the user to navigate to the registration page if -
wp-content/themes/classic/comments.php
43 43 44 44 <?php if ( $user_ID ) : ?> 45 45 46 <p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Log out »'); ?></a></p>46 <p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account') ?>"><?php _e('Log out »'); ?></a></p> 47 47 48 48 <?php else : ?> 49 49 -
wp-content/themes/classic/comments-popup.php
57 57 58 58 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> 59 59 <?php if ( $user_ID ) : ?> 60 <p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php echo attribute_escape(__('Log out of this account')); ?>"><?php _e('Log out »'); ?></a></p>60 <p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo wp_logout_url(); ?>" title="<?php echo attribute_escape(__('Log out of this account')); ?>"><?php _e('Log out »'); ?></a></p> 61 61 <?php else : ?> 62 62 <p> 63 63 <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /> -
wp-content/themes/default/comments.php
52 52 53 53 <?php if ( $user_ID ) : ?> 54 54 55 <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out »</a></p>55 <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p> 56 56 57 57 <?php else : ?> 58 58 -
wp-content/themes/default/comments-popup.php
57 57 58 58 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> 59 59 <?php if ( $user_ID ) : ?> 60 <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out »</a></p>60 <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p> 61 61 <?php else : ?> 62 62 <p> 63 63 <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /> -
wp-admin/admin-header.php
143 143 </div> 144 144 <?php } ?> 145 145 146 <div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( ! $is_opera ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div>146 <div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( ! $is_opera ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div> 147 147 148 148 <?php 149 149 require(ABSPATH . 'wp-admin/menu-header.php');