apply_filters( 'learndash_block_markers_shortcode_atts', array $block_attributes, string $shortcode_slug, string $block_slug, string $content )
Filters WordPress block content shortcode attributes.
Description #
Parameters #
- $block_attributes
-
(array) An array of shortcode attributes.
- $shortcode_slug
-
(string) Slug of the shortcode.
- $block_slug
-
(string) Slug of the gutenberg block.
- $content
-
(string) Shortcode content.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_block_markers_shortcode_atts filter.
*/
add_filter(
'learndash_block_markers_shortcode_atts',
function( $attributes, $shortcode_slug, $block_slug, $content ) {
// May add any custom logic using $attributes, $shortcode_slug, $block_slug, $content.
// Always return $attributes.
return $attributes;
},
10,
4
);
Changelog #
| Version | Description |
|---|---|
| 2.5.9 | Introduced. |