Tweak: Conditional display for site-wide header & footer panels inside the “Site Settings“ (#358)

This commit is contained in:
Rami Yushuvaev 2023-12-13 04:58:10 -08:00 committed by GitHub
parent cc82bda6c5
commit a11cf70116
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,10 @@ function hello_elementor_settings_init() {
require 'settings/settings-footer.php';

add_action( 'elementor/kit/register_tabs', function( \Elementor\Core\Kits\Documents\Kit $kit ) {
if ( ! hello_elementor_display_header_footer() ) {
return;
}

$kit->register_tab( 'hello-settings-header', HelloElementor\Includes\Settings\Settings_Header::class );
$kit->register_tab( 'hello-settings-footer', HelloElementor\Includes\Settings\Settings_Footer::class );
}, 1, 40 );