Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_hash_password ›

Da2.5.0
Deprecaton/a
wp_hash_password ( $password )
Parametri:
  • (string) $password Plain text user password to hash
    Richiesto:
Ritorna:
  • (string) The hash string of the password
Definito a:
Codex:

Create a hash (encrypt) of a plain text password.

For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.



Sorgenti

function wp_hash_password( $password ) {
		global $wp_hasher;

		if ( empty( $wp_hasher ) ) {
			require_once( ABSPATH . WPINC . '/class-phpass.php' );
			// By default, use the portable hash from phpass
			$wp_hasher = new PasswordHash( 8, true );
		}

		return $wp_hasher->HashPassword( trim( $password ) );
	}
endif;

if ( ! function_exists( 'wp_check_password' ) ) :