acf/shortcode/preview_capability_message
acf/shortcode/preview_capability_message
Appears in: advanced-custom-fields.6.3.5
Hook Type: filter
Displaying hooks found in version: advanced-custom-fields.6.3.5apply_filters('acf/shortcode/preview_capability_message') is found 1 times:
- /includes/api/api-template.php line 10271024102510261027102810291030103110321033
// Limit previews of ACF shortcode data for users without publish_posts permissions.
$preview_capability
= apply_filters(
'acf/shortcode/preview_capability'
,
'publish_posts'
);
if
( is_preview() && ! current_user_can(
$preview_capability
) ) {
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
;