source/php/Options/General.php
public function sidebarIncompatibility($moduleSpecification, $modulePostType) {
        $template = \Modularity\Helper\Post::getPostTemplate(null, true);
        $template_sidebars = get_field($template . '_active_sidebars', 'option');

	if($template_sidebars) {
	    $sidebarIncompatibilities = array_flip($template_sidebars);

	    foreach($template_sidebars as $sidebar) {
		$modules = get_field($template . '-' . $sidebar, 'option');
		foreach($modules as $module) {
		    if($modulePostType == $module['label']) {
			unset($sidebarIncompatibilities[$sidebar]);
		    }
		}
	    }
	    $moduleSpecification['sidebar_incompability'] = array_keys($sidebarIncompatibilities);
	}
	return $moduleSpecification;
    }
public function sidebarIncompatibility($moduleSpecification, $modulePostType) {
        $template = \Modularity\Helper\Post::getPostTemplate(null, true);
        $template_sidebars = get_field($template . '_active_sidebars', 'option');

	if($template_sidebars) {
	    $sidebarIncompatibilities = array_flip($template_sidebars);

	    foreach($template_sidebars as $sidebar) {
		$modules = get_field($template . '-' . $sidebar, 'option');
		foreach($modules as $module) {
		    if($modulePostType == $module['label']) {
			unset($sidebarIncompatibilities[$sidebar]);
		    }
		}
	    }
	    $moduleSpecification['sidebar_incompability'] = array_keys($sidebarIncompatibilities);
	}
	return $moduleSpecification;
    }
public function sidebarIncompatibility ( $ moduleSpecification , $ modulePostType ) { $ template = \ Modularity \ Helper \ Post :: getPostTemplate ( null , true ) ; $ template_sidebars = get_field ( $ template . '_active_sidebars' , 'option' ) ; if ( $ template_sidebars ) { $ sidebarIncompatibilities = array_flip ( $ template_sidebars ) ; foreach ( $ template_sidebars as $ sidebar ) { $ modules = get_field ( $ template . '-' . $ sidebar , 'option' ) ; foreach ( $ modules as $ module ) { if ( $ modulePostType == $ module [ 'label' ] ) { unset ( $ sidebarIncompatibilities [ $ sidebar ] ) ; } } } $ moduleSpecification [ 'sidebar_incompability' ] = array_keys ( $ sidebarIncompatibilities ) ; } return $ moduleSpecification ; }
Filters the sidebar incompatibility list based on the restrictive
options page.

@return array Module Specification
Filters the sidebar incompatibility list based on the restrictive options page .