diff --git a/admin/includes/class-cherry-update/class-cherry-base-update.php b/admin/includes/class-cherry-update/class-cherry-base-update.php index 0eca864..6778a3c 100644 --- a/admin/includes/class-cherry-update/class-cherry-base-update.php +++ b/admin/includes/class-cherry-update/class-cherry-base-update.php @@ -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 diff --git a/admin/views/facebook-like-box-admin.php b/admin/views/facebook-like-box-admin.php index 29d7737..c276010 100644 --- a/admin/views/facebook-like-box-admin.php +++ b/admin/views/facebook-like-box-admin.php @@ -32,12 +32,12 @@

> - +

> - +

diff --git a/admin/views/instagram-admin.php b/admin/views/instagram-admin.php index 38a9020..8872913 100644 --- a/admin/views/instagram-admin.php +++ b/admin/views/instagram-admin.php @@ -43,7 +43,7 @@
link", 'cherry-social' ), esc_url( 'https://instagram.com/developer/clients/manage/' ) ); ?> - +

diff --git a/admin/views/twitter-timeline-admin.php b/admin/views/twitter-timeline-admin.php index a480fd0..fc6f88d 100644 --- a/admin/views/twitter-timeline-admin.php +++ b/admin/views/twitter-timeline-admin.php @@ -22,7 +22,7 @@
page", 'cherry-social' ), esc_url( 'https://twitter.com/settings/widgets/new' ) ); ?> - +

diff --git a/cherry-social.php b/cherry-social.php index a59ec8f..e69508f 100644 --- a/cherry-social.php +++ b/cherry-social.php @@ -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 */ @@ -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__ ) ) ); @@ -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 ) ) { @@ -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; } @@ -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( diff --git a/languages/cherry-social-blank.pot b/languages/cherry-social-blank.pot index 7a21bde..281f7ad 100644 --- a/languages/cherry-social-blank.pot +++ b/languages/cherry-social-blank.pot @@ -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 \n" "Language-Team: Cherry Team \n" @@ -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" @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/public/includes/class-cherry-facebook-likebox-widget.php b/public/includes/class-cherry-facebook-likebox-widget.php index 738819b..c2fa093 100644 --- a/public/includes/class-cherry-facebook-likebox-widget.php +++ b/public/includes/class-cherry-facebook-likebox-widget.php @@ -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; diff --git a/public/includes/class-cherry-social-follow-widget.php b/public/includes/class-cherry-social-follow-widget.php index 5a996aa..0968707 100644 --- a/public/includes/class-cherry-social-follow-widget.php +++ b/public/includes/class-cherry-social-follow-widget.php @@ -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; diff --git a/public/includes/class-cherry-social-shortcodes.php b/public/includes/class-cherry-social-shortcodes.php index 169e081..22e6f41 100644 --- a/public/includes/class-cherry-social-shortcodes.php +++ b/public/includes/class-cherry-social-shortcodes.php @@ -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( diff --git a/public/includes/class-cherry-twitter-timeline-widget.php b/public/includes/class-cherry-twitter-timeline-widget.php index 5516534..e343472 100644 --- a/public/includes/class-cherry-twitter-timeline-widget.php +++ b/public/includes/class-cherry-twitter-timeline-widget.php @@ -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;