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

ESI - Add Edit with Elementor #635

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

timotei-litespeed
Copy link
Contributor

No description provided.

@hi-hai hi-hai changed the base branch from master to dev March 29, 2024 18:40
Add admin bar to "wp_body_open"
Also make sure is loaded just once.
Tested the fix for PHP 5 too
src/esi.cls.php Outdated
@@ -760,7 +763,12 @@ public function sub_widget_block($instance, $widget, $args)
public function sub_admin_bar_block()
{
global $wp_admin_bar;
static $rendered = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't define static here, plz define it in class level. Otherwise others won't be aware of this var and may cause conflict.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to class

@@ -771,6 +779,8 @@ public function sub_admin_bar_block()
);

echo $this->sub_esi_block('admin-bar', 'adminbar', $params);

$this->admin_rendered = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is better moved to above line 781. That can give an additional safe check to avoid infinite embed just in case in $this->sub_esi_block() it called some hook which fall into this func again. How do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@hi-hai hi-hai changed the base branch from dev to v6.4 July 24, 2024 21:39
@hi-hai hi-hai merged commit 32d4a86 into litespeedtech:v6.4 Jul 25, 2024
1 check failed
hi-hai pushed a commit that referenced this pull request Jul 29, 2024
* ESI - Add Edit with Elementor

Add admin bar to "wp_body_open"
Also make sure is loaded just once.
Tested the fix for PHP 5 too

* Move rendered to class level

* Review change

---------

Co-authored-by: Timotei <[email protected]>
hi-hai pushed a commit that referenced this pull request Aug 6, 2024
* ESI - Add Edit with Elementor

Add admin bar to "wp_body_open"
Also make sure is loaded just once.
Tested the fix for PHP 5 too

* Move rendered to class level

* Review change

---------

Co-authored-by: Timotei <[email protected]>
@Tymotey Tymotey deleted the ESI-edit-with-elementor branch August 24, 2024 16:15
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.

3 participants