Skip to content

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

Closed
MaxwellGarceau wants to merge 1 commit into
ConnectThink:masterfrom
MaxwellGarceau:patch-1
Closed

Added function_exists( 'compiler' ) check for function compiler()#142
MaxwellGarceau wants to merge 1 commit into
ConnectThink:masterfrom
MaxwellGarceau:patch-1

Conversation

@MaxwellGarceau

Copy link
Copy Markdown

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

shadoath commented Nov 5, 2020

Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
Collaborator

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

@shadoath

Copy link
Copy Markdown
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