acf/pre_load_attachment

acf/pre_load_attachment

Hook Type: filter

See hook in core

Displaying hooks found in version: advanced-custom-fields.6.3.6.3

apply_filters('acf/pre_load_attachment') is found 1 times:

  • /includes/api/api-helpers.php line 2550
    2546
    2547
    2548
    2549
    2550
    2551
    2552
    2553
    2554
    2555
    2556
    function acf_get_attachment( $attachment ) {
     
        // Allow filter to short-circuit load attachment logic.
        // Alternatively, this filter may be used to switch blogs for multisite media functionality.
        $response = apply_filters( 'acf/pre_load_attachment', null, $attachment );
        if ( $response !== null ) {
            return $response;
        }
     
        // Get the attachment post object.
        $attachment = get_post( $attachment );