Skip to content
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

Merged
merged 7 commits into from
Nov 12, 2024
Merged

Conversation

mserino
Copy link
Contributor

@mserino mserino commented Nov 7, 2024

@mserino mserino requested a review from nuritsha November 7, 2024 14:31
@mserino mserino self-assigned this Nov 7, 2024
@@ -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,
Copy link
Collaborator

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?

Copy link
Contributor Author

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();
Copy link
Collaborator

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

Comment on lines 80 to 82
protected function add_advanced_tab(): void {
$this->add_advanced_behavior_section();
parent::add_advanced_tab();
Copy link
Collaborator

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 );
	}

@mserino mserino requested a review from nuritsha November 12, 2024 09:37
@nuritsha nuritsha merged commit 2f8910e into elementor:master Nov 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants