apply_filters( 'learndash_gutenberg_block_example_id', int $id, string $context, string $post_type, string $block_slug )
Filters gutenberg block example ID.
Description #
Parameters #
- $id
-
(int) The ID of the resource.
- $context
-
(string) The context of the resource.
- $post_type
-
(string) The post type slug of the resource.
- $block_slug
-
(string) The slug of the block.
Source #
File: includes/gutenberg/lib/class-learndash-gutenberg-block.php
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_gutenberg_block_example_id filter. */ add_filter( 'learndash_gutenberg_block_example_id', function( $id, $context, $post_type, $block_slug ) { // May add any custom logic using $id, $context, $post_type, $block_slug. // Always return $id. return $id; }, 10, 4 );