پرش به محتویات

"Filter: bricks/dynamic_data/text_separator"

جداکننده مورد استفاده هنگام پیوستن مقادیر آرایه در تگ داده پویا (زمینه متن) را فیلتر می‌کند. جداکننده پیش‌فرض یک کاما و یک فاصله (,) است.

پارامترها

  • $sep (string): The separator string.
  • $tag (string): The dynamic data tag.
  • $post_id (int): The ID of the post context.
  • $filters (array): Array of modifiers applied to the tag.

نمونه استفاده

add_filter( 'bricks/dynamic_data/text_separator', function( $sep, $tag, $post_id, $filters ) {
    // Example: Use a line break separator for a specific custom field
    if ( $tag === 'my_repeater_field' ) {
        return '<br>';
    }

    return $sep;
}, 10, 4 );