acf_replace_inner_blocks_in_block_content()
Replaces InnerBlocks strings in a block with the inner block content.
Хуков нет.
Возвращает
string.
Использование
acf_replace_inner_blocks_in_block_content( $content, $html );
- $content(строка) (обязательный)
- The block content.
- $html(строка) (обязательный)
- The block html.
Список изменений
| С версии 6.8 | Введена. |
Код acf_replace_inner_blocks_in_block_content() acf replace inner blocks in block content ACF 6.8.8
function acf_replace_inner_blocks_in_block_content( $content, $html ) {
$html = preg_replace_callback(
'/<InnerBlocks([\S\s]*?)\/>/',
function ( $matches ) use ( $content ) {
return $content;
},
$html
);
return $html;
}