acf/ajax/shortcode_capability

acf/ajax/shortcode_capability

Hook Type: filter

See hook in core

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

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

  • /includes/api/api-template.php line 862
     * @return string
     */
    function acf_shortcode( $atts ) {
    	// Mitigate issue where some AJAX requests can return ACF field data.
    	$capability = apply_filters( 'acf/ajax/shortcode_capability', 'edit_posts' );
    	if ( wp_doing_ajax() && ( $capability !== false ) && ! current_user_can( $capability ) ) {
    		return;
    	}
    
    	$atts = shortcode_atts(
    		array(