Open benlk opened 5 years ago
This PR may also address the following issues:
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
Changes
sizeMapping
andsetTargeting
on the globalwindow.dfw
to 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.js
has been loaded, sincejquery.dfw.js
is listed as havingjquery.dfp.min.js
orjquery.dfp.js
as a dependency.jquery.dfp.js
from the repo, for https://github.com/INN/doubleclick-for-wp/issues/94Why
jquery.dfp.js
to be loaded after the plugin function that used functionality defined injquery.dfp.js
.jquery.dfp
is listed as a dependency ofjquery.dfw
in 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.js
finishes loading beforejquery.dfw
does, but that seems unlikely ifjquery.dfw
is loaded later on the page thanjquery.dfp
, because they're loaded from the same origin.For #95 and #96.
Resolves https://github.com/INN/doubleclick-for-wp/issues/94
Testing/Questions
Questions that need to be answered before merging:
readme.txt
with appropriate information?Steps to test this PR: