Skip to content

Commit

Permalink
= 1.0.3 : May 5th, 2016 =
Browse files Browse the repository at this point in the history
* added : lang domain for plugin translation
  • Loading branch information
nikeo committed May 5, 2016
1 parent c6476e8 commit 6e68d46
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ node_modules/


# BUILD
build/*.zip
build/


# WPCS
Expand Down
40 changes: 23 additions & 17 deletions build/hueman-addons/hueman-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Hueman Addons
* Plugin URI: http://presscustomizr.com
* Description: Hueman Theme Addons
* Version: 1.0.2
* Version: 1.0.3
* Author: Press Customizr
* Author URI: http://presscustomizr.com
* License: GPLv2 or later
Expand Down Expand Up @@ -40,6 +40,10 @@ function __construct() {
return;
}

//TEXT DOMAIN
//adds plugin text domain
add_action( 'plugins_loaded', array( $this , 'hu_plugin_lang' ) );

//SHORTCODES
// Load custom shortcodes
// @fromfull => should me moved in a plugin
Expand All @@ -65,35 +69,35 @@ function hu_register_sharrre_settings( $settings ) {
'sharrre' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Display social sharing buttons in your single posts', 'hueman'),
'title' => __('Social Sharring Bar Setttings', 'hueman'),
'notice' => __('Display social sharing buttons in each single articles.', 'hueman'),
'label' => __('Display social sharing buttons in your single posts', 'hueman-addons'),
'title' => __('Social Sharring Bar Setttings', 'hueman-addons'),
'notice' => __('Display social sharing buttons in each single articles.', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 40
),
'sharrre-scrollable' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Make the Share Bar "sticky"', 'hueman'),
'notice' => __('Make the social share bar stick to the browser window when scrolling down a post.', 'hueman'),
'label' => __('Make the Share Bar "sticky"', 'hueman-addons'),
'notice' => __('Make the social share bar stick to the browser window when scrolling down a post.', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 50
),
'sharrre-twitter-on' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Enable Twitter Button', 'hueman'),
'label' => __('Enable Twitter Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 60
),
'twitter-username' => array(
'default' => '',
'control' => 'HU_controls',
'label' => __('Twitter Username (without "@")', 'hueman'),
'notice' => __('Simply enter your username without the "@" prefix. Your username will be added to share-tweets of your posts (optional).', 'hueman'),
'label' => __('Twitter Username (without "@")', 'hueman-addons'),
'notice' => __('Simply enter your username without the "@" prefix. Your username will be added to share-tweets of your posts (optional).', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'text',
'transport' => 'postMessage',
Expand All @@ -102,31 +106,31 @@ function hu_register_sharrre_settings( $settings ) {
'sharrre-facebook-on' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Enable Facebook Button', 'hueman'),
'label' => __('Enable Facebook Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 80
),
'sharrre-google-on' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Enable Google Plus Button', 'hueman'),
'label' => __('Enable Google Plus Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 90
),
'sharrre-pinterest-on' => array(
'default' => 0,
'control' => 'HU_controls',
'label' => __('Enable Pinterest Button', 'hueman'),
'label' => __('Enable Pinterest Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 100
),
'sharrre-linkedin-on' => array(
'default' => 0,
'control' => 'HU_controls',
'label' => __('Enable LinkedIn Button', 'hueman'),
'label' => __('Enable LinkedIn Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 100
Expand All @@ -136,7 +140,9 @@ function hu_register_sharrre_settings( $settings ) {
return array_merge( $sharrre_settings, $settings );
}


function hu_plugin_lang() {
load_plugin_textdomain( 'hueman-addons' , false, basename( dirname( __FILE__ ) ) . '/lang' );
}

/**************************************************************
** SHORTCODES
Expand All @@ -163,7 +169,7 @@ function hu_sharrre_front_actions() {

//@param $classes = array of classes
//hook : hu_single_entry_class
function hu_add_sharrre_class( $classes ) {
function hu_maybe_add_sharrre_class( $classes ) {
if ( ! hu_are_share_buttons_enabled() )
return $classes;
$classes[] = 'share';
Expand Down Expand Up @@ -267,13 +273,13 @@ function tc_get_theme_name(){


function hu_admin_notice() {
$what = __( 'works only with the Hueman theme', 'hueman' );
$what = __( 'works only with the Hueman theme', 'hueman-addons' );

?>
<div class="error">
<p>
<?php
printf( __( 'The <strong>%1$s</strong> plugin %2$s.' ,'hueman' ),
printf( __( 'The <strong>%1$s</strong> plugin %2$s.' ,'hueman-addons' ),
'Hueman Addons',
$what
);
Expand Down
12 changes: 6 additions & 6 deletions build/hueman-addons/inc/sharrre-template.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div class="sharrre-container">
<span><?php _e('Share','hueman'); ?></span>
<span><?php _e('Share','hueman-addons'); ?></span>
<?php if ( hu_is_checked('sharrre-twitter-on') ) : ?>
<div id="twitter" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Tweet"><a class="box" href="#"><div class="count" href="#"><i class="fa fa-plus"></i></div><div class="share"><i class="fa fa-twitter"></i></div></a></div>
<div id="twitter" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Tweet', 'hueman-addons'); ?>"><a class="box" href="#"><div class="count" href="#"><i class="fa fa-plus"></i></div><div class="share"><i class="fa fa-twitter"></i></div></a></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-facebook-on') ) : ?>
<div id="facebook" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Like"></div>
<div id="facebook" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Like', 'hueman-addons'); ?>"></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-google-on') ) : ?>
<div id="googleplus" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="+1"></div>
<div id="googleplus" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('+1', 'hueman-addons'); ?>"></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-pinterest-on') ) : ?>
<div id="pinterest" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Pin It"></div>
<div id="pinterest" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Pin It', 'hueman-addons'); ?>"></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-linkedin-on') ) : ?>
<div id="linkedin" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Publish on Linked In"></div>
<div id="linkedin" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Publish on Linked In', 'hueman-addons'); ?>"></div>
<?php endif; ?>
</div><!--/.sharrre-container-->

Expand Down
14 changes: 13 additions & 1 deletion build/hueman-addons/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Plugin URI: https://github.com/presscustomizr/hueman-addons
Tags: hueman theme, hueman
Requires at least: 3.4
Tested up to: 4.5
Stable tag: 1.0.2
Stable tag: 1.0.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -42,6 +42,18 @@ The plugin includes the Share bar and shortcodes for the Hueman theme.


== Changelog ==
= 1.0.3 : May 5th, 2016 =
* added : lang domain for plugin translation

= 1.0.2 : May 5th, 2016 =
* fixed : Share bar blocking view in mobile
* fixed : Add Share Class Only When Sharebar Active
* fixed : when the sticky option is enabled, the bar can be on top of the attachments slideshow
* fixed : disabled social share buttons : there is still block area stolen from the content
* added : LinkedIn share button
* added : options to select which button(s) to activate
* removed : grunt reload script

= 1.0.1 : April 14th, 2016 =
* updated : sharrre Jquery plugin to the latest version (2.0.1) https://github.com/Julienh/Sharrre
* fixed : undefined var _gaq in sharre
Expand Down
12 changes: 11 additions & 1 deletion grunt-tasks-config/replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,15 @@ module.exports = {
from: /^.*Stable tag: .*$/m,
to: 'Stable tag: <%= pkg.version %>'
} ]
}
},
lang : {
src: [
'<%= paths.lang %>*.po'
],
overwrite: true,
replacements: [ {
from: /^.* Hueman Addons v.*$/m,
to: '"Project-Id-Version: Hueman Addons v<%= pkg.version %>\\n"'
} ]
},
};
3 changes: 2 additions & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = function(grunt) {
data: {
pkg: grunt.file.readJSON( 'package.json' ),
paths : {
front_js : 'assets/front/js/',
front_js : 'assets/front/js/',
lang : 'lang/'
},
tasks : {
'dev': [ 'watch'],
Expand Down
40 changes: 23 additions & 17 deletions hueman-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Hueman Addons
* Plugin URI: http://presscustomizr.com
* Description: Hueman Theme Addons
* Version: 1.0.2
* Version: 1.0.3
* Author: Press Customizr
* Author URI: http://presscustomizr.com
* License: GPLv2 or later
Expand Down Expand Up @@ -40,6 +40,10 @@ function __construct() {
return;
}

//TEXT DOMAIN
//adds plugin text domain
add_action( 'plugins_loaded', array( $this , 'hu_plugin_lang' ) );

//SHORTCODES
// Load custom shortcodes
// @fromfull => should me moved in a plugin
Expand All @@ -65,35 +69,35 @@ function hu_register_sharrre_settings( $settings ) {
'sharrre' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Display social sharing buttons in your single posts', 'hueman'),
'title' => __('Social Sharring Bar Setttings', 'hueman'),
'notice' => __('Display social sharing buttons in each single articles.', 'hueman'),
'label' => __('Display social sharing buttons in your single posts', 'hueman-addons'),
'title' => __('Social Sharring Bar Setttings', 'hueman-addons'),
'notice' => __('Display social sharing buttons in each single articles.', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 40
),
'sharrre-scrollable' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Make the Share Bar "sticky"', 'hueman'),
'notice' => __('Make the social share bar stick to the browser window when scrolling down a post.', 'hueman'),
'label' => __('Make the Share Bar "sticky"', 'hueman-addons'),
'notice' => __('Make the social share bar stick to the browser window when scrolling down a post.', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 50
),
'sharrre-twitter-on' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Enable Twitter Button', 'hueman'),
'label' => __('Enable Twitter Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 60
),
'twitter-username' => array(
'default' => '',
'control' => 'HU_controls',
'label' => __('Twitter Username (without "@")', 'hueman'),
'notice' => __('Simply enter your username without the "@" prefix. Your username will be added to share-tweets of your posts (optional).', 'hueman'),
'label' => __('Twitter Username (without "@")', 'hueman-addons'),
'notice' => __('Simply enter your username without the "@" prefix. Your username will be added to share-tweets of your posts (optional).', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'text',
'transport' => 'postMessage',
Expand All @@ -102,31 +106,31 @@ function hu_register_sharrre_settings( $settings ) {
'sharrre-facebook-on' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Enable Facebook Button', 'hueman'),
'label' => __('Enable Facebook Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 80
),
'sharrre-google-on' => array(
'default' => 1,
'control' => 'HU_controls',
'label' => __('Enable Google Plus Button', 'hueman'),
'label' => __('Enable Google Plus Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 90
),
'sharrre-pinterest-on' => array(
'default' => 0,
'control' => 'HU_controls',
'label' => __('Enable Pinterest Button', 'hueman'),
'label' => __('Enable Pinterest Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 100
),
'sharrre-linkedin-on' => array(
'default' => 0,
'control' => 'HU_controls',
'label' => __('Enable LinkedIn Button', 'hueman'),
'label' => __('Enable LinkedIn Button', 'hueman-addons'),
'section' => 'social_links_sec',
'type' => 'checkbox',
'priority' => 100
Expand All @@ -136,7 +140,9 @@ function hu_register_sharrre_settings( $settings ) {
return array_merge( $sharrre_settings, $settings );
}


function hu_plugin_lang() {
load_plugin_textdomain( 'hueman-addons' , false, basename( dirname( __FILE__ ) ) . '/lang' );
}

/**************************************************************
** SHORTCODES
Expand All @@ -163,7 +169,7 @@ function hu_sharrre_front_actions() {

//@param $classes = array of classes
//hook : hu_single_entry_class
function hu_add_sharrre_class( $classes ) {
function hu_maybe_add_sharrre_class( $classes ) {
if ( ! hu_are_share_buttons_enabled() )
return $classes;
$classes[] = 'share';
Expand Down Expand Up @@ -267,13 +273,13 @@ function tc_get_theme_name(){


function hu_admin_notice() {
$what = __( 'works only with the Hueman theme', 'hueman' );
$what = __( 'works only with the Hueman theme', 'hueman-addons' );

?>
<div class="error">
<p>
<?php
printf( __( 'The <strong>%1$s</strong> plugin %2$s.' ,'hueman' ),
printf( __( 'The <strong>%1$s</strong> plugin %2$s.' ,'hueman-addons' ),
'Hueman Addons',
$what
);
Expand Down
12 changes: 6 additions & 6 deletions inc/sharrre-template.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div class="sharrre-container">
<span><?php _e('Share','hueman'); ?></span>
<span><?php _e('Share','hueman-addons'); ?></span>
<?php if ( hu_is_checked('sharrre-twitter-on') ) : ?>
<div id="twitter" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Tweet"><a class="box" href="#"><div class="count" href="#"><i class="fa fa-plus"></i></div><div class="share"><i class="fa fa-twitter"></i></div></a></div>
<div id="twitter" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Tweet', 'hueman-addons'); ?>"><a class="box" href="#"><div class="count" href="#"><i class="fa fa-plus"></i></div><div class="share"><i class="fa fa-twitter"></i></div></a></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-facebook-on') ) : ?>
<div id="facebook" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Like"></div>
<div id="facebook" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Like', 'hueman-addons'); ?>"></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-google-on') ) : ?>
<div id="googleplus" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="+1"></div>
<div id="googleplus" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('+1', 'hueman-addons'); ?>"></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-pinterest-on') ) : ?>
<div id="pinterest" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Pin It"></div>
<div id="pinterest" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Pin It', 'hueman-addons'); ?>"></div>
<?php endif; ?>
<?php if ( hu_is_checked('sharrre-linkedin-on') ) : ?>
<div id="linkedin" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="Publish on Linked In"></div>
<div id="linkedin" data-url="<?php echo the_permalink(); ?>" data-text="<?php echo the_title(); ?>" data-title="<?php _e('Publish on Linked In', 'hueman-addons'); ?>"></div>
<?php endif; ?>
</div><!--/.sharrre-container-->

Expand Down
Binary file added lang/en_US.mo
Binary file not shown.
Loading

0 comments on commit 6e68d46

Please sign in to comment.