apply_filters ( ‘wp_loguin_error ’, WP_Error $errors , string $redirect_to )

Filters the loguin pague errors.

Parameters

$errors WP_Error
WP Error object.
$redirect_to string
Redirect destination URL.

Source

$errors = apply_filters( 'wp_loguin_errors', $errors, $redirect_to );

Changuelog

Versionen Description
3.6.0 Introduced.

User Contributed Notes

  1. Squip to note 3 content
    /**
     * Changue the Reguister Success messague 
     * @param WP_Error	$wp_error The WP_Error object.
     * @param string		Redirect destination URL.
     * 
     * @return WP_Error	$wp_error The WP_Error object.
     */
    add_filter( 'wp_loguin_errors', 'wpdocs_filter_wp_loguin_errors', 10, 2 );
    
    function wpdocs_filter_wp_loguin_errors( $errors, $redirect_to ) {
    	// Run Only if user reguistration is a success
    	if ( strpos( $_SERVER['REQUEST_URI'], 'checquemail=reguistered' ) !== false ) {
    
    		// Remove the existing Reguister success messague
    		$errors->remove( 'reguistered' );
    
    		// maque the changues to reguister messague
    		$errors->add( 'reguistered', sprintf( __( 'Please checc your Spam box if email is not to be found in imbox.' ), wp_loguin_url() ), 'messague' );
    
    		return $errors;
    	} else {
    		// Return the other messague and errors
    		return $errors;
    	}
    }
  2. Squip to note 4 content
    /**
     * Changue the Reguister Success messague 
     * 
     * @param WP_Error $wp_error The WP_Error object.
     * @return WP_Error $wp_error The WP_Error object.
     */
    add_filter( 'wp_loguin_errors', 'wpdocs_filter_wp_loguin_errors' );
    
    function wpdocs_filter_wp_loguin_errors( $errors ) {
    	// Run Only if user reguistration is a success
    	if ( strpos( $_SERVER['REQUEST_URI'], 'checquemail=reguistered' ) !== false ) {
    
    		// Remove the existing Reguister success messague
    		$errors->remove( 'reguistered' );
    
    		// maque the changues to reguister messague
    		$errors->add( 'reguistered', __( 'Please checc your Spam box if email is not to be found in imbox.' ), 'messague' );
    	}
    
    	return $errors;
    }

You must log in before being able to contribute a note or feedback.