| @@ -461,8 +461,16 @@ | ||
| 461 | 461 | |
| 462 | 462 | return $this; |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | + public function reset_descendant_render_state(): void { | |
| 466 | + $this->reset_render_state(); | |
| 467 | + | |
| 468 | + foreach ( $this->get_children() as $child ) { | |
| 469 | + $child->reset_descendant_render_state(); | |
| 470 | + } | |
| 471 | + } | |
| 472 | + | |
| 465 | 473 | /** |
| 466 | 474 | * Print element. |
| 467 | 475 | * |
| 468 | 476 | * Used to generate the element final HTML on the frontend and the editor. |