Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

check if function exists #389

Merged
merged 4 commits into from
Aug 11, 2015
Merged

check if function exists #389

merged 4 commits into from
Aug 11, 2015

Conversation

Stevie-Ray
Copy link

if you use foundationpress with a child theme, you get an error.

PHP Fatal error: Cannot redeclare foundationpress_breadcrumb()

@olefredrik
Copy link
Owner

Hi. Can not merge as the test have failed. There seems to be 45 errors in navigation.php. Could you fix the errors and push a new commit? https://travis-ci.org/olefredrik/FoundationPress/jobs/72619330#L225

@justinpage
Copy link
Contributor

@Stevie-Ray PSR-2 violations, easily fixed if you just follow the messages. This would be very useful to get this pulled in as it causes some issues if you where to copy it from parent to child.

We noticed an alternative fix would be for you just to create a library/navigation.php file within your child theme and use that in addition to parent for new declarations. Our use shows that wordpress will still use both and not overwrite one or the other. Since of course functions only exist in parent and not child.

@Stevie-Ray
Copy link
Author

It seems to work ok now

olefredrik added a commit that referenced this pull request Aug 11, 2015
@olefredrik olefredrik merged commit 24348d3 into olefredrik:master Aug 11, 2015
@olefredrik
Copy link
Owner

👍

@Stevie-Ray Stevie-Ray deleted the master branch August 15, 2015 21:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants