Widget: Added option to set DoNotTrack in Twitter Timeline Widget#9359
Widget: Added option to set DoNotTrack in Twitter Timeline Widget#9359dereksmart merged 5 commits intoAutomattic:masterfrom
Conversation
jeherve
left a comment
There was a problem hiding this comment.
I think it may be best to add the attribute a bit later, and make it filterable so one can choose to turn this back to false if they want to.
We have a list of $data_attribs just below; you could add it there, and set a default false value for that attribute in the form function, with a filter there.
What do you think?
|
I've also thought about this initially and have noticed the As a result, I chose to go with what the original ticket issue suggested. If you're certain this can work, then I agree setting a default is better than hard coding. I've made the modification. |
jeherve
left a comment
There was a problem hiding this comment.
I would recommend adding a filter to offer the option to change the default value via code.
For this reason, when the form is being updated in the update function, I would recommend making sure the value saved for dnt is always a boolean.
modules/widgets/twitter-timeline.php
Outdated
| 'theme' => 'light', | ||
| 'chrome' => array(), | ||
| 'tweet-limit' => null, | ||
| 'dnt' => true, |
There was a problem hiding this comment.
Could you add a filter here, so folks can choose to change that value to false later on?
|
1.) I've added the filter in 2.) I've also revised the value type passed to The full file can be viewed here: |
|
I've made a reply above. |
jeherve
left a comment
There was a problem hiding this comment.
After thinking about this some more, I think we could take a simpler approach to this. I created a PR on your repo here with my ideas:
stevenlinx#1
If you like my approach, you can merge that PR and the changes will automatically be ported to this PR.
Let me know what you think.
|
This PR has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this PR has clear testing instructions, is it up to date with master, and it is still valid. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
I've pushed the changes to the branch directly.
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: January 10, 2019. Generated by 🚫 dangerJS |
jeherve
left a comment
There was a problem hiding this comment.
This should now be good to merge! 👍
|
D21917-code. (newly created revision) |
* Add first version of the Changelog and testing list for 6.9 * Changelog: add #10710 * changelog: add #10538 * changelog: add #10741 * changelog: add #10749 * changelog: add #10664 * changelog: add #10224 * changelog: add #10788 * Changelog: add #10560 * Chanegelog: add #10812 * changelog: add #10556 * Changelog: add #10668 * Changelog: add #10846 * Changelog: add #10947 * Changelog: add #10962 * Changelog: add #10956 * Changelog: add #10940 * Changelog: add #10934 * Changelog: add #10912 * changelog: add #10866 * changelog: add #10924 * Changelog: add #10936 * Changelog: add #10833 * changelog: add #10867 * Changelog: add #10960 * Changelog: add #10888 * changelog: add #10840 * changelog: add #10972 * Changelog: add #10979 * changelog: add #10909 * Changelog: add #10958 * Changelog: add #10981 * Changelog: add #10564 * Changelog: add #10809 * Changelog: add #10982 * Changelog: add #10706 * Changelog: add #10978 * Changelog: add #10132 * Changelog: add #11022 * Changelog: add #11024 * Changelog: add #10875 * Changelog: add #11030 * Changelog: add #11053 * Changelog: add #10880 * Changelog: add #9359 * Changelog: add #11037 * Update block list * Changelog: add #11060 * Changelog: add #10755 * changelog: add #11000 * Changelog: add #10786 * Changelog: add #10945 * Changelog: add #10597
Fixes #6722
Changes proposed in this Pull Request:
Testing instructions:
1.) Checkout the code on a test WP site.
2.) Make sure Twitter Timeline Widget is displayed in one of your active sidebars.
3.) Load the site and examine the source code to determine if the hyperlinks on Twitter Timeline Widget comes with DNT attribute.
4.) After done testing, revert the code to its previous state.
Proposed changelog entry for your changes: