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

"Filter: bricks/dynamic_data/author_value"

مقدار بازگردانده شده توسط برچسب های داده پویا {author_...} (به عنوان مثال، {author_name}، {author_email}) را فیلتر می‌کند.

پارامترها

  • $value (string): The value of the author field.
  • $field_type (string): The specific author field being retrieved (e.g., name, email, bio, website, avatar).
  • $filters (array): Array of modifiers applied to the tag (e.g., ['fallback' => '...']).

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

add_filter( 'bricks/dynamic_data/author_value', function( $value, $field_type, $filters ) {
    // Example: Append text to author bio
    if ( $field_type === 'bio' ) {
        return $value . ' [Verified Author]';
    }

    return $value;
}, 10, 3 );