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

Added function_exists( 'compiler' ) check for function compiler() #142

Closed
wants to merge 1 commit into from

Conversation

MaxwellGarceau
Copy link

I wrote code that hooks into WP-SCSS from the child theme and causes both the parent and child theme to compile. I was getting a "cannot redeclare function compiler()" error.

I wrapped function compiler() with a function_exists( 'compiler' ) check and that solved the problem. Would you mind putting this in the next release?

Love the plugin by the way <3.

I wrote code that hooks into WP-SCSS from the child theme and causes both the parent and child theme to compile. I was getting a "cannot redeclare function compiler()" error.

I wrapped function compiler() with a function_exists( 'compiler' ) check and that solved the problem. Would you mind putting this in the next release?

Love the plugin by the way <3.
@shadoath
Copy link
Collaborator

shadoath commented Nov 5, 2020

@MaxwellGarceau please indent the code inside of the new function_exists check. I'll be happy to merge it in after that.

@shadoath shadoath self-requested a review December 12, 2020 17:14
@shadoath
Copy link
Collaborator

@MaxwellGarceau Also would it make sense to add an else block with an error message if compile is not defined?

@shadoath
Copy link
Collaborator

Fixed in #155

@shadoath shadoath closed this Jan 30, 2021
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