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 | 
|---|---|
| 1321 |       * | 
| 1322 |       * @param int   $max_width  The maximum image width to be included in the 'srcset'. Default '2048'. | 
| 1323 |       * @param int[] $size_array { | 
| 1324 |       *     An array of requested width and height values. | 
| 1325 |       * | 
| 1326 |       *     @type int $0 The width in pixels. | 
| 1327 |       *     @type int $1 The height in pixels. | 
| 1328 |       * } | 
| 1329 |       */ | 
| 1330 |      $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2048, $size_array ); | 
| 1331 |  | 
| 1332 |      // Array to hold URL candidates. | 
| 1333 |      $sources = array(); | 
| 1334 |  | 
| 1335 |      /** | 
| 1336 |       * To make sure the ID matches our image src, we will check to see if any sizes in our attachment | 
| 1337 |       * meta match our $image_src. If no matches are found we don't return a srcset to avoid serving | 
| 1338 |       * an incorrect image. See #35045. | 
| 1339 |       */ |