acf/ajax/shortcode_capability

acf/ajax/shortcode_capability

Hook Type: filter

See hook in core

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

apply_filters('acf/ajax/shortcode_capability') is found 1 times:

  • /includes/api/api-template.php line 1031
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
        return apply_filters( 'acf/shortcode/preview_capability_message', __( '[ACF shortcode value disabled for preview]', 'acf' ) );
    }
     
    // Mitigate issue where some AJAX requests can return ACF field data.
    $ajax_capability = apply_filters( 'acf/ajax/shortcode_capability', 'edit_posts' );
    if ( wp_doing_ajax() && ( $ajax_capability !== false ) && ! current_user_can( $ajax_capability ) ) {
        return;
    }
     
    $atts = shortcode_atts(
        array(