Skip to content

Commit

Permalink
Plugin updated to version 4.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurGareginyan committed Jun 16, 2017
1 parent d57d1c3 commit ad961b1
Show file tree
Hide file tree
Showing 23 changed files with 869 additions and 649 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ It give you finer control over buttons. You can configure they on plugins settin
* Google+
* YouTube
* YouTube Gaming
* iTunes
* Apple Music
* Periscope
* Vimeo
* Blogger
Expand Down Expand Up @@ -74,6 +76,8 @@ It give you finer control over buttons. You can configure they on plugins settin
* StumbleUpon
* Bloglovin
* WhatsApp
* Medium
* 500px
* LINE
* VKontakte (vk.com)
* Odnoklassniki (ok.ru)
Expand Down Expand Up @@ -139,7 +143,7 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)

* The icon of plugin is a copyrighted image created by [Arthur Gareginyan](http://www.arthurgareginyan.com). (C) All rights reserved.
* The banner of plugin is a copyrighted image created by [Arthur Gareginyan](http://www.arthurgareginyan.com). (C) All rights reserved.
* Icons [mixer.png, telephone.png, bloglovin.png, line.png, stumbleupon.png, whatsapp.png, plugdj.png, deviantart.png, buzzsprout.png, periscope.png, youtube.png, meetvibe.png, wordpress.png, twitter.png, imdb.png, dloky.png, snapchat.png, steam.png, discord.png, twitch.png, amazon.png, bookbub.png, goodreads.png, reddit.png, meetup.png, codepen.png, instagram.png, patreon.png, bandcamp.png, youtube-gaming.png, xing.png](https://www.iconfinder.com/iconsets/square-logo-buttons?ref=ArthurGareginyan) by [Arthur Gareginyan](http://www.arthurgareginyan.com) and licensed under the [Creative Commons (Attribution 3.0 Unported)](http://creativecommons.org/licenses/by/3.0/).
* Icons [itunes.png, apple-music.png, medium.png, 500px.png, mixer.png, telephone.png, bloglovin.png, line.png, stumbleupon.png, whatsapp.png, plugdj.png, deviantart.png, buzzsprout.png, periscope.png, youtube.png, meetvibe.png, wordpress.png, twitter.png, imdb.png, dloky.png, snapchat.png, steam.png, discord.png, twitch.png, amazon.png, bookbub.png, goodreads.png, reddit.png, meetup.png, codepen.png, instagram.png, patreon.png, bandcamp.png, youtube-gaming.png, xing.png](https://www.iconfinder.com/iconsets/square-logo-buttons?ref=ArthurGareginyan) by [Arthur Gareginyan](http://www.arthurgareginyan.com) and licensed under the [Creative Commons (Attribution 3.0 Unported)](http://creativecommons.org/licenses/by/3.0/).
* Icons [facebook.png, flickr.png, google-plus.png, vimeo.png, blogger.png, linkedin.png, livejournal.png, pinterest.png, tumblr.png, soundcloud.png, spotify.png, yelp.png, vkontakte.png, odnoklassniki.png, telegram.png, github.png, skype.png, website.png, email.png, rss-feed.png](https://www.iconfinder.com/iconsets/social-buttons-2?ref=ArthurGareginyan) by Ivlichev Victor Petrovich and licensed under the [Creative Commons (Attribution 3.0 Unported)](http://creativecommons.org/licenses/by/3.0/).
* [Bootstrap](http://getbootstrap.com) released under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE).
* [Bootstrap-checkbox](https://github.com/vsn4ik/bootstrap-checkbox) is a project of [Vasily A.](https://github.com/vsn4ik), shared under the [MIT license](https://github.com/vsn4ik/bootstrap-checkbox/blob/master/LICENSE).
Expand Down
Binary file modified assets/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 9 additions & 15 deletions inc/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @uthor Arthur Gareginyan
* @link http://www.arthurgareginyan.com
* @copyright Copyright (c) 2016-2017 Arthur Gareginyan. All Rights Reserved.
* @since 4.10
* @since 4.11
*/


Expand Down Expand Up @@ -52,16 +52,7 @@ h2 span {
display: block ;
margin-top: 15px;
font-size: 16px;
text-shadow: 0 -1px 0 #fff,
0 1px 0 #2e2e2e,
0 2px 0 #2a2a2a,
0 3px 0 #262626,
0 4px 0 #222,
0 5px 0 #1e1e1e,
0 6px 0 #1a1a1a,
0 7px 0 #161616,
0 8px 0 #121212,
0 22px 30px rgba(0, 0, 0, 0.9);
text-shadow: none;
line-height: 20px !important;
}
h2 span a,
Expand All @@ -74,6 +65,13 @@ h2 span a:hover {
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
h2 .version {
position: absolute;
right: 40px;
color: #a6a6a6;
text-shadow: none;
letter-spacing: .1em;
}

/* Titles and Descriptions of sections
-------------------------------------------------------------- */
Expand Down Expand Up @@ -145,10 +143,6 @@ h3.title {
#side-sortables .paypal {
font-size: 18px;
}
#side-sortables .version {
color: #888888;
text-align: right;
}

/* Support - addition section
-------------------------------------------------------------- */
Expand Down
Binary file added inc/img/social-media-icons/500px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added inc/img/social-media-icons/apple-music.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified inc/img/social-media-icons/codepen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added inc/img/social-media-icons/itunes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added inc/img/social-media-icons/medium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified inc/img/social-media-icons/snapchat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified inc/img/social-media-icons/vkontakte.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion inc/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Plugin JavaScript and JQuery code for the admin pages of website
* Plugin JavaScript and jQuery code for the admin pages of website
*
* @package Social Media Follow Buttons Bar
* @uthor Arthur Gareginyan
Expand Down
51 changes: 34 additions & 17 deletions inc/php/enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@
/**
* Base for the _load_scripts hook
*
* @since 4.6
* @since 4.11
*/
function smbtoolbar_load_scripts_base( $options ) {

// Load JQuery library
// Put value of constants to variables for easier access
$slug = SMEDIABT_SLUG;
$prefix = SMEDIABT_PREFIX;
$url = SMEDIABT_URL;

// Load jQuery library
wp_enqueue_script( 'jquery' );

// Style sheet
wp_enqueue_style( SMEDIABT_PREFIX . '-frontend-css', SMEDIABT_URL . 'inc/css/frontend.css' );
wp_enqueue_style( $prefix . '-frontend-css', $url . 'inc/css/frontend.css' );

// Size of icons
$icon_size = esc_textarea( $options['icon-size'] );
Expand Down Expand Up @@ -50,39 +55,45 @@ function smbtoolbar_load_scripts_base( $options ) {
margin: " . ( $margin_right / 2 ) . "px !important;
}
";
wp_add_inline_style( SMEDIABT_PREFIX . '-frontend-css', $custom_css );
wp_add_inline_style( $prefix . '-frontend-css', $custom_css );

}

/**
* Load scripts and style sheet for settings page
*
* @since 4.6
* @since 4.11
*/
function smbtoolbar_load_scripts_admin( $hook ) {

// Put value of constants to variables for easier access
$slug = SMEDIABT_SLUG;
$prefix = SMEDIABT_PREFIX;
$url = SMEDIABT_URL;
$settings = SMEDIABT_SETTINGS;

// Return if the page is not a settings page of this plugin
$settings_page = 'settings_page_' . SMEDIABT_SLUG;
$settings_page = 'settings_page_' . $slug;
if ( $settings_page != $hook ) {
return;
}

// Read options from BD
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
$options = get_option( $settings . '_settings' );

// Style sheet
wp_enqueue_style( SMEDIABT_PREFIX . '-admin-css', SMEDIABT_URL . 'inc/css/admin.css' );
wp_enqueue_style( $prefix . '-admin-css', $url . 'inc/css/admin.css' );

// JavaScript
wp_enqueue_script( SMEDIABT_PREFIX . '-admin-js', SMEDIABT_URL . 'inc/js/admin.js', array(), false, true );
wp_enqueue_script( $prefix . '-admin-js', $url . 'inc/js/admin.js', array(), false, true );

// Bootstrap library
wp_enqueue_style( SMEDIABT_PREFIX . '-bootstrap-css', SMEDIABT_URL . 'inc/lib/bootstrap/bootstrap.css' );
wp_enqueue_style( SMEDIABT_PREFIX . '-bootstrap-theme-css', SMEDIABT_URL . 'inc/lib/bootstrap/bootstrap-theme.css' );
wp_enqueue_script( SMEDIABT_PREFIX . '-bootstrap-js', SMEDIABT_URL . 'inc/lib/bootstrap/bootstrap.js' );
wp_enqueue_style( $prefix . '-bootstrap-css', $url . 'inc/lib/bootstrap/bootstrap.css' );
wp_enqueue_style( $prefix . '-bootstrap-theme-css', $url . 'inc/lib/bootstrap/bootstrap-theme.css' );
wp_enqueue_script( $prefix . '-bootstrap-js', $url . 'inc/lib/bootstrap/bootstrap.js' );

// Other libraries
wp_enqueue_script( SMEDIABT_PREFIX . '-bootstrap-checkbox-js', SMEDIABT_URL . 'inc/lib/bootstrap-checkbox.js' );
wp_enqueue_script( $prefix . '-bootstrap-checkbox-js', $url . 'inc/lib/bootstrap-checkbox.js' );

// Call the function that contain a basis of scripts
smbtoolbar_load_scripts_base( $options );
Expand All @@ -93,19 +104,25 @@ function smbtoolbar_load_scripts_admin( $hook ) {
/**
* Load scripts and style sheet for front end of website
*
* @since 4.6
* @since 4.11
*/
function smbtoolbar_load_scripts_frontend() {

// Put value of constants to variables for easier access
$slug = SMEDIABT_SLUG;
$prefix = SMEDIABT_PREFIX;
$url = SMEDIABT_URL;
$settings = SMEDIABT_SETTINGS;

// Read options from BD
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
$options = get_option( $settings . '_settings' );

// Call the function that contain a basis of scripts
smbtoolbar_load_scripts_base( $options );

// Other libraries
wp_enqueue_style( SMEDIABT_PREFIX . '-bootstrap-tooltip-css', SMEDIABT_URL . 'inc/lib/bootstrap-tooltip/bootstrap-tooltip.css' );
wp_enqueue_script( SMEDIABT_PREFIX . '-bootstrap-tooltip-js', SMEDIABT_URL . 'inc/lib/bootstrap-tooltip/bootstrap-tooltip.js' );
wp_enqueue_style( $prefix . '-bootstrap-tooltip-css', $url . 'inc/lib/bootstrap-tooltip/bootstrap-tooltip.css' );
wp_enqueue_script( $prefix . '-bootstrap-tooltip-js', $url . 'inc/lib/bootstrap-tooltip/bootstrap-tooltip.js' );

}
add_action( 'wp_enqueue_scripts', SMEDIABT_PREFIX . '_load_scripts_frontend' );
Loading

0 comments on commit ad961b1

Please sign in to comment.