Version Description
- Added new constants: "SLUG", "_PREFIX", "_SETTINGS" and "NAME".
- Value of the "_VERSION" constant replaced with information from the plugin header data.
- All references to the plugin name, slug, prefix are replaced with constants.
- Added default values to empty options.
- The "_load_scripts_base" function improved.
- The "name" attribute removed from the "
Download this release
Release Info
Developer | Arthur Gareginyan |
Plugin | Social Media Follow Buttons Bar |
Version | 4.6 |
Comparing to | |
See all releases |
Code changes from version 4.5 to 4.6
- inc/php/core.php +17 -15
- inc/php/enqueue.php +31 -29
- inc/php/functional.php +19 -19
- inc/php/messages.php +4 -4
- inc/php/page.php +2 -2
- inc/php/settings.php +15 -16
- inc/php/uninstall.php +3 -3
- inc/php/version.php +5 -5
- languages/social-media-buttons-toolbar-es_ES.mo +0 -0
- languages/social-media-buttons-toolbar-es_ES.po +6 -7
- languages/social-media-buttons-toolbar-ru_RU.mo +0 -0
- languages/social-media-buttons-toolbar-ru_RU.po +6 -7
- languages/social-media-buttons-toolbar.pot +5 -6
- readme.txt +10 -2
- social-media-buttons-toolbar.php +7 -3
inc/php/core.php
CHANGED
@@ -10,12 +10,12 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Register text domain
|
12 |
*
|
13 |
-
* @since
|
14 |
*/
|
15 |
function smbtoolbar_textdomain() {
|
16 |
load_plugin_textdomain( SMEDIABT_TEXT, false, SMEDIABT_DIR . '/languages/' );
|
17 |
}
|
18 |
-
add_action( 'init', '
|
19 |
|
20 |
/**
|
21 |
* Print direct link to plugin admin page
|
@@ -23,25 +23,25 @@ add_action( 'init', 'smbtoolbar_textdomain' );
|
|
23 |
* Fetches array of links generated by WP Plugin admin page ( Deactivate | Edit )
|
24 |
* and inserts a link to the plugin admin page
|
25 |
*
|
26 |
-
* @since
|
27 |
* @param array $links Array of links generated by WP in Plugin Admin page.
|
28 |
* @return array Array of links to be output on Plugin Admin page.
|
29 |
*/
|
30 |
function smbtoolbar_settings_link( $links ) {
|
31 |
-
$page = '<a href="' . admin_url( 'options-general.php?page=
|
32 |
array_unshift( $links, $page );
|
33 |
return $links;
|
34 |
}
|
35 |
-
add_filter( 'plugin_action_links_'.SMEDIABT_BASE, '
|
36 |
|
37 |
/**
|
38 |
* Print additional links to plugin meta row
|
39 |
*
|
40 |
-
* @since 4.
|
41 |
*/
|
42 |
function smbtoolbar_plugin_row_meta( $links, $file ) {
|
43 |
|
44 |
-
if ( strpos( $file, '
|
45 |
|
46 |
$new_links = array(
|
47 |
'donate' => '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank"><span class="dashicons dashicons-heart"></span> ' . __( 'Donate', SMEDIABT_TEXT ) . '</a>'
|
@@ -51,25 +51,27 @@ function smbtoolbar_plugin_row_meta( $links, $file ) {
|
|
51 |
|
52 |
return $links;
|
53 |
}
|
54 |
-
add_filter( 'plugin_row_meta', '
|
55 |
|
56 |
/**
|
57 |
* Register plugin's submenu in the "Settings" Admin Menu
|
58 |
*
|
59 |
-
* @since 4.
|
60 |
*/
|
61 |
function smbtoolbar_register_submenu_page() {
|
62 |
-
|
|
|
|
|
63 |
}
|
64 |
-
add_action( 'admin_menu', '
|
65 |
|
66 |
/**
|
67 |
* Register settings
|
68 |
*
|
69 |
-
* @since 4.
|
70 |
*/
|
71 |
function smbtoolbar_register_settings() {
|
72 |
-
register_setting( '
|
73 |
-
register_setting( '
|
74 |
}
|
75 |
-
add_action( 'admin_init', '
|
10 |
/**
|
11 |
* Register text domain
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
function smbtoolbar_textdomain() {
|
16 |
load_plugin_textdomain( SMEDIABT_TEXT, false, SMEDIABT_DIR . '/languages/' );
|
17 |
}
|
18 |
+
add_action( 'init', SMEDIABT_PREFIX . '_textdomain' );
|
19 |
|
20 |
/**
|
21 |
* Print direct link to plugin admin page
|
23 |
* Fetches array of links generated by WP Plugin admin page ( Deactivate | Edit )
|
24 |
* and inserts a link to the plugin admin page
|
25 |
*
|
26 |
+
* @since 4.6
|
27 |
* @param array $links Array of links generated by WP in Plugin Admin page.
|
28 |
* @return array Array of links to be output on Plugin Admin page.
|
29 |
*/
|
30 |
function smbtoolbar_settings_link( $links ) {
|
31 |
+
$page = '<a href="' . admin_url( 'options-general.php?page=' . SMEDIABT_SLUG . '.php' ) .'">' . __( 'Settings', SMEDIABT_TEXT ) . '</a>';
|
32 |
array_unshift( $links, $page );
|
33 |
return $links;
|
34 |
}
|
35 |
+
add_filter( 'plugin_action_links_' . SMEDIABT_BASE, SMEDIABT_PREFIX . '_settings_link' );
|
36 |
|
37 |
/**
|
38 |
* Print additional links to plugin meta row
|
39 |
*
|
40 |
+
* @since 4.6
|
41 |
*/
|
42 |
function smbtoolbar_plugin_row_meta( $links, $file ) {
|
43 |
|
44 |
+
if ( strpos( $file, SMEDIABT_SLUG . '.php' ) !== false ) {
|
45 |
|
46 |
$new_links = array(
|
47 |
'donate' => '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank"><span class="dashicons dashicons-heart"></span> ' . __( 'Donate', SMEDIABT_TEXT ) . '</a>'
|
51 |
|
52 |
return $links;
|
53 |
}
|
54 |
+
add_filter( 'plugin_row_meta', SMEDIABT_PREFIX . '_plugin_row_meta', 10, 2 );
|
55 |
|
56 |
/**
|
57 |
* Register plugin's submenu in the "Settings" Admin Menu
|
58 |
*
|
59 |
+
* @since 4.6
|
60 |
*/
|
61 |
function smbtoolbar_register_submenu_page() {
|
62 |
+
$menu_title = __( 'Social Media Follow Buttons', SMEDIABT_TEXT );
|
63 |
+
$capability = 'manage_options';
|
64 |
+
add_options_page( SMEDIABT_NAME, $menu_title, $capability, SMEDIABT_SLUG, SMEDIABT_PREFIX . '_render_submenu_page' );
|
65 |
}
|
66 |
+
add_action( 'admin_menu', SMEDIABT_PREFIX . '_register_submenu_page' );
|
67 |
|
68 |
/**
|
69 |
* Register settings
|
70 |
*
|
71 |
+
* @since 4.6
|
72 |
*/
|
73 |
function smbtoolbar_register_settings() {
|
74 |
+
register_setting( SMEDIABT_SETTINGS . '_settings_group', SMEDIABT_SETTINGS . '_settings' );
|
75 |
+
register_setting( SMEDIABT_SETTINGS . '_settings_group', SMEDIABT_SETTINGS . '_service_info' );
|
76 |
}
|
77 |
+
add_action( 'admin_init', SMEDIABT_PREFIX . '_register_settings' );
|
inc/php/enqueue.php
CHANGED
@@ -8,20 +8,17 @@
|
|
8 |
defined( 'ABSPATH' ) or die( "Restricted access!" );
|
9 |
|
10 |
/**
|
11 |
-
* Base for the _load_scripts hook
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
-
function smbtoolbar_load_scripts_base() {
|
16 |
|
17 |
// Load JQuery library
|
18 |
wp_enqueue_script( 'jquery' );
|
19 |
|
20 |
// Style sheet
|
21 |
-
wp_enqueue_style( '
|
22 |
-
|
23 |
-
// Read options from BD, sanitiz data and declare variables
|
24 |
-
$options = get_option( 'smbtoolbar_settings' );
|
25 |
|
26 |
// Size of icons
|
27 |
$icon_size = esc_textarea( $options['icon-size'] );
|
@@ -42,7 +39,7 @@ function smbtoolbar_load_scripts_base() {
|
|
42 |
$alignment = 'center';
|
43 |
}
|
44 |
|
45 |
-
// Dynamic CSS
|
46 |
$custom_css = "
|
47 |
.smbt-social-icons {
|
48 |
text-align: " . $alignment . " !important;
|
@@ -53,57 +50,62 @@ function smbtoolbar_load_scripts_base() {
|
|
53 |
margin: " . ( $margin_right / 2 ) . "px !important;
|
54 |
}
|
55 |
";
|
56 |
-
|
57 |
-
// Inject dynamic CSS
|
58 |
-
wp_add_inline_style( 'smbtoolbar-frontend-css', $custom_css );
|
59 |
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
* Load scripts and style sheet for settings page
|
64 |
*
|
65 |
-
* @since 4.
|
66 |
*/
|
67 |
function smbtoolbar_load_scripts_admin( $hook ) {
|
68 |
|
69 |
// Return if the page is not a settings page of this plugin
|
70 |
-
|
|
|
71 |
return;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
74 |
// Style sheet
|
75 |
-
wp_enqueue_style( '
|
76 |
|
77 |
// JavaScript
|
78 |
-
wp_enqueue_script( '
|
79 |
|
80 |
// Bootstrap library
|
81 |
-
wp_enqueue_style( '
|
82 |
-
wp_enqueue_style( '
|
83 |
-
wp_enqueue_script( '
|
84 |
|
85 |
// Other libraries
|
86 |
-
wp_enqueue_script( '
|
87 |
|
88 |
-
// Call the function
|
89 |
-
smbtoolbar_load_scripts_base();
|
90 |
|
91 |
}
|
92 |
-
add_action( 'admin_enqueue_scripts', '
|
93 |
|
94 |
/**
|
95 |
-
* Load scripts and style sheet for front end
|
96 |
*
|
97 |
-
* @since 4.
|
98 |
*/
|
99 |
function smbtoolbar_load_scripts_frontend() {
|
100 |
|
101 |
-
//
|
102 |
-
|
|
|
|
|
|
|
103 |
|
104 |
// Other libraries
|
105 |
-
wp_enqueue_style( '
|
106 |
-
wp_enqueue_script( '
|
107 |
|
108 |
}
|
109 |
-
add_action( 'wp_enqueue_scripts', '
|
8 |
defined( 'ABSPATH' ) or die( "Restricted access!" );
|
9 |
|
10 |
/**
|
11 |
+
* Base for the _load_scripts hook
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
+
function smbtoolbar_load_scripts_base( $options ) {
|
16 |
|
17 |
// Load JQuery library
|
18 |
wp_enqueue_script( 'jquery' );
|
19 |
|
20 |
// Style sheet
|
21 |
+
wp_enqueue_style( SMEDIABT_PREFIX . '-frontend-css', SMEDIABT_URL . 'inc/css/frontend.css' );
|
|
|
|
|
|
|
22 |
|
23 |
// Size of icons
|
24 |
$icon_size = esc_textarea( $options['icon-size'] );
|
39 |
$alignment = 'center';
|
40 |
}
|
41 |
|
42 |
+
// Dynamic CSS. Create CSS and injected it into the stylesheet
|
43 |
$custom_css = "
|
44 |
.smbt-social-icons {
|
45 |
text-align: " . $alignment . " !important;
|
50 |
margin: " . ( $margin_right / 2 ) . "px !important;
|
51 |
}
|
52 |
";
|
53 |
+
wp_add_inline_style( SMEDIABT_PREFIX . '-frontend-css', $custom_css );
|
|
|
|
|
54 |
|
55 |
}
|
56 |
|
57 |
/**
|
58 |
* Load scripts and style sheet for settings page
|
59 |
*
|
60 |
+
* @since 4.6
|
61 |
*/
|
62 |
function smbtoolbar_load_scripts_admin( $hook ) {
|
63 |
|
64 |
// Return if the page is not a settings page of this plugin
|
65 |
+
$settings_page = 'settings_page_' . SMEDIABT_SLUG;
|
66 |
+
if ( $settings_page != $hook ) {
|
67 |
return;
|
68 |
}
|
69 |
|
70 |
+
// Read options from BD
|
71 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
72 |
+
|
73 |
// Style sheet
|
74 |
+
wp_enqueue_style( SMEDIABT_PREFIX . '-admin-css', SMEDIABT_URL . 'inc/css/admin.css' );
|
75 |
|
76 |
// JavaScript
|
77 |
+
wp_enqueue_script( SMEDIABT_PREFIX . '-admin-js', SMEDIABT_URL . 'inc/js/admin.js', array(), false, true );
|
78 |
|
79 |
// Bootstrap library
|
80 |
+
wp_enqueue_style( SMEDIABT_PREFIX . '-bootstrap-css', SMEDIABT_URL . 'inc/lib/bootstrap/bootstrap.css' );
|
81 |
+
wp_enqueue_style( SMEDIABT_PREFIX . '-bootstrap-theme-css', SMEDIABT_URL . 'inc/lib/bootstrap/bootstrap-theme.css' );
|
82 |
+
wp_enqueue_script( SMEDIABT_PREFIX . '-bootstrap-js', SMEDIABT_URL . 'inc/lib/bootstrap/bootstrap.js' );
|
83 |
|
84 |
// Other libraries
|
85 |
+
wp_enqueue_script( SMEDIABT_PREFIX . '-bootstrap-checkbox-js', SMEDIABT_URL . 'inc/lib/bootstrap-checkbox.js' );
|
86 |
|
87 |
+
// Call the function that contain a basis of scripts
|
88 |
+
smbtoolbar_load_scripts_base( $options );
|
89 |
|
90 |
}
|
91 |
+
add_action( 'admin_enqueue_scripts', SMEDIABT_PREFIX . '_load_scripts_admin' );
|
92 |
|
93 |
/**
|
94 |
+
* Load scripts and style sheet for front end of website
|
95 |
*
|
96 |
+
* @since 4.6
|
97 |
*/
|
98 |
function smbtoolbar_load_scripts_frontend() {
|
99 |
|
100 |
+
// Read options from BD
|
101 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
102 |
+
|
103 |
+
// Call the function that contain a basis of scripts
|
104 |
+
smbtoolbar_load_scripts_base( $options );
|
105 |
|
106 |
// Other libraries
|
107 |
+
wp_enqueue_style( SMEDIABT_PREFIX . '-bootstrap-tooltip-css', SMEDIABT_URL . 'inc/lib/bootstrap-tooltip/bootstrap-tooltip.css' );
|
108 |
+
wp_enqueue_script( SMEDIABT_PREFIX . '-bootstrap-tooltip-js', SMEDIABT_URL . 'inc/lib/bootstrap-tooltip/bootstrap-tooltip.js' );
|
109 |
|
110 |
}
|
111 |
+
add_action( 'wp_enqueue_scripts', SMEDIABT_PREFIX . '_load_scripts_frontend' );
|
inc/php/functional.php
CHANGED
@@ -10,12 +10,12 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Render fields for saving social media data to BD
|
12 |
*
|
13 |
-
* @since
|
14 |
*/
|
15 |
function smbtoolbar_media( $name, $label, $placeholder, $help=null, $link=null ) {
|
16 |
|
17 |
-
//
|
18 |
-
$options = get_option( '
|
19 |
|
20 |
if ( !empty( $options["media"][$name]["content"] ) ) {
|
21 |
$value = esc_textarea( $options["media"][$name]["content"] );
|
@@ -30,9 +30,9 @@ function smbtoolbar_media( $name, $label, $placeholder, $help=null, $link=null )
|
|
30 |
$link_out = "$label";
|
31 |
}
|
32 |
|
33 |
-
$label = "<input type='hidden' name='
|
34 |
-
$slug = "<input type='hidden' name='
|
35 |
-
$field_out = "<input type='text' name='
|
36 |
|
37 |
// Put table to the variables $out and $help_out
|
38 |
$out = "<tr>
|
@@ -63,12 +63,12 @@ function smbtoolbar_media( $name, $label, $placeholder, $help=null, $link=null )
|
|
63 |
/**
|
64 |
* Render checkboxes and fields for saving settings data to BD
|
65 |
*
|
66 |
-
* @since 4.
|
67 |
*/
|
68 |
function smbtoolbar_setting( $name, $label, $help=null, $field=null, $placeholder=null, $size=null ) {
|
69 |
|
70 |
-
//
|
71 |
-
$options = get_option( '
|
72 |
|
73 |
if ( !empty( $options[$name] ) ) {
|
74 |
$value = esc_textarea( $options[$name] );
|
@@ -84,9 +84,9 @@ function smbtoolbar_setting( $name, $label, $help=null, $field=null, $placeholde
|
|
84 |
}
|
85 |
|
86 |
if ( $field == "check" ) {
|
87 |
-
$input = "<input type='checkbox' name='
|
88 |
} elseif ( $field == "field" ) {
|
89 |
-
$input = "<input type='text' name='
|
90 |
}
|
91 |
|
92 |
// Put table to the variables $out and $help_out
|
@@ -116,12 +116,12 @@ function smbtoolbar_setting( $name, $label, $help=null, $field=null, $placeholde
|
|
116 |
/**
|
117 |
* Generate the buttons and make shortcode
|
118 |
*
|
119 |
-
* @since 4.
|
120 |
*/
|
121 |
function smbtoolbar_tollbar() {
|
122 |
|
123 |
-
// Read options from BD
|
124 |
-
$options = get_option( '
|
125 |
$media = $options['media'];
|
126 |
|
127 |
// Open link in new tab
|
@@ -205,12 +205,12 @@ function smbtoolbar_tollbar() {
|
|
205 |
/**
|
206 |
* Create the shortcode "[smbtoolbar]"
|
207 |
*
|
208 |
-
* @since
|
209 |
*/
|
210 |
function smbtoolbar_shortcode() {
|
211 |
return implode(PHP_EOL, smbtoolbar_tollbar());
|
212 |
}
|
213 |
-
add_shortcode( 'smbtoolbar', '
|
214 |
|
215 |
/**
|
216 |
* Allow shortcodes in the text widget
|
@@ -222,10 +222,10 @@ add_filter( 'widget_text', 'do_shortcode' );
|
|
222 |
/**
|
223 |
* Add buttons to the beginning of each post or/and page.
|
224 |
*
|
225 |
-
* @since
|
226 |
*/
|
227 |
function smbtoolbar_addContent( $content ) {
|
228 |
-
$options = get_option( '
|
229 |
|
230 |
if ( is_single() ) {
|
231 |
if ( !empty( $options['show_posts'] ) && $options['show_posts'] == "on" ) {
|
@@ -242,4 +242,4 @@ function smbtoolbar_addContent( $content ) {
|
|
242 |
// Returns the content.
|
243 |
return $content;
|
244 |
}
|
245 |
-
add_action( 'the_content', '
|
10 |
/**
|
11 |
* Render fields for saving social media data to BD
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
function smbtoolbar_media( $name, $label, $placeholder, $help=null, $link=null ) {
|
16 |
|
17 |
+
// Read options from BD
|
18 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
19 |
|
20 |
if ( !empty( $options["media"][$name]["content"] ) ) {
|
21 |
$value = esc_textarea( $options["media"][$name]["content"] );
|
30 |
$link_out = "$label";
|
31 |
}
|
32 |
|
33 |
+
$label = "<input type='hidden' name='" . SMEDIABT_SETTINGS . "_settings[media][$name][label]' value='$label'>";
|
34 |
+
$slug = "<input type='hidden' name='" . SMEDIABT_SETTINGS . "_settings[media][$name][slug]' value='$name'>";
|
35 |
+
$field_out = "<input type='text' name='" . SMEDIABT_SETTINGS . "_settings[media][$name][content]' size='50' value='$value' placeholder='$placeholder'>";
|
36 |
|
37 |
// Put table to the variables $out and $help_out
|
38 |
$out = "<tr>
|
63 |
/**
|
64 |
* Render checkboxes and fields for saving settings data to BD
|
65 |
*
|
66 |
+
* @since 4.6
|
67 |
*/
|
68 |
function smbtoolbar_setting( $name, $label, $help=null, $field=null, $placeholder=null, $size=null ) {
|
69 |
|
70 |
+
// Read options from BD
|
71 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
72 |
|
73 |
if ( !empty( $options[$name] ) ) {
|
74 |
$value = esc_textarea( $options[$name] );
|
84 |
}
|
85 |
|
86 |
if ( $field == "check" ) {
|
87 |
+
$input = "<input type='checkbox' name='" . SMEDIABT_SETTINGS . "_settings[$name]' id='" . SMEDIABT_SETTINGS . "_settings[$name]' $checked >";
|
88 |
} elseif ( $field == "field" ) {
|
89 |
+
$input = "<input type='text' name='" . SMEDIABT_SETTINGS . "_settings[$name]' id='" . SMEDIABT_SETTINGS . "_settings[$name]' size='$size' value='$value' placeholder='$placeholder' >";
|
90 |
}
|
91 |
|
92 |
// Put table to the variables $out and $help_out
|
116 |
/**
|
117 |
* Generate the buttons and make shortcode
|
118 |
*
|
119 |
+
* @since 4.6
|
120 |
*/
|
121 |
function smbtoolbar_tollbar() {
|
122 |
|
123 |
+
// Read options from BD
|
124 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
125 |
$media = $options['media'];
|
126 |
|
127 |
// Open link in new tab
|
205 |
/**
|
206 |
* Create the shortcode "[smbtoolbar]"
|
207 |
*
|
208 |
+
* @since 4.6
|
209 |
*/
|
210 |
function smbtoolbar_shortcode() {
|
211 |
return implode(PHP_EOL, smbtoolbar_tollbar());
|
212 |
}
|
213 |
+
add_shortcode( 'smbtoolbar', SMEDIABT_PREFIX . '_shortcode' );
|
214 |
|
215 |
/**
|
216 |
* Allow shortcodes in the text widget
|
222 |
/**
|
223 |
* Add buttons to the beginning of each post or/and page.
|
224 |
*
|
225 |
+
* @since 4.6
|
226 |
*/
|
227 |
function smbtoolbar_addContent( $content ) {
|
228 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
229 |
|
230 |
if ( is_single() ) {
|
231 |
if ( !empty( $options['show_posts'] ) && $options['show_posts'] == "on" ) {
|
242 |
// Returns the content.
|
243 |
return $content;
|
244 |
}
|
245 |
+
add_action( 'the_content', SMEDIABT_PREFIX . '_addContent' );
|
inc/php/messages.php
CHANGED
@@ -10,11 +10,11 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Hello message - Bootstrap Modal
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
function smbtoolbar_hello_message() {
|
16 |
|
17 |
-
$options = get_option( '
|
18 |
|
19 |
if ( !empty( $options ) ) {
|
20 |
return;
|
@@ -48,11 +48,11 @@ function smbtoolbar_hello_message() {
|
|
48 |
/**
|
49 |
* Error message (When the old version of plugin installed) - Bootstrap Modal
|
50 |
*
|
51 |
-
* @since 4.
|
52 |
*/
|
53 |
function smbtoolbar_error_message() {
|
54 |
|
55 |
-
$info = get_option( '
|
56 |
$old_version = isset( $info['old_version'] ) && !empty( $info['old_version'] ) ? $info['old_version'] : '0';
|
57 |
|
58 |
if ( $old_version != '1' ) {
|
10 |
/**
|
11 |
* Hello message - Bootstrap Modal
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
function smbtoolbar_hello_message() {
|
16 |
|
17 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
18 |
|
19 |
if ( !empty( $options ) ) {
|
20 |
return;
|
48 |
/**
|
49 |
* Error message (When the old version of plugin installed) - Bootstrap Modal
|
50 |
*
|
51 |
+
* @since 4.6
|
52 |
*/
|
53 |
function smbtoolbar_error_message() {
|
54 |
|
55 |
+
$info = get_option( SMEDIABT_SETTINGS . '_service_info' );
|
56 |
$old_version = isset( $info['old_version'] ) && !empty( $info['old_version'] ) ? $info['old_version'] : '0';
|
57 |
|
58 |
if ( $old_version != '1' ) {
|
inc/php/page.php
CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Render Settings Page
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
function smbtoolbar_render_submenu_page() {
|
16 |
|
@@ -22,7 +22,7 @@ function smbtoolbar_render_submenu_page() {
|
|
22 |
?>
|
23 |
<div class="wrap">
|
24 |
<h2>
|
25 |
-
<?php
|
26 |
<span>
|
27 |
<?php printf(
|
28 |
__( 'by %s Arthur Gareginyan %s', SMEDIABT_TEXT ),
|
10 |
/**
|
11 |
* Render Settings Page
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
function smbtoolbar_render_submenu_page() {
|
16 |
|
22 |
?>
|
23 |
<div class="wrap">
|
24 |
<h2>
|
25 |
+
<?php echo SMEDIABT_NAME; ?>
|
26 |
<span>
|
27 |
<?php printf(
|
28 |
__( 'by %s Arthur Gareginyan %s', SMEDIABT_TEXT ),
|
inc/php/settings.php
CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Render Settings Tab
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
?>
|
16 |
<!-- SIDEBAR -->
|
@@ -37,7 +37,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
37 |
<h3 class="title"><?php _e( 'Help', SMEDIABT_TEXT ); ?></h3>
|
38 |
<div class="inside">
|
39 |
<p><?php _e( 'Got something to say? Need help?', SMEDIABT_TEXT ); ?></p>
|
40 |
-
<p><a href="mailto:arthurgareginyan@gmail.com?subject
|
41 |
</div>
|
42 |
</div>
|
43 |
|
@@ -50,8 +50,16 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
50 |
<div id="post-body-content" class="has-sidebar-content">
|
51 |
<div class="meta-box-sortabless">
|
52 |
|
53 |
-
<form
|
54 |
-
<?php settings_fields( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
<div class="postbox" id="Buttons">
|
57 |
<h3 class="title"><?php _e( 'Buttons', SMEDIABT_TEXT ); ?></h3>
|
@@ -428,17 +436,6 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
428 |
);
|
429 |
?>
|
430 |
|
431 |
-
<?php
|
432 |
-
|
433 |
-
// Get options from the BD
|
434 |
-
$options = get_option( 'smbtoolbar_settings' );
|
435 |
-
|
436 |
-
if ( !empty( $options['alignment'] ) ) :
|
437 |
-
$alignment = $options['alignment'];
|
438 |
-
else :
|
439 |
-
$alignment = '';
|
440 |
-
endif;
|
441 |
-
?>
|
442 |
<tr>
|
443 |
<th scope='row'>
|
444 |
<?php _e( 'Alignment', SMEDIABT_TEXT ); ?>
|
@@ -470,7 +467,9 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
470 |
); ?>
|
471 |
|
472 |
</table>
|
|
|
473 |
<?php submit_button( __( 'Save Changes', SMEDIABT_TEXT ), 'primary', 'submit', true ); ?>
|
|
|
474 |
</div>
|
475 |
</div>
|
476 |
|
@@ -482,7 +481,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
482 |
</div>
|
483 |
</div>
|
484 |
|
485 |
-
<div id="support-addition"
|
486 |
<h3 class="title"><?php _e( 'Support', SMEDIABT_TEXT ); ?></h3>
|
487 |
<div class="inside">
|
488 |
<p><?php _e( 'I\'m an independent developer, without a regular income, so every little contribution helps cover my costs and lets me spend more time building things for people like you to enjoy.', SMEDIABT_TEXT ); ?></p>
|
10 |
/**
|
11 |
* Render Settings Tab
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
?>
|
16 |
<!-- SIDEBAR -->
|
37 |
<h3 class="title"><?php _e( 'Help', SMEDIABT_TEXT ); ?></h3>
|
38 |
<div class="inside">
|
39 |
<p><?php _e( 'Got something to say? Need help?', SMEDIABT_TEXT ); ?></p>
|
40 |
+
<p><a href="mailto:arthurgareginyan@gmail.com?subject=<?php echo SMEDIABT_NAME; ?>">arthurgareginyan@gmail.com</a></p>
|
41 |
</div>
|
42 |
</div>
|
43 |
|
50 |
<div id="post-body-content" class="has-sidebar-content">
|
51 |
<div class="meta-box-sortabless">
|
52 |
|
53 |
+
<form action="options.php" method="post" enctype="multipart/form-data">
|
54 |
+
<?php settings_fields( SMEDIABT_SETTINGS . '_settings_group' ); ?>
|
55 |
+
|
56 |
+
<?php
|
57 |
+
// Get options from the BD
|
58 |
+
$options = get_option( SMEDIABT_SETTINGS . '_settings' );
|
59 |
+
|
60 |
+
// Set default value if the option is empty
|
61 |
+
$alignment = isset( $options['alignment'] ) && !empty( $options['alignment'] ) ? $options['alignment'] : '';
|
62 |
+
?>
|
63 |
|
64 |
<div class="postbox" id="Buttons">
|
65 |
<h3 class="title"><?php _e( 'Buttons', SMEDIABT_TEXT ); ?></h3>
|
436 |
);
|
437 |
?>
|
438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
<tr>
|
440 |
<th scope='row'>
|
441 |
<?php _e( 'Alignment', SMEDIABT_TEXT ); ?>
|
467 |
); ?>
|
468 |
|
469 |
</table>
|
470 |
+
|
471 |
<?php submit_button( __( 'Save Changes', SMEDIABT_TEXT ), 'primary', 'submit', true ); ?>
|
472 |
+
|
473 |
</div>
|
474 |
</div>
|
475 |
|
481 |
</div>
|
482 |
</div>
|
483 |
|
484 |
+
<div class="postbox" id="support-addition">
|
485 |
<h3 class="title"><?php _e( 'Support', SMEDIABT_TEXT ); ?></h3>
|
486 |
<div class="inside">
|
487 |
<p><?php _e( 'I\'m an independent developer, without a regular income, so every little contribution helps cover my costs and lets me spend more time building things for people like you to enjoy.', SMEDIABT_TEXT ); ?></p>
|
inc/php/uninstall.php
CHANGED
@@ -10,9 +10,9 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Delete options on uninstall
|
12 |
*
|
13 |
-
* @since
|
14 |
*/
|
15 |
function smbtoolbar_uninstall() {
|
16 |
-
delete_option( '
|
17 |
}
|
18 |
-
register_uninstall_hook( __FILE__, '
|
10 |
/**
|
11 |
* Delete options on uninstall
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
function smbtoolbar_uninstall() {
|
16 |
+
delete_option( SMEDIABT_SETTINGS . '_settings' );
|
17 |
}
|
18 |
+
register_uninstall_hook( __FILE__, SMEDIABT_PREFIX . '_uninstall' );
|
inc/php/version.php
CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Function for managing information about the version number of the plugin
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
function smbtoolbar_plugin_version_number() {
|
16 |
|
@@ -19,7 +19,7 @@ function smbtoolbar_plugin_version_number() {
|
|
19 |
// - Make the "$info" array if the plugin service information in the database is not exist
|
20 |
// - Get the current plugin version number from the database
|
21 |
// - Get the new plugin version number from the global constant
|
22 |
-
$info = get_option( '
|
23 |
if ( !is_array( $info ) ) {
|
24 |
$info = array();
|
25 |
}
|
@@ -39,7 +39,7 @@ function smbtoolbar_plugin_version_number() {
|
|
39 |
if ( $info['old_version'] == '1' ) {
|
40 |
|
41 |
$info['old_version'] = '0';
|
42 |
-
update_option( '
|
43 |
|
44 |
}
|
45 |
|
@@ -54,7 +54,7 @@ function smbtoolbar_plugin_version_number() {
|
|
54 |
|
55 |
$info['version'] = $new_number;
|
56 |
$info['old_version'] = '0';
|
57 |
-
update_option( '
|
58 |
|
59 |
return;
|
60 |
}
|
@@ -65,7 +65,7 @@ function smbtoolbar_plugin_version_number() {
|
|
65 |
if ( $new_number < $current_number ) {
|
66 |
|
67 |
$info['old_version'] = '1';
|
68 |
-
update_option( '
|
69 |
|
70 |
return;
|
71 |
}
|
10 |
/**
|
11 |
* Function for managing information about the version number of the plugin
|
12 |
*
|
13 |
+
* @since 4.6
|
14 |
*/
|
15 |
function smbtoolbar_plugin_version_number() {
|
16 |
|
19 |
// - Make the "$info" array if the plugin service information in the database is not exist
|
20 |
// - Get the current plugin version number from the database
|
21 |
// - Get the new plugin version number from the global constant
|
22 |
+
$info = get_option( SMEDIABT_SETTINGS . '_service_info' );
|
23 |
if ( !is_array( $info ) ) {
|
24 |
$info = array();
|
25 |
}
|
39 |
if ( $info['old_version'] == '1' ) {
|
40 |
|
41 |
$info['old_version'] = '0';
|
42 |
+
update_option( SMEDIABT_SETTINGS . '_service_info', $info );
|
43 |
|
44 |
}
|
45 |
|
54 |
|
55 |
$info['version'] = $new_number;
|
56 |
$info['old_version'] = '0';
|
57 |
+
update_option( SMEDIABT_SETTINGS . '_service_info', $info );
|
58 |
|
59 |
return;
|
60 |
}
|
65 |
if ( $new_number < $current_number ) {
|
66 |
|
67 |
$info['old_version'] = '1';
|
68 |
+
update_option( SMEDIABT_SETTINGS . '_service_info', $info );
|
69 |
|
70 |
return;
|
71 |
}
|
languages/social-media-buttons-toolbar-es_ES.mo
CHANGED
Binary file
|
languages/social-media-buttons-toolbar-es_ES.po
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Development (trunk)\n"
|
6 |
-
"POT-Creation-Date: 2017-05-
|
7 |
-
"PO-Revision-Date: 2017-05-
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
10 |
"Language: es\n"
|
@@ -30,11 +30,6 @@ msgstr "Configuraciones"
|
|
30 |
msgid "Donate"
|
31 |
msgstr "Hacer una donación"
|
32 |
|
33 |
-
#. Plugin Name of the plugin/theme
|
34 |
-
#: inc/php/core.php:62 inc/php/page.php:25
|
35 |
-
msgid "Social Media Follow Buttons Bar"
|
36 |
-
msgstr "Social Media Follow Buttons Bar"
|
37 |
-
|
38 |
#: inc/php/core.php:62
|
39 |
msgid "Social Media Follow Buttons"
|
40 |
msgstr "Social Media Follow Buttons"
|
@@ -630,6 +625,10 @@ msgstr "Vista previa"
|
|
630 |
msgid "Click the \"Save Changes\" button to update this preview."
|
631 |
msgstr ""
|
632 |
|
|
|
|
|
|
|
|
|
633 |
#. Plugin URI of the plugin/theme
|
634 |
msgid "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
635 |
msgstr "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Development (trunk)\n"
|
6 |
+
"POT-Creation-Date: 2017-05-23 08:36+0300\n"
|
7 |
+
"PO-Revision-Date: 2017-05-23 08:36+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
10 |
"Language: es\n"
|
30 |
msgid "Donate"
|
31 |
msgstr "Hacer una donación"
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
#: inc/php/core.php:62
|
34 |
msgid "Social Media Follow Buttons"
|
35 |
msgstr "Social Media Follow Buttons"
|
625 |
msgid "Click the \"Save Changes\" button to update this preview."
|
626 |
msgstr ""
|
627 |
|
628 |
+
#. Plugin Name of the plugin/theme
|
629 |
+
msgid "Social Media Follow Buttons Bar"
|
630 |
+
msgstr "Social Media Follow Buttons Bar"
|
631 |
+
|
632 |
#. Plugin URI of the plugin/theme
|
633 |
msgid "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
634 |
msgstr "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
languages/social-media-buttons-toolbar-ru_RU.mo
CHANGED
Binary file
|
languages/social-media-buttons-toolbar-ru_RU.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Social Media Buttons Toolbar\n"
|
4 |
-
"POT-Creation-Date: 2017-05-
|
5 |
-
"PO-Revision-Date: 2017-05-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru\n"
|
@@ -29,11 +29,6 @@ msgstr "Настройки"
|
|
29 |
msgid "Donate"
|
30 |
msgstr "Поддержать разработку"
|
31 |
|
32 |
-
#. Plugin Name of the plugin/theme
|
33 |
-
#: inc/php/core.php:62 inc/php/page.php:25
|
34 |
-
msgid "Social Media Follow Buttons Bar"
|
35 |
-
msgstr "Social Media Follow Buttons Bar"
|
36 |
-
|
37 |
#: inc/php/core.php:62
|
38 |
msgid "Social Media Follow Buttons"
|
39 |
msgstr "Social Media Follow Buttons"
|
@@ -645,6 +640,10 @@ msgid "Click the \"Save Changes\" button to update this preview."
|
|
645 |
msgstr ""
|
646 |
"Нажмите кнопку «Сохранить изменения», чтобы обновить этот пред. просмотр."
|
647 |
|
|
|
|
|
|
|
|
|
648 |
#. Plugin URI of the plugin/theme
|
649 |
msgid "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
650 |
msgstr "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Social Media Buttons Toolbar\n"
|
4 |
+
"POT-Creation-Date: 2017-05-23 08:36+0300\n"
|
5 |
+
"PO-Revision-Date: 2017-05-23 08:36+0300\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: ru\n"
|
29 |
msgid "Donate"
|
30 |
msgstr "Поддержать разработку"
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
#: inc/php/core.php:62
|
33 |
msgid "Social Media Follow Buttons"
|
34 |
msgstr "Social Media Follow Buttons"
|
640 |
msgstr ""
|
641 |
"Нажмите кнопку «Сохранить изменения», чтобы обновить этот пред. просмотр."
|
642 |
|
643 |
+
#. Plugin Name of the plugin/theme
|
644 |
+
msgid "Social Media Follow Buttons Bar"
|
645 |
+
msgstr "Social Media Follow Buttons Bar"
|
646 |
+
|
647 |
#. Plugin URI of the plugin/theme
|
648 |
msgid "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
649 |
msgstr "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
languages/social-media-buttons-toolbar.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: Social Media Buttons Toolbar\n"
|
6 |
-
"POT-Creation-Date: 2017-05-
|
7 |
"PO-Revision-Date: 2015-12-17 02:16+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
@@ -27,11 +27,6 @@ msgstr ""
|
|
27 |
msgid "Donate"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#. Plugin Name of the plugin/theme
|
31 |
-
#: inc/php/core.php:62 inc/php/page.php:25
|
32 |
-
msgid "Social Media Follow Buttons Bar"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
#: inc/php/core.php:62
|
36 |
msgid "Social Media Follow Buttons"
|
37 |
msgstr ""
|
@@ -588,6 +583,10 @@ msgstr ""
|
|
588 |
msgid "Click the \"Save Changes\" button to update this preview."
|
589 |
msgstr ""
|
590 |
|
|
|
|
|
|
|
|
|
591 |
#. Plugin URI of the plugin/theme
|
592 |
msgid "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
593 |
msgstr ""
|
3 |
msgstr ""
|
4 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
"Project-Id-Version: Social Media Buttons Toolbar\n"
|
6 |
+
"POT-Creation-Date: 2017-05-23 08:36+0300\n"
|
7 |
"PO-Revision-Date: 2015-12-17 02:16+0300\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
27 |
msgid "Donate"
|
28 |
msgstr ""
|
29 |
|
|
|
|
|
|
|
|
|
|
|
30 |
#: inc/php/core.php:62
|
31 |
msgid "Social Media Follow Buttons"
|
32 |
msgstr ""
|
583 |
msgid "Click the \"Save Changes\" button to update this preview."
|
584 |
msgstr ""
|
585 |
|
586 |
+
#. Plugin Name of the plugin/theme
|
587 |
+
msgid "Social Media Follow Buttons Bar"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
#. Plugin URI of the plugin/theme
|
591 |
msgid "https://github.com/ArthurGareginyan/social-media-buttons-toolbar"
|
592 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: icon, icon set, button, social, media, social button, social media, social
|
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 4.
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -192,7 +192,7 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
|
|
192 |
* The icon of plugin is a copyrighted image created by [Arthur Gareginyan](http://www.arthurgareginyan.com). (C) All rights reserved.
|
193 |
* The banner of plugin is a copyrighted image created by [Arthur Gareginyan](http://www.arthurgareginyan.com). (C) All rights reserved.
|
194 |
* The Entrepreneur image that used on banner is from [Pixabay](https://pixabay.com/en/entrepreneur-start-start-up-career-696976/) and licensed under the [Creative Commons CC0](https://creativecommons.org/publicdomain/zero/1.0/deed.en).
|
195 |
-
* Icons [youtube.png, meetvibe.png, beam.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/).
|
196 |
* 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/).
|
197 |
* [Bootstrap](http://getbootstrap.com) by Twitter, Inc. released under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE).
|
198 |
* [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).
|
@@ -205,6 +205,14 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
|
|
205 |
|
206 |
== Changelog ==
|
207 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
= 4.5 =
|
209 |
* Added option for the Buzzsprout social network.
|
210 |
* Added option for the Periscope social network.
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 4.6
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
192 |
* The icon of plugin is a copyrighted image created by [Arthur Gareginyan](http://www.arthurgareginyan.com). (C) All rights reserved.
|
193 |
* The banner of plugin is a copyrighted image created by [Arthur Gareginyan](http://www.arthurgareginyan.com). (C) All rights reserved.
|
194 |
* The Entrepreneur image that used on banner is from [Pixabay](https://pixabay.com/en/entrepreneur-start-start-up-career-696976/) and licensed under the [Creative Commons CC0](https://creativecommons.org/publicdomain/zero/1.0/deed.en).
|
195 |
+
* Icons [buzzsprout.png, periscope.png, youtube.png, meetvibe.png, beam.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/).
|
196 |
* 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/).
|
197 |
* [Bootstrap](http://getbootstrap.com) by Twitter, Inc. released under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE).
|
198 |
* [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).
|
205 |
|
206 |
== Changelog ==
|
207 |
|
208 |
+
= 4.6 =
|
209 |
+
* Added new constants: "_SLUG", "_PREFIX", "_SETTINGS" and "_NAME".
|
210 |
+
* Value of the "_VERSION" constant replaced with information from the plugin header data.
|
211 |
+
* All references to the plugin name, slug, prefix are replaced with constants.
|
212 |
+
* Added default values to empty options.
|
213 |
+
* The "_load_scripts_base" function improved.
|
214 |
+
* The "name" attribute removed from the "<form>" tag.
|
215 |
+
|
216 |
= 4.5 =
|
217 |
* Added option for the Buzzsprout social network.
|
218 |
* Added option for the Periscope social network.
|
social-media-buttons-toolbar.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Easily add the smart bar with social media follow buttons (not share, only link to your profiles) to any place of your WordPress website.
|
6 |
* Author: Arthur Gareginyan
|
7 |
* Author URI: http://www.arthurgareginyan.com
|
8 |
-
* Version: 4.
|
9 |
* License: GPL3
|
10 |
* Text Domain: social-media-buttons-toolbar
|
11 |
* Domain Path: /languages/
|
@@ -55,14 +55,18 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
55 |
/**
|
56 |
* Define global constants
|
57 |
*
|
58 |
-
* @since 4.
|
59 |
*/
|
60 |
defined( 'SMEDIABT_DIR' ) or define( 'SMEDIABT_DIR', dirname( plugin_basename( __FILE__ ) ) );
|
61 |
defined( 'SMEDIABT_BASE' ) or define( 'SMEDIABT_BASE', plugin_basename( __FILE__ ) );
|
62 |
defined( 'SMEDIABT_URL' ) or define( 'SMEDIABT_URL', plugin_dir_url( __FILE__ ) );
|
63 |
defined( 'SMEDIABT_PATH' ) or define( 'SMEDIABT_PATH', plugin_dir_path( __FILE__ ) );
|
64 |
defined( 'SMEDIABT_TEXT' ) or define( 'SMEDIABT_TEXT', 'social-media-buttons-toolbar' );
|
65 |
-
defined( '
|
|
|
|
|
|
|
|
|
66 |
|
67 |
/**
|
68 |
* Load the plugin modules
|
5 |
* Description: Easily add the smart bar with social media follow buttons (not share, only link to your profiles) to any place of your WordPress website.
|
6 |
* Author: Arthur Gareginyan
|
7 |
* Author URI: http://www.arthurgareginyan.com
|
8 |
+
* Version: 4.6
|
9 |
* License: GPL3
|
10 |
* Text Domain: social-media-buttons-toolbar
|
11 |
* Domain Path: /languages/
|
55 |
/**
|
56 |
* Define global constants
|
57 |
*
|
58 |
+
* @since 4.6
|
59 |
*/
|
60 |
defined( 'SMEDIABT_DIR' ) or define( 'SMEDIABT_DIR', dirname( plugin_basename( __FILE__ ) ) );
|
61 |
defined( 'SMEDIABT_BASE' ) or define( 'SMEDIABT_BASE', plugin_basename( __FILE__ ) );
|
62 |
defined( 'SMEDIABT_URL' ) or define( 'SMEDIABT_URL', plugin_dir_url( __FILE__ ) );
|
63 |
defined( 'SMEDIABT_PATH' ) or define( 'SMEDIABT_PATH', plugin_dir_path( __FILE__ ) );
|
64 |
defined( 'SMEDIABT_TEXT' ) or define( 'SMEDIABT_TEXT', 'social-media-buttons-toolbar' );
|
65 |
+
defined( 'SMEDIABT_SLUG' ) or define( 'SMEDIABT_SLUG', 'social-media-buttons-toolbar' );
|
66 |
+
defined( 'SMEDIABT_PREFIX' ) or define( 'SMEDIABT_PREFIX', 'smbtoolbar' );
|
67 |
+
defined( 'SMEDIABT_SETTINGS' ) or define( 'SMEDIABT_SETTINGS', 'smbtoolbar' );
|
68 |
+
defined( 'SMEDIABT_NAME' ) or define( 'SMEDIABT_NAME', 'Social Media Follow Buttons Bar' );
|
69 |
+
defined( 'SMEDIABT_VERSION' ) or define( 'SMEDIABT_VERSION', get_file_data( __FILE__, array( 'Version' ) ) );
|
70 |
|
71 |
/**
|
72 |
* Load the plugin modules
|