soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
314 stars 29 forks source link

Detect if user is in backend #1396

Open Zyles opened 4 years ago

Zyles commented 4 years ago

Describe the bug

Using WP !is_admin() does not seem to work with the Oxygen builder.

Is there a way to detect if the user is using the template editor in the backend? Or can you add support for !is_admin()

Thanks.

Have you tried all the steps at https://oxygenbuilder.com/documentation/troubleshooting/troubleshooting-guide/? Yes

Are you able to replicate the issue on a Sandbox install at https://oxygenbuilder.com/try?

Yes

To Reproduce

  1. Create plugin with if (!is_admin()) condition
  2. Content renders when user is using Oxygen builder

Expected behavior

Should not render content from plugin if user is using the Oxygen builder

What actually happens

Content renders when using Oxygen builder

Spellhammer commented 4 years ago

Have you tried doing a check for the ct_builder URL parameter?

Zyles commented 4 years ago

Have you tried doing a check for the ct_builder URL parameter?

I guess that is one way to do it.

Spellhammer commented 4 years ago

I'm removing the bug label because this is really a request for is_admin support in the builder environment.