HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /volume1/web/Marchisa-Toman/wp-content/plugins/meta-box-builder/src/Extensions/ConditionalLogic.php
<?php
namespace MBB\Extensions;

use MBB\Control;

class ConditionalLogic {
	public function __construct() {
		add_filter( 'mbb_field_controls', [ $this, 'add_field_controls' ], 10, 2 );
	}

	public function add_field_controls( array $controls, string $type ): array {
		if ( in_array( $type, [ 'hidden', 'tab' ] ) ) {
			return $controls;
		}
		$controls[] = Control::ConditionalLogic( 'conditional_logic', [], [], 'conditional_logic' );

		return $controls;
	}
}