2020-05-02 / 3637阅 / 悠然
Determine whether a $post or a string contains a specific block type.
This test optimizes for performance rather than strict accuracy, detecting the block type exists but not validating its structure. For strict accuracy, you should use the block parser id="see-also" tabindex="-1">See also See also
Top ↑
(string)
(Required)
Full Block type to look for.
(int|string|WP_Post|null)
(Optional)
Post content, post ID, or post object. Defaults to global $post.
Default value: null
(bool) Whether the post content contains the specified block.