Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cheh committed Jul 21, 2015
2 parents d599ee4 + 2d4c22b commit c51cac7
Show file tree
Hide file tree
Showing 16 changed files with 1,212 additions and 326 deletions.
31 changes: 11 additions & 20 deletions admin/views/facebook-like-box-admin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
if ( ! defined( 'ABSPATH' ) ) {
die;
}

Expand Down Expand Up @@ -29,34 +29,25 @@
<label for="<?php echo $this->get_field_id( 'height' ); ?>"><?php _e( 'Height (px):', 'cherry-social' ); ?></label>
<input type="number" min="70" max="2000" step="10" name="<?php echo $this->get_field_name( 'height' ); ?>" value="<?php echo $height; ?>" class="widefat" id="<?php echo $this->get_field_id( 'height' ); ?>" placeholder="<?php sprintf( _e( 'Default (%spx)', 'cherry-social' ), $height ); ?>" /><br>
</p>
<!-- Widget Skin: Select Input -->
<!-- Widget Cover: Checkbox -->
<p>
<label for="<?php echo $this->get_field_id( 'skin' ); ?>"><?php _e( 'Skin:', 'cherry-social' ); ?></label>
<select name="<?php echo $this->get_field_name( 'skin' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'skin' ); ?>">
<?php foreach ( $skin as $k => $v ) { ?>
<option value="<?php echo $k; ?>"<?php selected( $instance['skin'], $k ); ?>><?php echo $v; ?></option>
<?php } ?>
</select>
<input id="<?php echo $this->get_field_id( 'cover' ); ?>" name="<?php echo $this->get_field_name( 'cover' ); ?>" type="checkbox" <?php checked( $cover ); ?>>
<label for="<?php echo $this->get_field_id( 'cover' ); ?>"><?php _e( 'Hide cover photo in the header', 'cherry-social' ); ?></label>
</p>
<!-- Widget Header: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'header' ); ?>" name="<?php echo $this->get_field_name( 'header' ); ?>" type="checkbox" <?php checked( $header ); ?>>
<label for="<?php echo $this->get_field_id( 'header' ); ?>"><?php _e( 'Display header?', 'cherry-social' ); ?></label>
</p>
<!-- Widget Borders: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'border' ); ?>" name="<?php echo $this->get_field_name( 'border' ); ?>" type="checkbox" <?php checked( $border ); ?>>
<label for="<?php echo $this->get_field_id( 'border' ); ?>"><?php _e( 'Display border?', 'cherry-social' ); ?></label>
</p>
<!-- Widget Stream: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'stream' ); ?>" name="<?php echo $this->get_field_name( 'stream' ); ?>" type="checkbox" <?php checked( $stream ); ?>>
<label for="<?php echo $this->get_field_id( 'stream' ); ?>"><?php _e( 'Display stream?', 'cherry-social' ); ?></label>
<label for="<?php echo $this->get_field_id( 'header' ); ?>"><?php _e( 'Use the small header instead', 'cherry-social' ); ?></label>
</p>
<!-- Widget Faces: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'faces' ); ?>" name="<?php echo $this->get_field_name( 'faces' ); ?>" type="checkbox" <?php checked( $faces ); ?>>
<label for="<?php echo $this->get_field_id( 'faces' ); ?>"><?php _e( 'Display faces?', 'cherry-social' ); ?></label>
<label for="<?php echo $this->get_field_id( 'faces' ); ?>"><?php _e( 'Show profile photos when friends like this', 'cherry-social' ); ?></label>
</p>
<!-- Widget Posts: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'posts' ); ?>" name="<?php echo $this->get_field_name( 'posts' ); ?>" type="checkbox" <?php checked( $posts ); ?>>
<label for="<?php echo $this->get_field_id( 'posts' ); ?>"><?php _e( "Show posts from the Page's timeline", 'cherry-social' ); ?></label>
</p>
<?php
/**
Expand Down
89 changes: 89 additions & 0 deletions admin/views/instagram-admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?php
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
die;
}

/**
* Fires before a widget form.
*
* @since 1.0.0
*/
do_action( 'cherry_instagram_widget_form_before' );
?>

<!-- Widget Title: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'cherry-social' ); ?></label>
<input type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $title; ?>" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" />
</p>
<!-- Widget Endpoints: Select Input -->
<p>
<label for="<?php echo $this->get_field_id( 'endpoints' ); ?>"><?php _e( 'Content type:', 'cherry-social' ); ?></label>
<select name="<?php echo $this->get_field_name( 'endpoints' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'endpoints' ); ?>">
<?php foreach ( $endpoints as $k => $v ) { ?>
<option value="<?php echo $k; ?>"<?php selected( $instance['endpoints'], $k ); ?>><?php echo $v; ?></option>
<?php } ?>
</select>
</p>
<!-- Widget Username: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'user_name' ); ?>"><?php _e( 'User Name:', 'cherry-social' ); ?></label>
<input type="text" name="<?php echo $this->get_field_name( 'user_name' ); ?>" value="<?php echo $user_name; ?>" class="widefat" id="<?php echo $this->get_field_id( 'user_name' ); ?>" /><br>
<small><?php _e( "Widget will work only for users who have full rights opened in Instagram account.", 'cherry-social' ); ?></small>
</p>
<!-- Widget Hashtag: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'tag' ); ?>"><?php _e( 'Hashtag:', 'cherry-social' ); ?></label>
<input type="text" name="<?php echo $this->get_field_name( 'tag' ); ?>" value="<?php echo $tag; ?>" class="widefat" id="<?php echo $this->get_field_id( 'tag' ); ?>" /><br>
<small><?php _e( "Enter without `#` symbol.", 'cherry-social' ); ?></small>
</p>
<!-- Widget Client ID: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'client_id' ); ?>"><?php _e( 'Client ID:', 'cherry-social' ); ?></label>
<input type="text" name="<?php echo $this->get_field_name( 'client_id' ); ?>" value="<?php echo $client_id; ?>" class="widefat" id="<?php echo $this->get_field_id( 'client_id' ); ?>" /><br>
<?php $_link = sprintf( __( "<a href='%s' target='_blank'>link</a>", 'cherry-social' ), esc_url( 'https://instagram.com/developer/clients/manage/' ) ); ?>
<small><?php printf( __( "Follow this %s and create the application. After that you will get your applications data where you will see the CLIENT ID.", 'cherry-social' ), $_link ); ?></small>
</p>
<!-- Widget Images count: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'image_counter' ); ?>"><?php _e( 'Number of photos:', 'cherry-social' ); ?></label>
<input type="number" min="1" max="20" step="1" name="<?php echo $this->get_field_name( 'image_counter' ); ?>" value="<?php echo $image_counter; ?>" class="widefat" id="<?php echo $this->get_field_id( 'image_counter' ); ?>" />
</p>
<!-- Widget Images size: Select Input -->
<p>
<label for="<?php echo $this->get_field_id( 'image_size' ); ?>"><?php _e( 'Size of photos', 'cherry-social' ); ?></label>
<select name="<?php echo $this->get_field_name( 'image_size' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'image_size' ); ?>">
<?php foreach ( $image_size as $k => $v ) { ?>
<option value="<?php echo $k; ?>"<?php selected( $instance['image_size'], $k ); ?>><?php echo $v; ?></option>
<?php } ?>
</select>
</p>
<!-- Widget Link: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'link' ); ?>" name="<?php echo $this->get_field_name( 'link' ); ?>" type="checkbox" <?php checked( $link ); ?>>
<label for="<?php echo $this->get_field_id( 'link' ); ?>"><?php _e( 'Linked photo?', 'cherry-social' ); ?></label>
</p>
<!-- Widget Description: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'display_description' ); ?>" name="<?php echo $this->get_field_name( 'display_description' ); ?>" type="checkbox" <?php checked( $display_description ); ?>>
<label for="<?php echo $this->get_field_id( 'display_description' ); ?>"><?php _e( 'Description', 'cherry-social' ); ?></label>
</p>
<!-- Widget Time: Checkbox -->
<p>
<input id="<?php echo $this->get_field_id( 'display_time' ); ?>" name="<?php echo $this->get_field_name( 'display_time' ); ?>" type="checkbox" <?php checked( $display_time ); ?>>
<label for="<?php echo $this->get_field_id( 'display_time' ); ?>"><?php _e( 'Date', 'cherry-social' ); ?></label>
</p>
<!-- Widget Button text: Text Input -->
<p>
<label for="<?php echo $this->get_field_id( 'button_text' ); ?>"><?php _e( 'User account button text:', 'cherry-social' ); ?></label>
<input type="text" name="<?php echo $this->get_field_name( 'button_text' ); ?>" value="<?php echo $button_text; ?>" class="widefat" id="<?php echo $this->get_field_id( 'button_text' ); ?>" />
</p>
<?php
/**
* Fires after a widget form.
*
* @since 1.0.0
*/
do_action( 'cherry_instagram_widget_form_after' );
?>
2 changes: 1 addition & 1 deletion admin/views/social-follow.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
if ( ! defined( 'ABSPATH' ) ) {
die;
}

Expand Down
2 changes: 1 addition & 1 deletion admin/views/twitter-timeline-admin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
if ( ! defined( 'ABSPATH' ) ) {
die;
}

Expand Down
5 changes: 3 additions & 2 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.0 beta
* Version: 1.0.1
* Author: Cherry Team
* Author URI: http://www.cherryframework.com/
* Text Domain: cherry-social
Expand Down Expand Up @@ -102,7 +102,7 @@ private function __construct() {
* @since 1.0.0
*/
public function constants() {
define( 'CHERRY_SOCIAL_VERSION', '1.0.0' );
define( 'CHERRY_SOCIAL_VERSION', '1.0.1' );
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 @@ -136,6 +136,7 @@ public function includes() {
require_once( trailingslashit( CHERRY_SOCIAL_PUBLIC ) . 'includes/class-cherry-twitter-timeline-widget.php' );
require_once( trailingslashit( CHERRY_SOCIAL_PUBLIC ) . 'includes/class-cherry-facebook-likebox-widget.php' );
require_once( trailingslashit( CHERRY_SOCIAL_PUBLIC ) . 'includes/class-cherry-social-follow-widget.php' );
require_once( trailingslashit( CHERRY_SOCIAL_PUBLIC ) . 'includes/class-cherry-instagram-widget.php' );
}

/**
Expand Down
Binary file removed languages/cherry-social-blank.mo
Binary file not shown.
Loading

0 comments on commit c51cac7

Please sign in to comment.