Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: request_filesystem_credentials

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
698  * @since 2.5.0
699  *
700  * @param string $form_post the URL to post the form to
701  * @param string $type the chosen Filesystem method in use
702  * @param boolean $error if the current request has failed to connect
703  * @param string $context The directory which is needed access to, The write-test will be performed on  this directory by get_filesystem_method()
704  * @return boolean False on failure. True on success.
705  */
706 function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false) {
707      $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error, $context);
708      if ( '' !== $req_cred )
709           return $req_cred;
710
711      if ( empty($type) )
712           $type = get_filesystem_method(array(), $context);
713
714      if ( 'direct' == $type )
715           return true;
716