Fix for non-lazy-load ads not displaying correctly#97
Open
benlk wants to merge 6 commits into
Open
Conversation
…y be setTargeting
…dfw.js, next to the lazy-load ads loader
Collaborator
Author
|
This PR may also address the following issues: |
Collaborator
Author
|
Test release of this plugin created: https://github.com/INN/doubleclick-for-wp/archive/v0.3.1-rc1.zip Submitted to that one wp.org user for testing: https://wordpress.org/support/topic/do-not-use-version-0-3/#post-11181996 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
sizeMappingandsetTargetingon the globalwindow.dfwto match the parameters required by https://github.com/coop182/jquery.dfp.js#available-optionsjquery.dfw.js, so that the code will hopefully only be loaded whenjquery.dfp.min.jshas been loaded, sincejquery.dfw.jsis listed as havingjquery.dfp.min.jsorjquery.dfp.jsas a dependency.jquery.dfp.jsfrom the repo, for Review all places where jquery.dfp.js and jquery.dfp.min.js are referenced #94Why
jquery.dfp.jsto be loaded after the plugin function that used functionality defined injquery.dfp.js.jquery.dfpis listed as a dependency ofjquery.dfwin the enqueues, and Autoptimize was allowing lazy-load ads to load, so it seems that Autoptimize was loading ads in correct order. This changeset doesn't fix a potential future issue wherejquery.dfp.jsfinishes loading beforejquery.dfwdoes, but that seems unlikely ifjquery.dfwis loaded later on the page thanjquery.dfp, because they're loaded from the same origin.For #95 and #96.
Resolves #94
Testing/Questions
Questions that need to be answered before merging:
readme.txtwith appropriate information?Steps to test this PR: