This repository was archived by the owner on Dec 16, 2022. It is now read-only.
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Allow customize_loaded_components filter to remove posts component #132
Closed
Description
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.