Skip to content

Commit

Permalink
FIX: after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cheh committed Sep 2, 2015
2 parents c51cac7 + 545609b commit 819a450
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ protected function remote_query( $args ) {
public function rename_github_folder( $upgrate_dir, $remote_dir, $skin_upgrader ){

$slug = $this->api[ 'slug' ];
$is_theme = isset($skin_upgrader->skin->theme) ? true : false ;
$is_theme = isset($skin_upgrader->skin->theme) || isset($skin_upgrader->skin->theme_info) ? true : false ;
$is_plugin = isset($skin_upgrader->skin->plugin_info) ? true : false ;
$domain_plugin = $is_plugin ? $skin_upgrader->skin->plugin_info[ 'TextDomain' ] : '' ;
$title_plugin = $is_plugin ? str_replace(' ', '-', strtolower( $skin_upgrader->skin->plugin_info[ 'Title' ] ) ) : '' ;
$name_plugin = $is_plugin ? str_replace(' ', '-', strtolower( $skin_upgrader->skin->plugin_info[ 'Name' ] ) ) : '' ;

if( $is_theme && $skin_upgrader->skin->theme === $slug
if( $is_theme && strpos($upgrate_dir, $slug) !== false
|| $is_plugin && $domain_plugin === $slug
|| $is_plugin && $title_plugin === $slug
|| $is_plugin && $name_plugin === $slug
Expand Down
4 changes: 2 additions & 2 deletions admin/views/facebook-like-box-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
<!-- Widget Cover: Checkbox -->
<p>
<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>
<label for="<?php echo $this->get_field_id( 'cover' ); ?>"><?php _e( 'Hide cover photo in 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( 'Use the small header instead', 'cherry-social' ); ?></label>
<label for="<?php echo $this->get_field_id( 'header' ); ?>"><?php _e( 'Use small header instead', 'cherry-social' ); ?></label>
</p>
<!-- Widget Faces: Checkbox -->
<p>
Expand Down
2 changes: 1 addition & 1 deletion admin/views/instagram-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<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>
<small><?php printf( __( "Follow this %s and create the application. After that you will get your application data where you will see the CLIENT ID.", 'cherry-social' ), $_link ); ?></small>
</p>
<!-- Widget Images count: Text Input -->
<p>
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 @@ -22,7 +22,7 @@
<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>
<?php $link = sprintf( __( "<a href='%s' target='_blank'>page</a>", 'cherry-social' ), esc_url( 'https://twitter.com/settings/widgets/new' ) ); ?>
<small><?php printf( __( "ID of your widget. First of all you need make a new one widget on %s. After it copy and paste here ID of widget. You can find it after creating of widget in browser's URL field. It contents only numbers.", 'cherry-social' ), $link ); ?></small>
<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>
<!-- Widget Height: Text Input -->
<p>
Expand Down
24 changes: 9 additions & 15 deletions cherry-social.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Plugin Name: Cherry Social
* Plugin URI: http://www.cherryframework.com/
* Description: A social plugin for WordPress.
* Version: 1.0.1
* Version: 1.0.2-beta
* Author: Cherry Team
* Author URI: http://www.cherryframework.com/
* Text Domain: cherry-social
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* Domain Path: /languages
*/

Expand Down Expand Up @@ -102,7 +102,7 @@ private function __construct() {
* @since 1.0.0
*/
public function constants() {
define( 'CHERRY_SOCIAL_VERSION', '1.0.1' );
define( 'CHERRY_SOCIAL_VERSION', '1.0.2-beta' );
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 @@ -426,13 +426,7 @@ public function share_buttons( $networks, $echo = true, $custom_class = '' ) {
public function register_static() {
$static_file = apply_filters( 'cherry_social_static_file', 'social-follow.php' );

if ( defined( 'CHILD_DIR' ) ) {
$child_dir = CHILD_DIR;
} else {
$child_dir = get_stylesheet_directory();
}

$abspath = preg_replace( '#/+#', '/', trailingslashit( $child_dir ) . $static_file );
$abspath = preg_replace( '#/+#', '/', trailingslashit( get_stylesheet_directory() ) . $static_file );

// If file found in child theme - include it and break function.
if ( file_exists( $abspath ) ) {
Expand Down Expand Up @@ -477,9 +471,9 @@ public function get_follows( $networks, $echo = true, $custom_class = '' ) {
if ( -1 != $networks ) {
foreach ( $follows as $id => $follow ) {

if ( ! empty( $follow['link-label'] )
&& ( in_array( sanitize_key( $follow['link-label'] ), $networks ) )
) {
if ( ( ! empty( $follow['link-label'] ) && ( in_array( sanitize_key( $follow['link-label'] ), $networks ) ) )
||
( ! empty( $follow['network-id'] ) && ( in_array( sanitize_key( $follow['network-id'] ), $networks ) ) ) ) {
continue;
}

Expand Down Expand Up @@ -730,7 +724,7 @@ public function add_cherry_options( $sections ) {
$social_options['follow-title'] = array(
'type' => 'text',
'title' => __( 'Follow Us title', 'cherry-social' ),
'decsription' => __( 'This title are using in `Follow Us` static.', 'cherry-social' ),
'decsription' => __( 'This title is used in `Follow Us` static.', 'cherry-social' ),
'value' => __( 'Follow Us', 'cherry-social' ),
);
$social_options['follow-items'] = array(
Expand Down
24 changes: 12 additions & 12 deletions languages/cherry-social-blank.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: blank\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-20 17:27+0300\n"
"POT-Creation-Date: 2015-07-30 16:59+0300\n"
"PO-Revision-Date: 2015-04-06 06:14+0300\n"
"Last-Translator: Vladimir Anokhin <ano.vladimir@gmail.com>\n"
"Language-Team: Cherry Team <support@cherryframework.com>\n"
Expand All @@ -15,7 +15,7 @@ msgstr ""
"esc_attr__;_x:1,2c;_n:1,2\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Generator: Poedit 1.8.2\n"
"X-Generator: Poedit 1.8.3\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Poedit-SearchPath-0: .\n"

Expand Down Expand Up @@ -55,11 +55,11 @@ msgid "Default (%spx)"
msgstr ""

#: admin/views/facebook-like-box-admin.php:35
msgid "Hide cover photo in the header"
msgid "Hide cover photo in header"
msgstr ""

#: admin/views/facebook-like-box-admin.php:40
msgid "Use the small header instead"
msgid "Use small header instead"
msgstr ""

#: admin/views/facebook-like-box-admin.php:45
Expand Down Expand Up @@ -105,7 +105,7 @@ msgstr ""
#, php-format
msgid ""
"Follow this %s and create the application. After that you will get your "
"applications data where you will see the CLIENT ID."
"application data where you will see the CLIENT ID."
msgstr ""

#: admin/views/instagram-admin.php:50
Expand Down Expand Up @@ -152,9 +152,9 @@ msgstr ""
#: admin/views/twitter-timeline-admin.php:25
#, php-format
msgid ""
"ID of your widget. First of all you need make a new one widget on %s. After "
"it copy and paste here ID of widget. You can find it after creating of "
"widget in browser's URL field. It contents only numbers."
"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."
msgstr ""

#: admin/views/twitter-timeline-admin.php:34
Expand Down Expand Up @@ -223,7 +223,7 @@ msgid "Follow Us title"
msgstr ""

#: cherry-social.php:733
msgid "This title are using in `Follow Us` static."
msgid "This title is used in `Follow Us` static."
msgstr ""

#: cherry-social.php:734 init/statics/social-follow.php:33
Expand Down Expand Up @@ -263,7 +263,7 @@ msgid "A widget for Facebook Like Box."
msgstr ""

#: public/includes/class-cherry-facebook-likebox-widget.php:83
msgid "Please, enter URL to the your facebook page."
msgid "Please, enter the URL of your facebook page."
msgstr ""

#: public/includes/class-cherry-instagram-widget.php:37
Expand Down Expand Up @@ -319,7 +319,7 @@ msgid "A social follow widget."
msgstr ""

#: public/includes/class-cherry-social-follow-widget.php:96
msgid "Sorry, but networks not found."
msgid "Sorry, but networks are not found."
msgstr ""

#: public/includes/class-cherry-social-shortcodes.php:172
Expand Down Expand Up @@ -359,7 +359,7 @@ msgid "A widget for Twitter timeline."
msgstr ""

#: public/includes/class-cherry-twitter-timeline-widget.php:87
msgid "Please, enter ID of your Twitter widget."
msgid "Please, enter your Twitter widget ID."
msgstr ""

#: public/includes/class-cherry-twitter-timeline-widget.php:245
Expand Down
2 changes: 1 addition & 1 deletion public/includes/class-cherry-facebook-likebox-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function widget( $args, $instance ) {
extract( $args, EXTR_SKIP );

if ( empty( $instance['page_url'] ) ) {
return print $before_widget . __( 'Please, enter URL to the your facebook page.' ) . $after_widget;
return print $before_widget . __( 'Please, enter the URL of your facebook page.' ) . $after_widget;
}

$output = $before_widget;
Expand Down
2 changes: 1 addition & 1 deletion public/includes/class-cherry-social-follow-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function widget( $args, $instance ) {
extract( $args, EXTR_SKIP );

if ( !is_array( $this->follow_items ) || empty( $this->follow_items ) ) {
return print $before_widget . __( 'Sorry, but networks not found.', 'cherry-social' ) . $after_widget;
return print $before_widget . __( 'Sorry, but networks are not found.', 'cherry-social' ) . $after_widget;
}

$output = $before_widget;
Expand Down
8 changes: 7 additions & 1 deletion public/includes/class-cherry-social-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@ public function shortcodes( $shortcodes ) {
if ( empty( $follow['link-label'] ) ) {
continue;
}
$follow_values[ sanitize_key( $follow['link-label'] ) ] = $follow['link-label'];

if ( empty( $follow['network-id'] ) ) {
$follow_values[ sanitize_key( $follow['link-label'] ) ] = $follow['link-label'];
} else {
$follow_values[ sanitize_key( $follow['network-id'] ) ] = $follow['link-label'];
}

}

$shortcodes[ 'follow' ] = array(
Expand Down
2 changes: 1 addition & 1 deletion public/includes/class-cherry-twitter-timeline-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function widget( $args, $instance ) {
extract( $args, EXTR_SKIP );

if ( empty( $instance['widget_ID'] ) ) {
return print $before_widget . __( 'Please, enter ID of your Twitter widget.' ) . $after_widget;
return print $before_widget . __( 'Please, enter your Twitter widget ID.' ) . $after_widget;
}

$output = $before_widget;
Expand Down

0 comments on commit 819a450

Please sign in to comment.