• Plugin Author Phi Phan

    (@mr2p)


    Use the meta_field_block_get_block_content filter to modify the block content.

    add_filter( 'meta_field_block_get_block_content', function ( $content, $attributes, $block, $post_id ) {
      $field_name = $attributes['fieldName'] ?? '';
      
      if ( $field_name === 'your_field') {
        $content = 'new content';
      }
      
      return $content;
    }, 10, 4);
    • This topic was modified 1 year, 10 months ago by Phi Phan.
  • The topic ‘How to change the output of the block?’ is closed to new replies.