Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: check_admin_referer

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
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)) {