acf/shortcode/post_not_public_message

acf/shortcode/post_not_public_message

Hook Type: filter

See hook in core

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

apply_filters('acf/shortcode/post_not_public_message') is found 1 times:

  • /includes/api/api-template.php line 1054
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    // If we've decoded to a post, ensure the post is publicly visible.
    if ( $decoded_post_id['type'] === 'post' ) {
        if ( $atts['post_id'] !== false && ( (int) $atts['post_id'] !== (int) acf_get_valid_post_id() ) && ( ! is_post_publicly_viewable( $decoded_post_id['id'] ) ) && apply_filters( 'acf/shortcode/prevent_access_to_fields_on_non_public_posts', true ) ) {
            if ( is_preview() ) {
                return apply_filters( 'acf/shortcode/post_not_public_message', __( '[The ACF shortcode cannot display fields from non-public posts]', 'acf' ) );
            } else {
                return;
            }
        }
    }