Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: upload_dir

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
1806
1807      /**
1808       * Filter the uploads directory data.
1809       *
1810       * @since 2.0.0
1811       *
1812       * @param array $uploads Array of upload directory data with keys of 'path',
1813       *                       'url', 'subdir, 'basedir', and 'error'.
1814       */
1815      $uploads = apply_filters( 'upload_dir',
1816           array(
1817                'path'    => $dir,
1818                'url'     => $url,
1819                'subdir'  => $subdir,
1820                'basedir' => $basedir,
1821                'baseurl' => $baseurl,
1822                'error'   => false,
1823           ) );
1824