Currently there is one customize_loaded_components filter which handles the injection of the WP_Customize_Posts instance into WP_Customize_Manager:
add_filter( 'customize_loaded_components', array( $this, 'filter_customize_loaded_components' ), 100, 2 );
There should be another customize_loaded_components filter that runs earlier at priority 0 which amends posts to the list of components. Then the later filter can check to see of posts is in the array and then only instantiate WP_Customize_Posts if it is present.
This would allow plugins to use a more standard way to selectively disable the posts component.
Currently there is one
customize_loaded_componentsfilter which handles the injection of theWP_Customize_Postsinstance intoWP_Customize_Manager:There should be another
customize_loaded_componentsfilter that runs earlier at priority 0 which amendspoststo the list of components. Then the later filter can check to see ofpostsis in the array and then only instantiateWP_Customize_Postsif it is present.This would allow plugins to use a more standard way to selectively disable the
postscomponent.