WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 962 | <?php |
| 963 | |
| 964 | } |
| 965 | |
| 966 | function check_admin_referer() { |
| 967 | $adminurl = strtolower(get_settings('siteurl')).'/wp-admin'; |
| 968 | $referer = strtolower($_SERVER['HTTP_REFERER']); |
| 969 | if (!strstr($referer, $adminurl)) |
| 970 | die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.')); |
| 971 | do_action('check_admin_referer'); |
| 972 | } |
| 973 | |
| 974 | // insert_with_markers: Owen Winkler, fixed by Eric Anderson |
| 975 | // Inserts an array of strings into a file (.htaccess), placing it between |
| 976 | // BEGIN and END markers. Replaces existing marked info. Retains surrounding |
| 977 | // data. Creates file if none exists. |
| 978 | // Returns true on write success, false on failure. |
| 979 | function insert_with_markers($filename, $marker, $insertion) { |
| 980 | if (!file_exists($filename) || is_writeable($filename)) { |