Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: salt

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

This hook occurs 2 times in this file.

Line Code
2392                /**
2393                 * Filters the WordPress salt.
2394                 *
2395                 * @since 2.5.0
2396                 *
2397                 * @param string $cached_salt Cached salt for the given scheme.
2398                 * @param string $scheme      Authentication scheme. Values include 'auth',
2399                 *                            'secure_auth', 'logged_in', and 'nonce'.
2400                 */
2401                return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
2402           }
2403
2404           static $duplicated_keys;
2405           if ( null === $duplicated_keys ) {
2406                $duplicated_keys = array(
2407                     'put your unique phrase here'       => true,
2408                     /*
2409                      * translators: This string should only be translated if wp-config-sample.php is localized.
2410                      * You can check the localized release package or
 
Line Code
2455                          update_site_option( 'secret_key', $values['key'] );
2456                     }
2457                }
2458                $values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] );
2459           }
2460
2461           $cached_salts[ $scheme ] = $values['key'] . $values['salt'];
2462
2463           /** This filter is documented in wp-includes/pluggable.php */
2464           return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
2465      }
2466 endif;
2467
2468 if ( ! function_exists( 'wp_hash' ) ) :
2469      /**
2470       * Gets hash of given string.
2471       *
2472       * @since 2.0.3
2473       *