wp_generate_auth_cookie

Definition:
function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth') {}

Generate authentication cookie contents.

Parameters

  • int $user_id: User ID
  • int $expiration: Cookie expiration in seconds
  • string $scheme: Optional. The cookie scheme to use: auth, secure_auth, or logged_in

Return values

returns:Authentication cookie contents

Defined filters

  • auth_cookie
    apply_filters('auth_cookie', $cookie, $user_id, $expiration, $scheme)

Source code

function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth') {

	$user = get_userdata($user_id);



	$pass_frag = substr($user->user_pass, 8, 4);



	$key = wp_hash($user->user_login . $pass_frag . '|' . $expiration, $scheme);

	$hash = hash_hmac('md5', $user->user_login . '|' . $expiration, $key);



	$cookie = $user->user_login . '|' . $expiration . '|' . $hash;



	return apply_filters('auth_cookie', $cookie, $user_id, $expiration, $scheme);

}

3669

wp_functionality_constants

Definition:
function wp_functionality_constants( ) {}

Defines functionality related WordPress constants

Source code

function wp_functionality_constants( ) {

	/**

	 * @since 2.5.0

	 */

	if ( !defined( 'AUTOSAVE_INTERVAL' ) )

		define( 'AUTOSAVE_INTERVAL', 60 );



	/**

	 * @since 2.9.0

	 */

	if ( !defined( 'EMPTY_TRASH_DAYS' ) )

		define( 'EMPTY_TRASH_DAYS', 30 );



	if ( !defined('WP_POST_REVISIONS') )

		define('WP_POST_REVISIONS', true);



	/**

	 * @since 3.3.0

	 */

	if ( !defined( 'WP_CRON_LOCK_TIMEOUT' ) )

		define('WP_CRON_LOCK_TIMEOUT', 60);  // In seconds

}

3665

wp_footer

Fire the wp_footer action

Defined actions

  • wp_footer
    do_action('wp_footer');

Source code

function wp_footer() {

	do_action('wp_footer');

}

3663

wp_filter_post_kses

Definition:
function wp_filter_post_kses($data) {}

Sanitize content for allowed HTML tags for post content.
Post content refers to the page contents of the ‘post’ type and not $_POST data from forms.

Parameters

  • string $data: Post content to filter, expected to be escaped with slashes

Return values

returns:Filtered post content with allowed HTML tags and attributes intact.

Source code

function wp_filter_post_kses($data) {

	global $allowedposttags;

	return addslashes ( wp_kses(stripslashes( $data ), $allowedposttags) );

}

3661