-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMZ-74 Header 1st round #58
Conversation
@@ -17,7 +17,9 @@ | |||
use HelloPlus\Includes\Utils as Theme_Utils; | |||
|
|||
use HelloPlus\Modules\TemplateParts\Classes\{ | |||
Render\Widget_Footer_Render | |||
Render\Widget_Footer_Render, | |||
Traits\Shared_Header_Traits, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed it
@@ -65,7 +67,6 @@ protected function render(): void { | |||
protected function register_controls(): void { | |||
$this->add_content_section(); | |||
$this->add_style_section(); | |||
$this->add_advanced_tab(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, we do need the custom advanced tab
protected function add_advanced_tab(): void { | ||
$this->add_advanced_behavior_section(); | ||
parent::add_advanced_tab(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we tweak the original add_advanced_tab
method in the base class, maybe something like this:
protected function add_advanced_tab(): void {
$advanced_tab_id = Controls_Manager::TAB_ADVANCED;
Controls_Manager::add_tab(
$advanced_tab_id,
esc_html__( 'Advanced', 'hello-plus' )
);
$this->add_basic_css_controls_section();
$this->add_custom_advanced_sections(); // new method, base class implementation will be empty, and the Ehp_header will use it to print the `behavior` section
$elementor_plugin = Theme_Utils::elementor();
$elementor_plugin->controls_manager->add_custom_css_controls( $this, $advanced_tab_id );
$elementor_plugin->controls_manager->add_custom_attributes_controls( $this, $advanced_tab_id );
}
https://elementor.atlassian.net/browse/TMZ-74