Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

View File

@@ -0,0 +1,103 @@
<p>
<label>
<?php esc_html_e( 'Title:', 'jetpack' ); ?>
</label>
<input
class="widefat"
name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
type="text"
value="<?php echo esc_attr( $instance['title'] ); ?>"
/>
</p>
<p>
<label>
<?php esc_html_e( 'Flickr RSS URL:', 'jetpack' ); ?>
</label>
<input
class="widefat"
name="<?php echo esc_attr( $this->get_field_name( 'flickr_rss_url' ) ); ?>"
type="text"
value="<?php echo esc_attr( $instance['flickr_rss_url'] ); ?>"
/>
</p>
<p>
<small>
<?php esc_html_e( 'To find your Flickr RSS URL, go to your photostream, add "?details=1" to the URL, and hit enter. Scroll down until you see the RSS icon or the "Latest" link. Right-click on either options and copy the URL. Paste into the box above.', 'jetpack' ); ?>
</small>
</p>
<p>
<small>
<?php printf(
__( 'Leave the Flickr RSS URL field blank to display <a target="_blank" href="%s">interesting</a> Flickr photos.', 'jetpack' ),
'http://www.flickr.com/explore/interesting'
); ?>
</small>
</p>
<p>
<label>
<?php esc_html_e( 'How many photos would you like to display?', 'jetpack' ); ?>
</label>
<select name="<?php echo esc_attr( $this->get_field_name( 'items' ) ); ?>">
<?php for ( $i = 1; $i <= 10; ++$i ) { ?>
<option
<?php selected( $instance['items'], $i ); ?>
value="<?php echo $i; ?>"
>
<?php echo $i; ?>
</option>
<?php } ?>
</select>
</p>
<p>
<label>
<input
type="checkbox"
name="<?php echo esc_attr( $this->get_field_name( 'target' ) ); ?>"
<?php checked( $instance['target'] ); ?>
/>
<?php esc_html_e( 'Open images in new tab?', 'jetpack' ); ?>
</label>
</p>
<p>
<div>
<?php esc_html_e( 'What size photos would you like to display?', 'jetpack' ); ?>
</div>
<ul>
<li>
<label>
<input
<?php checked( $instance['flickr_image_size'], 'thumbnail' ); ?>
name="<?php echo esc_attr( $this->get_field_name( 'flickr_image_size' ) ); ?>"
type="radio"
value="thumbnail"
/>
<?php esc_html_e( 'Thumbnail', 'jetpack' ); ?>
</label>
</li>
<li>
<label>
<input
<?php checked( $instance['flickr_image_size'], 'small' ); ?>
name="<?php echo esc_attr( $this->get_field_name( 'flickr_image_size' ) ); ?>"
type="radio"
value="small"
/>
<?php esc_html_e( 'Medium', 'jetpack' ); ?>
</label>
</li>
<li>
<label>
<input
<?php checked( $instance['flickr_image_size'], 'large' ); ?>
name="<?php echo esc_attr( $this->get_field_name( 'flickr_image_size' ) ); ?>"
type="radio"
value="large"
/>
<?php esc_html_e( 'Large', 'jetpack' ); ?>
</label>
</li>
</ul>
</p>

View File

@@ -0,0 +1,16 @@
.flickr-images {
text-align: center;
}
.flickr-size-thumbnail .flickr-images {
align-content: space-between;
align-items: center;
display: flex;
flex-flow: row wrap;
justify-content: center;
}
.flickr-images img {
max-width: 100%;
margin: 5px;
}

View File

@@ -0,0 +1,13 @@
<!-- Start of Flickr Widget -->
<div class="flickr-wrapper flickr-size-<?php echo esc_attr( $instance['flickr_image_size'] ); ?>">
<div class="flickr-images">
<?php echo $photos; ?>
</div>
<?php if ( isset( $flickr_home ) ) { ?>
<a class="flickr-more" href="<?php echo esc_url( $flickr_home, array( 'http', 'https' ) ); ?>">
<?php esc_html_e( 'More Photos', 'jetpack' ); ?>
</a>
<?php } ?>
</div>
<!-- End of Flickr Widget -->