Skip to:
Content

BuddyPress.org

Changeset 11698


Ignore:
Timestamp:
09/17/2017 07:18:10 PM (7 years ago)
Author:
djpaul
Message:

Core: use wp_login_url() instead of site_url().

Props slaFFik

Fixes #7522

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-screens.php

    r11360 r11698  
    282282        } else {
    283283            $url = sprintf(
    284                 site_url( 'wp-login.php?redirect_to=%s' ),
    285                 urlencode( esc_url_raw( bp_activity_get_permalink( bp_current_action() ) ) )
     284                wp_login_url( 'wp-login.php?redirect_to=%s' ),
     285                esc_url_raw( bp_activity_get_permalink( bp_current_action() ) )
    286286            );
    287287        }
  • trunk/src/bp-core/bp-core-filters.php

    r11541 r11698  
    10091009
    10101010    // Add 'List-Unsubscribe' header if applicable.
    1011     if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== site_url( 'wp-login.php' ) ) {
     1011    if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== wp_login_url() ) {
    10121012        $user = get_user_by( 'email', $tokens['recipient.email'] );
    10131013
     
    10781078    // Set default unsubscribe link if not passed.
    10791079    if ( empty( $tokens['unsubscribe'] ) ) {
    1080         $tokens['unsubscribe'] = site_url( 'wp-login.php' );
     1080        $tokens['unsubscribe'] = wp_login_url();
    10811081    }
    10821082
  • trunk/src/bp-core/bp-core-functions.php

    r11664 r11698  
    36793679    // Check required values.
    36803680    if ( ! $raw_user_id || ! $raw_email_type || ! $raw_hash || ! array_key_exists( $raw_email_type, $emails ) ) {
    3681         $redirect_to = site_url( 'wp-login.php' );
     3681        $redirect_to = wp_login_url();
    36823682        $result_msg  = __( 'Something has gone wrong.', 'buddypress' );
    36833683        $unsub_msg   = __( 'Please log in and go to your settings to unsubscribe from notification emails.', 'buddypress' );
     
    36853685    // Check valid hash.
    36863686    } elseif ( ! hash_equals( $new_hash, $raw_hash ) ) {
    3687         $redirect_to = site_url( 'wp-login.php' );
     3687        $redirect_to = wp_login_url();
    36883688        $result_msg  = __( 'Something has gone wrong.', 'buddypress' );
    36893689        $unsub_msg   = __( 'Please log in and go to your settings to unsubscribe from notification emails.', 'buddypress' );
     
    37553755
    37563756    if ( empty( $args['notification_type'] ) || ! array_key_exists( $args['notification_type'], $emails ) ) {
    3757         return site_url( 'wp-login.php' );
     3757        return wp_login_url();
    37583758    }
    37593759
  • trunk/src/bp-core/classes/class-bp-core-login-widget.php

    r11381 r11698  
    105105            do_action( 'bp_before_login_widget_loggedout' ); ?>
    106106
    107             <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
     107            <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( wp_login_url() ); ?>" method="post">
    108108                <label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
    109109                <input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
Note: See TracChangeset for help on using the changeset viewer.