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

"Filter: bricks/fix_filter_element_db"

به افزونه ها اجازه می‌دهد تا فرآیند به روز رسانی پایگاه داده را برای عناصر فیلتر بر اساس هر پست رهگیری و مدیریت کنند. اگر فیلتر true را برگرداند، Bricks از منطق به‌روزرسانی پیش‌فرض خود برای آن پست صرف‌نظر می‌کند.

پارامترها

  • $handled (bool): Whether the update has been handled. Default is false.
  • $post_id (int): The ID of the post being processed.
  • $template_type (string): The template type of the post.

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

add_filter( 'bricks/fix_filter_element_db', function( $handled, $post_id, $template_type ) {
    // Example: Skip processing for a specific post ID
    if ( $post_id === 1234 ) {
        return true;
    }

    return $handled;
}, 10, 3 );