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
954       * @param mixed  $output       Form output to return instead. Default empty.
955       * @param string $form_post    URL to POST the form to.
956       * @param string $type         Chosen type of filesystem.
957       * @param bool   $error        Whether the current request has failed to connect.
958       *                             Default false.
959       * @param string $context      Full path to the directory that is tested for
960       *                             being writable.
961       * @param array  $extra_fields Extra POST fields.
962       */
963      $req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields );
964      if ( '' !== $req_cred )
965           return $req_cred;
966
967      if ( empty($type) )
968           $type = get_filesystem_method(array(), $context);
969
970      if ( 'direct' == $type )
971           return true;
972