Widgets: Porting of WP.com's Flickr Widget#6942
Conversation
jeherve
left a comment
There was a problem hiding this comment.
This looks good. I just made a few comments about small changes.
modules/widgets/flickr/widget.php
Outdated
| <img | ||
| alt="<?php echo $photo['title']; ?>" | ||
| border="0" | ||
| src="<?php echo $photo['src']; ?>" |
There was a problem hiding this comment.
I'm thinking we could apply Photon to those images if the module is enabled, like we do for the Image and the Text widget.
modules/widgets/flickr/widget.php
Outdated
| <?php foreach ( $photos as $key => $photo ) { ?> | ||
| <a href="<?php echo $photo['link']; ?>"> | ||
| <img | ||
| alt="<?php echo $photo['title']; ?>" |
There was a problem hiding this comment.
Should we esc_attr here, just in case?
modules/widgets/flickr/widget.php
Outdated
| <tr> | ||
| <td align="center"> | ||
| <?php foreach ( $photos as $key => $photo ) { ?> | ||
| <a href="<?php echo $photo['link']; ?>"> |
modules/widgets/flickr/widget.php
Outdated
| alt="<?php echo $photo['title']; ?>" | ||
| border="0" | ||
| src="<?php echo $photo['src']; ?>" | ||
| title="<?php echo $photo['title']; ?>" |
modules/widgets/flickr/widget.php
Outdated
| /> | ||
| </a><br /><br /> | ||
| <?php } ?> | ||
| <a href="<?php echo $flickr_home; ?>"> |
| @@ -0,0 +1,33 @@ | |||
| <!-- Start of Flickr Widget --> | |||
| <table | |||
There was a problem hiding this comment.
Why the table layout? Would it be possible to use regular divs, so folks can customize the layout with a bit less trouble?
There was a problem hiding this comment.
Yeah, and it has been quite cringeworthy to write! 😄
Fact is: that's the wpcom version code.
The point of this porting is so that wpcom sites will look and behave the same after an AT.
And so, what if someone customized the CSS of their Flickr widget and changing the HTML or the class names will screw it up?
eliorivero
left a comment
There was a problem hiding this comment.
In addition to the comment in the code:
After adding this, I get these in front end:
Notice: rss.php is <strong>deprecated</strong> since version 3.0.0! Use wp-includes/class-simplepie.php instead. in /wp-includes/functions.php on line 3958
Notice: Trying to get property of non-object in /wp-content/plugins/jetpack/modules/widgets/flickr.php on line 84
Notice: Undefined variable: flickr_home in /wp-content/plugins/jetpack/modules/widgets/flickr/widget.php on line 24
modules/widgets/flickr/form.php
Outdated
|
|
||
| <p> | ||
| <small>* | ||
| <?php esc_html_e( 'To find your Flickr RSS feed, go to your photostream and click the "Edit" tab at the top. Scroll down to the bottom of the page until you see the RSS icon or the Latest link. Right click on either and copy the URL. Paste into the box above.', 'jetpack' ); ?> |
|
@jeherve All the jetpack/modules/widgets/flickr.php Lines 94 to 100 in 32b20bb |
|
@eliorivero I was sure I protected those variables in case of undefined, but I might be confusing it with another PR. :/ |
Yeah, I noticed that and I think that's fine, but I would still escape them right before they get rendered, as outlined here: |
2b346e3 to
5d5b55c
Compare
… of feed which is not in the UI for this widget
|
Works fine. Made a small change to the wording to reference always the same input label instead of "feed" which is not found in the UI for this widget. It's good to go and will merge once Travis ends. |
* Changelog: initial commit for 4.9 release. * Changelog: add #6929 * Changelog: move old changelogs to changelog.txt * Readme: restore deleted release post link. The post is now live. * Changelog: add #6853 * Changelog: add #6856 * Changelog: add #6857 * Changelog: add #6884 * Changelog: add #6885 * Changelog: add #6892 * Changelog: add #6894 * Changelog: add #6898 * Changelog: add #6899 * Changelog: add #6900 * Changelog: add #6909 * Changelog: add #6927 * Changelog: add #6947 * Chagelog: add #6958 * Changelog: add #6961 * Changelog: add #6963 * Changelog: add #6965 * Changelog: add #6986 * Changelog: add #7000 * Changelog: add #7013 * Changelog: add #7015 * Changelog: add #7019 * Changelog: add #7028 * Changelog: add #6998 * Changelog: add #6999 * Changelog: add #7044 * Changelog: add #6881 * Changelog: add #6922 * Changelog: add #6940 * Changelog: add #6962 * Changelog: add #6942 * Changelog: add #6959 * Changelog: add #7018 * Changelog: add #6948 * Changelog: add #6657 * Changelog: add #7030 * Changelog: add #7048 * Changelog: add #7031 * Changelog: add #6990 * Changelog: add #6957 * Changelog: add #7027

This is my second PR in the effort of filling the gaps between Jetpack and WP.com, to smooth the AT process out.
Changes proposed in this Pull Request:
Testing instructions: