Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cheh committed Jun 15, 2016
2 parents b10b65b + 225066d commit 12ca293
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ language: php

# Declare versions of PHP to use. Use one decimal max.
php:
- "7.0"
- "5.6"
- "5.5"
- "5.4"
Expand Down
2 changes: 1 addition & 1 deletion admin/views/twitter-timeline-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- Widget ID: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'widget_ID' ); ?>"><?php _e( 'Widget ID:', 'cherry-social' ); ?></label>
<input type="text" name="<?php echo $this->get_field_name( 'widget_ID' ); ?>" value="<?php echo $widget_ID; ?>" class="widefat" id="<?php echo $this->get_field_id( 'widget_ID' ); ?>" /><br>
<input type="text" name="<?php echo $this->get_field_name( 'widget_ID' ); ?>" value="<?php echo $tw_widget_id; ?>" class="widefat" id="<?php echo $this->get_field_id( 'widget_ID' ); ?>" /><br>
<?php $link = sprintf( __( "<a href='%s' target='_blank'>page</a>", 'cherry-social' ), esc_url( 'https://twitter.com/settings/widgets/new' ) ); ?>
<small><?php printf( __( "Your widget ID. First of all you need to make a new widget on %s. After that copy and paste widget ID here. You can find it after creating the widget in browser's URL field. It contains only numbers.", 'cherry-social' ), $link ); ?></small>
</p>
Expand Down
16 changes: 8 additions & 8 deletions cherry-social.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Cherry Social
* Plugin URI: http://www.cherryframework.com/
* Description: A social plugin for WordPress.
* Version: 1.0.4-beta
* Version: 1.0.4-beta2
* Author: Cherry Team
* Author URI: http://www.cherryframework.com/
* Text Domain: cherry-social
Expand Down Expand Up @@ -101,7 +101,7 @@ private function __construct() {
* @since 1.0.0
*/
public function constants() {
define( 'CHERRY_SOCIAL_VERSION', '1.0.4-beta' );
define( 'CHERRY_SOCIAL_VERSION', '1.0.4-beta2' );
define( 'CHERRY_SOCIAL_SLUG', basename( dirname( __FILE__ ) ) );
define( 'CHERRY_SOCIAL_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
define( 'CHERRY_SOCIAL_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
Expand Down Expand Up @@ -148,8 +148,8 @@ public function admin() {
if ( is_admin() ) {
require_once( CHERRY_SOCIAL_ADMIN . '/includes/class-cherry-update/class-cherry-plugin-update.php' );

$Cherry_Plugin_Update = new Cherry_Plugin_Update();
$Cherry_Plugin_Update->init( array(
$updater = new Cherry_Plugin_Update();
$updater->init( array(
'version' => CHERRY_SOCIAL_VERSION,
'slug' => CHERRY_SOCIAL_SLUG,
'repository_name' => CHERRY_SOCIAL_SLUG,
Expand Down Expand Up @@ -345,9 +345,9 @@ public function share( $pre = false, $attr = array() ) {
* Output or retrieve a share buttons in the list-style.
*
* @since 1.0.0
* @param array $networks Set of social networks.
* @param boolean $echo Echo or return.
* @param string $custom_class Extra CSS-class.
* @param array $networks Set of social networks.
* @param bool $echo Echo or return.
* @param string $custom_class Extra CSS-class.
* @return string
*/
public function share_buttons( $networks, $echo = true, $custom_class = '' ) {
Expand Down Expand Up @@ -465,7 +465,7 @@ public function register_static() {
*
* @since 1.0.0
* @param array|init $networks Array with network names or `-1` - if you want get all networks.
* @param boolean $echo Output or retrieve result.
* @param bool $echo Output or retrieve result.
* @param string $custom_class Extra CSS-class.
* @return string
*/
Expand Down
4 changes: 2 additions & 2 deletions public/includes/class-cherry-instagram-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public function get_photos( $data, $img_counter, $config ) {
$_photo['date'] = sanitize_text_field( $photo['date'] );
}

if ( in_array( 'caption', $config ) ) {
if ( in_array( 'caption', $config ) && ! empty( $photo['caption'] ) ) {
$_photo['caption'] = wp_html_excerpt(
$photo['caption'],
apply_filters( 'cherry_instagram_caption_length', 10 ),
Expand Down Expand Up @@ -477,7 +477,7 @@ public function get_post_url() {
* Retrieve a caption.
*
* @since 1.0.4
* @param array $photo Item photo data.
* @param array $photo Item photo data.
* @return string
*/
public function get_caption( $photo ) {
Expand Down
4 changes: 2 additions & 2 deletions public/includes/class-cherry-twitter-timeline-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function widget( $args, $instance ) {
}
}

$widget_ID = esc_attr( $instance['widget_ID'] );
$tw_widget_id = esc_attr( $instance['widget_ID'] );
$height = ! empty( $instance['height'] ) ? absint( $instance['height'] ) : '';
$limit = ! empty( $instance['limit'] ) ? absint( $instance['limit'] ) : '';
$link_color = ! empty( $instance['link_color'] ) ? esc_attr( $instance['link_color'] ) : '';
Expand Down Expand Up @@ -229,7 +229,7 @@ public function form( $instance ) {

$instance = wp_parse_args( (array) $instance, $defaults );
$title = esc_attr( $instance['title'] );
$widget_ID = esc_attr( $instance['widget_ID'] );
$tw_widget_id = esc_attr( $instance['widget_ID'] );
$height = intval( $instance['height'] );
$limit = ! empty( $instance['limit'] ) ? intval( $instance['limit'] ) : esc_attr( $defaults['limit'] );
$skin = $this->get_skin_options();
Expand Down
2 changes: 1 addition & 1 deletion public/views/instagram-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<?php echo $date; ?>
<?php echo $caption; ?>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion public/views/twitter-timeline-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
?>
<a class="twitter-timeline"
data-widget-id="<?php echo $widget_ID; ?>"
data-widget-id="<?php echo $tw_widget_id; ?>"
data-theme="<?php echo $skin; ?>"
data-link-color="#<?php echo $link_color; ?>"
data-border-color="#<?php echo $border_color; ?>"
Expand Down

0 comments on commit 12ca293

Please sign in to comment.