PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.4
Elementor Website Builder – more than just a page builder v4.2.4
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/base/element-base.php +28 -0 4.0.94.2.4 View file →
@@ -326,8 +326,28 @@
326 326
327 327 return $this->children;
328 328 }
329 329
330 + public function render_markdown(): string {
331 + $children = $this->get_children();
332 +
333 + if ( empty( $children ) ) {
334 + return '';
335 + }
336 +
337 + $parts = [];
338 +
339 + foreach ( $children as $child ) {
340 + $md = $child->render_markdown();
341 +
342 + if ( ! empty( trim( $md ) ) ) {
343 + $parts[] = $md;
344 + }
345 + }
346 +
347 + return implode( "\n\n", $parts );
348 + }
349 +
330 350 /**
331 351 * Get default arguments.
332 352 *
333 353 * Retrieve the element default arguments. Used to return all the default
@@ -439,8 +459,16 @@
439 459 $this->add_render_attribute( $element, $attributes, null, $overwrite );
440 460 }
441 461
442 462 return $this;
463 + }
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 + }
443 471 }
444 472
445 473 /**
446 474 * Print element.