Fixing Placeholder Script's Handle #3586

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@BFTrick
Contributor
BFTrick commented Aug 5, 2013

The jQuery script we use for placeholders is actually Simple Placeholder which is far less common (45 stars compared to 1,957 stars) than jQuery Placeholder. So when other plugins enqueue the jQuery Placeholder script there are some conflicts.

To mitigate this I just changed the handle from jquery-placeholder to jquery-simple-placeholder. Now if other plugins or themes use the mathiasbynens' version of the placeholder script there shouldn't be any problems.

See here: http://wordpress.org/support/topic/jquery-error-has-not-method-simpleplaceholder?replies=1
And here: https://woothemes.zendesk.com/agent/#/tickets/83703
for reference.

@mikejolley
Member

@BFTrick Could just change scripts?

@BFTrick
Contributor
BFTrick commented Aug 5, 2013

@mikejolley wouldn't changing scripts be a lot harder than just renaming the handle?

Is there any functionality in the more popular placeholder script that we would ever need?

@mikejolley
Member

@BFTrick They are both pretty much identical, so if one has better adoption, it makes sense to switch (if it doesn't cause any issues anyway).

@BFTrick BFTrick was assigned Aug 5, 2013
@BFTrick BFTrick deleted the BFTrick:fix-placeholder-script-handle branch Aug 13, 2013
@mikejolley mikejolley added a commit that referenced this pull request Aug 14, 2013
@mikejolley @coenjacobs mikejolley + coenjacobs Replace placeholder script. Closes #3586.
Conflicts:
	assets/js/frontend/woocommerce.min.js
d94d8f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment