Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: secure_signon_cookie

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
69       * @param array $credentials {
70        *     Array of entered sign-on data.
71        *
72        *     @type string $user_login    Username.
73        *     @type string $user_password Password entered.
74       *     @type bool   $remember      Whether to 'remember' the user. Increases the time
75       *                                 that the cookie will be kept. Default false.
76        * }
77       */
78      $secure_cookie = apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials );
79
80      global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie
81      $auth_secure_cookie = $secure_cookie;
82
83      add_filter('authenticate', 'wp_authenticate_cookie', 30, 3);
84
85      $user = wp_authenticate($credentials['user_login'], $credentials['user_password']);
86
87      if ( is_wp_error($user) ) {