acf/connect_attachment_to_post

acf/connect_attachment_to_post

Hook Type: filter

See hook in core

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

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

  • /includes/api/api-helpers.php line 4234
    4230
    4231
    4232
    4233
    4234
    4235
    4236
    4237
    4238
    4239
    *  @param   bool $bool Returning false will prevent the connection. Default true.
    *  @param   int $attachment_id The attachment ID.
    *  @param   int $post_id The post ID.
    */
    if ( ! apply_filters( 'acf/connect_attachment_to_post', true, $attachment_id, $post_id ) ) {
        return false;
    }
     
    // vars
    $post = get_post( $attachment_id );