Skip to content

Commit 7670a99

Browse files
committed
Added Integrations: Muffin builder (beTheme)
1 parent 6af5336 commit 7670a99

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

includes/iworks/class-iworks-orphan.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,12 @@ public function init() {
578578
'iworks_orphan_protected_tags',
579579
$this->protected_tags
580580
);
581+
/**
582+
* Integrations: Muffin builder
583+
*
584+
* @since 3.1.3
585+
*/
586+
add_filter( 'mfn_builder_items_show', array( $this, 'integration_filter_mfn_builder_items_show' ) );
581587
}
582588

583589
/**
@@ -856,5 +862,35 @@ public function get_terms() {
856862
return $this->_terms();
857863
}
858864

865+
/**
866+
* Integrations: Muffin builder (beTheme) recurence helper
867+
*
868+
* @since 3.1.3
869+
*/
870+
private function mnf_builder_herlper( $items ) {
871+
if ( is_array( $items ) ) {
872+
foreach ( $items as $key => &$item ) {
873+
if ( is_array( $item ) ) {
874+
$item = $this->mnf_builder_herlper( $item );
875+
} elseif (
876+
'content' === $key
877+
&& is_string( $item )
878+
) {
879+
$item = $this->unconditional_replacement( $item );
880+
}
881+
}
882+
}
883+
return $items;
884+
}
885+
886+
/**
887+
* Integrations: Muffin builder (beTheme)
888+
*
889+
* @since 3.1.3
890+
*/
891+
public function integration_filter_mfn_builder_items_show( $mfn_items ) {
892+
return $this->mnf_builder_herlper( $mfn_items );
893+
}
894+
859895
}
860896

0 commit comments

Comments
 (0)