Simple Author Box - Version 2.0.1

Version Description

Removed simple author box from pages. Added new tab in setting page

Download this release

Release Info

Developer machothemes
Plugin Icon 128x128 Simple Author Box
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

assets/css/sabox-admin-style.css CHANGED
@@ -262,3 +262,71 @@
262
  text-align: center;
263
  margin: 60px 0 0;
264
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  text-align: center;
263
  margin: 60px 0 0;
264
  }
265
+
266
+ .sab-recomended-plugins {
267
+ border: 1px solid #e5e5e5;
268
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
269
+ margin-top: 1em;
270
+ }
271
+ .sab-recomended-plugins .sab-recomended-plugin {
272
+ background-color: #fff;
273
+ display: flex;
274
+ align-items: center;
275
+ padding: 2em 1em;
276
+ }
277
+ .sab-recomended-plugins .sab-recomended-plugin:nth-child( even ) {
278
+ background-color: #fcfcfc;
279
+ border-top: 1px solid #e5e5e5;
280
+ border-bottom: 1px solid #e5e5e5;
281
+ }
282
+ .sab-recomended-plugins .sab-recomended-plugin .plugin-image {
283
+ width: 128px;
284
+ }
285
+ .sab-recomended-plugins .sab-recomended-plugin .plugin-information {
286
+ padding-left: 30px;
287
+ box-sizing: border-box;
288
+ width: calc( 100% - 128px );
289
+ }
290
+
291
+ .sab-recomended-plugins .sab-recomended-plugin .plugin-information .plugin-name,
292
+ .sab-recomended-plugins .sab-recomended-plugin .plugin-information .plugin-description {
293
+ margin: 0;
294
+ }
295
+
296
+ .sab-recomended-plugins .sab-recomended-plugin .plugin-information .plugin-description {
297
+ margin-bottom: 10px;
298
+ }
299
+
300
+ .sab-recomended-plugins .sab-recomended-plugin .sab-plugin-button.sab-updating:before {
301
+ font: normal 20px/1 dashicons;
302
+ display: inline-block;
303
+ content: "\f463";
304
+ -webkit-animation: rotation 2s infinite linear;
305
+ animation: rotation 2s infinite linear;
306
+ margin: 3px 5px 0 -2px;
307
+ vertical-align: top;
308
+ }
309
+
310
+
311
+
312
+ @-webkit-keyframes rotation {
313
+ 0% {
314
+ -webkit-transform: rotate(0deg);
315
+ transform: rotate(0deg);
316
+ }
317
+ 100% {
318
+ -webkit-transform: rotate(359deg);
319
+ transform: rotate(359deg);
320
+ }
321
+ }
322
+
323
+ @keyframes rotation {
324
+ 0% {
325
+ -webkit-transform: rotate(0deg);
326
+ transform: rotate(0deg);
327
+ }
328
+ 100% {
329
+ -webkit-transform: rotate(359deg);
330
+ transform: rotate(359deg);
331
+ }
332
+ }
assets/img/kiwi.png ADDED
Binary file
assets/img/modula.jpg ADDED
Binary file
assets/img/speed.png ADDED
Binary file
assets/js/plugin-install.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( wp, $ ) {
2
+ 'use strict';
3
+
4
+ if ( ! wp ) {
5
+ return;
6
+ }
7
+
8
+ function activatePlugin( url, el ) {
9
+ var message = el.data( 'message' );
10
+
11
+ $.ajax( {
12
+ async: true,
13
+ type: 'GET',
14
+ dataType: 'html',
15
+ url: url,
16
+ success: function() {
17
+ el.removeClass( 'sab-updating' );
18
+ el.text( message );
19
+ }
20
+ } );
21
+ }
22
+
23
+ $( function() {
24
+ $( document ).on( 'click', '.sab-plugin-button', function( event ) {
25
+ var action = $( this ).data( 'action' ),
26
+ url = $( this ).attr( 'href' ),
27
+ slug = $( this ).data( 'slug' );
28
+
29
+ event.preventDefault();
30
+
31
+ if ( 'install' === action ) {
32
+
33
+ $( this ).addClass( 'sab-updating disabled' );
34
+
35
+ wp.updates.installPlugin( {
36
+ slug: slug
37
+ } );
38
+
39
+ } else if ( 'activate' === action ) {
40
+
41
+ $( this ).addClass( 'sab-updating disabled' );
42
+ activatePlugin( url, $( this ) );
43
+
44
+ }
45
+
46
+ } );
47
+
48
+ $( document ).on( 'wp-plugin-install-success', function( response, data ) {
49
+ var el = $( '.sab-plugin-button[data-slug="' + data.slug + '"]' );
50
+ event.preventDefault();
51
+ activatePlugin( data.activateUrl, el );
52
+ } );
53
+
54
+ } );
55
+ })( window.wp, jQuery );
inc/admin/plugins.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $plugins = array(
4
+ 'kiwi-social-share' => array(
5
+ 'title' => esc_html__( 'Kiwi Social Share – Social Media Share Buttons & Icons', 'saboxplugin' ),
6
+ 'description' => esc_html__( 'This is by far the best & easiest to use WordPress social media share plugin. A WordPress share plugin with custom icons built-in.', 'saboxplugin' ),
7
+ 'more' => 'https://wordpress.org/plugins/kiwi-social-share/',
8
+ 'image' => 'kiwi.png',
9
+ ),
10
+ 'speed-booster-pack' => array(
11
+ 'title' => esc_html__( 'Speed Booster Pack', 'saboxplugin' ),
12
+ 'description' => esc_html__( 'Speed Booster Pack is a lightweight, frequently updated, easy to use and well supported plugin which allows you to improve your website’s loading speed.', 'saboxplugin' ),
13
+ 'more' => 'https://wordpress.org/plugins/speed-booster-pack/',
14
+ 'image' => 'speed.png',
15
+ ),
16
+ 'modula-best-grid-gallery' => array(
17
+ 'title' => esc_html__( 'Modula - A WordPress Gallery Plugin', 'saboxplugin' ),
18
+ 'description' => esc_html__( 'Modula is currently the easiest and fastest photo gallery plugin for WordPress. With its wizard you are able to build an image gallery in a few seconds, unlike many other WordPress gallery plugins.', 'saboxplugin' ),
19
+ 'more' => 'https://wordpress.org/plugins/modula-best-grid-gallery/',
20
+ 'image' => 'modula.jpg',
21
+ ),
22
+ );
23
+
24
+ if ( ! function_exists( 'get_plugins' ) || ! function_exists( 'is_plugin_active' ) ) {
25
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
26
+ }
27
+
28
+ $installed_plugins = get_plugins();
29
+
30
+ function sab_get_plugin_basename_from_slug( $slug, $installed_plugins ) {
31
+ $keys = array_keys( $installed_plugins );
32
+ foreach ( $keys as $key ) {
33
+ if ( preg_match( '|^' . $slug . '/|', $key ) ) {
34
+ return $key;
35
+ }
36
+ }
37
+ return $slug;
38
+ }
39
+
40
+ ?>
41
+
42
+ <div class="sab-recomended-plugins">
43
+ <?php
44
+ foreach ( $plugins as $slug => $plugin ) {
45
+
46
+ $label = __( 'Install & Activate', 'saboxplugin' );
47
+ $action = 'install';
48
+ $plugin_path = sab_get_plugin_basename_from_slug( $slug, $installed_plugins );
49
+ $url = '#';
50
+ $class = '';
51
+
52
+ if ( file_exists( ABSPATH . 'wp-content/plugins/' . $plugin_path ) ) {
53
+
54
+ if ( is_plugin_active( $plugin_path ) ) {
55
+ $label = __( 'Activated', 'saboxplugin' );
56
+ $action = 'disable';
57
+ $class = 'disabled';
58
+ } else {
59
+ $label = __( 'Activate', 'saboxplugin' );
60
+ $action = 'activate';
61
+ $url = wp_nonce_url(
62
+ add_query_arg(
63
+ array(
64
+ 'action' => 'activate',
65
+ 'plugin' => $plugin_path,
66
+ ), admin_url( 'plugins.php' )
67
+ ), 'activate-plugin_' . $plugin_path
68
+ );
69
+ }
70
+ }
71
+
72
+ ?>
73
+ <div class="sab-recomended-plugin">
74
+ <div class="plugin-image">
75
+ <img src="<?php echo esc_url( SIMPLE_AUTHOR_BOX_ASSETS . 'img/' . $plugin['image'] ); ?>">
76
+ </div>
77
+ <div class="plugin-information">
78
+ <p class="plugin-name"><strong><?php echo esc_html( $plugin['title'] ); ?></strong></p>
79
+ <p class="plugin-description"><?php echo esc_html( $plugin['description'] ); ?></p>
80
+ <a href="<?php echo esc_url( $url ); ?>" data-action="<?php echo esc_attr( $action ); ?>" data-slug="<?php echo esc_attr( $plugin_path ); ?>" data-message="<?php esc_html_e( 'Activated', 'saboxplugin' ); ?>" class="button-primary sab-plugin-button <?php echo esc_attr( $class ); ?>" ><?php echo esc_html( $label ); ?></a>
81
+ <?php if ( isset( $plugin['more'] ) ) : ?>
82
+ <a href="<?php echo esc_url( $plugin['more'] ); ?>" class="button-secondary" target="_blank"><?php esc_html_e( 'Find out more', 'saboxplugin' ); ?></a>
83
+ <?php endif ?>
84
+ </div>
85
+ </div>
86
+ <?php } ?>
87
+ </div>
inc/admin/support.php CHANGED
@@ -10,8 +10,7 @@ if ( ! defined( 'WPINC' ) ) {
10
  <p>
11
  <i><?php esc_html_e( 'We offer excellent support through our advanced ticketing system.', 'saboxplugin' ); ?></i>
12
  </p>
13
- <p><a target="_blank" class="button button-hero button-primary"
14
- href="<?php echo esc_url( 'https://www.machothemes.com/support/?utm_source=sab&utm_medium=about-page&utm_campaign=support-button' ); ?>"><?php esc_html_e( 'Contact Support', 'saboxplugin' ); ?></a>
15
  </p>
16
  </div><!--/.col-->
17
  </div>
@@ -24,8 +23,7 @@ if ( ! defined( 'WPINC' ) ) {
24
  <p>
25
  <i><?php esc_html_e( 'Despite its popularity, though, Bluehost often carries a negative perception among WordPress professionals. So as we dig into this Bluehost review, we\'ll be looking to figure out whether Bluehost\'s performance and features actually justify that reputation.', 'saboxplugin' ); ?></i>
26
  </p>
27
- <p><a target="_blank"
28
- href="<?php echo esc_url( 'https://www.machothemes.com/blog/bluehost-review/?utm_source=sab&utm_medium=about-page&utm_campaign=blog-links' ); ?>"><?php esc_html_e( 'Read more', 'saboxplugin' ); ?></a>
29
  </p>
30
  </div><!--/.col-->
31
 
@@ -35,8 +33,7 @@ if ( ! defined( 'WPINC' ) ) {
35
  <i><?php esc_html_e( 'InMotion Hosting is a popular independent web host that serves over 300,000 customers. They\'re notably not a part of the EIG behemoth (the parent company behind Bluehost, HostGator, and more), which is a plus in my book.', 'saboxplugin' ); ?></i>
36
  </p>
37
  <p>
38
- <a target="_blank"
39
- href="<?php echo esc_url( 'https://www.machothemes.com/blog/inmotion-hosting-review/?utm_source=sab&utm_medium=about-page&utm_campaign=blog-links' ); ?>"><?php esc_html_e( 'Read more', 'saboxplugin' ); ?></a>
40
  </p>
41
  </div><!--/.col-->
42
 
@@ -46,8 +43,7 @@ if ( ! defined( 'WPINC' ) ) {
46
  <i><?php esc_html_e( 'When it comes to affordable WordPress hosting, A2 Hosting is a name that often comes up in various WordPress groups for offering quick-loading performance that belies its low price tag.', 'saboxplugin' ); ?></i>
47
  </p>
48
  <p>
49
- <a target="_blank"
50
- href="<?php echo esc_url( 'https://www.machothemes.com/blog/a2-hosting-review/?utm_source=sab&utm_medium=about-page&utm_campaign=blog-links' ); ?>"><?php esc_html_e( 'Read more', 'saboxplugin' ); ?></a>
51
  </p>
52
  </div><!--/.col-->
53
  </div>
10
  <p>
11
  <i><?php esc_html_e( 'We offer excellent support through our advanced ticketing system.', 'saboxplugin' ); ?></i>
12
  </p>
13
+ <p><a target="_blank" class="button button-hero button-primary" href="<?php echo esc_url( 'https://www.machothemes.com/support/?utm_source=sab&utm_medium=about-page&utm_campaign=support-button' ); ?>"><?php esc_html_e( 'Contact Support', 'saboxplugin' ); ?></a>
 
14
  </p>
15
  </div><!--/.col-->
16
  </div>
23
  <p>
24
  <i><?php esc_html_e( 'Despite its popularity, though, Bluehost often carries a negative perception among WordPress professionals. So as we dig into this Bluehost review, we\'ll be looking to figure out whether Bluehost\'s performance and features actually justify that reputation.', 'saboxplugin' ); ?></i>
25
  </p>
26
+ <p><a target="_blank" href="<?php echo esc_url( 'https://www.machothemes.com/blog/bluehost-review/?utm_source=sab&utm_medium=about-page&utm_campaign=blog-links' ); ?>"><?php esc_html_e( 'Read more', 'saboxplugin' ); ?></a>
 
27
  </p>
28
  </div><!--/.col-->
29
 
33
  <i><?php esc_html_e( 'InMotion Hosting is a popular independent web host that serves over 300,000 customers. They\'re notably not a part of the EIG behemoth (the parent company behind Bluehost, HostGator, and more), which is a plus in my book.', 'saboxplugin' ); ?></i>
34
  </p>
35
  <p>
36
+ <a target="_blank" href="<?php echo esc_url( 'https://www.machothemes.com/blog/inmotion-hosting-review/?utm_source=sab&utm_medium=about-page&utm_campaign=blog-links' ); ?>"><?php esc_html_e( 'Read more', 'saboxplugin' ); ?></a>
 
37
  </p>
38
  </div><!--/.col-->
39
 
43
  <i><?php esc_html_e( 'When it comes to affordable WordPress hosting, A2 Hosting is a name that often comes up in various WordPress groups for offering quick-loading performance that belies its low price tag.', 'saboxplugin' ); ?></i>
44
  </p>
45
  <p>
46
+ <a target="_blank" href="<?php echo esc_url( 'https://www.machothemes.com/blog/a2-hosting-review/?utm_source=sab&utm_medium=about-page&utm_campaign=blog-links' ); ?>"><?php esc_html_e( 'Read more', 'saboxplugin' ); ?></a>
 
47
  </p>
48
  </div><!--/.col-->
49
  </div>
inc/class-simple-author-box-admin-page.php CHANGED
@@ -26,9 +26,13 @@ class Simple_Author_Box_Admin_Page {
26
  'miscellaneous-options' => array(
27
  'label' => __( 'Misc', 'saboxplugin' ),
28
  ),
29
- 'support' => array(
30
  'label' => __( 'Support', 'saboxplugin' ),
31
- 'path' => SIMPLE_AUTHOR_BOX_PATH . 'inc/admin/support.php',
 
 
 
 
32
  ),
33
  );
34
 
26
  'miscellaneous-options' => array(
27
  'label' => __( 'Misc', 'saboxplugin' ),
28
  ),
29
+ 'support' => array(
30
  'label' => __( 'Support', 'saboxplugin' ),
31
+ 'path' => SIMPLE_AUTHOR_BOX_PATH . 'inc/admin/support.php',
32
+ ),
33
+ 'plugins' => array(
34
+ 'label' => __( 'Other Great Plugins', 'saboxplugin' ),
35
+ 'path' => SIMPLE_AUTHOR_BOX_PATH . 'inc/admin/plugins.php',
36
  ),
37
  );
38
 
inc/class-simple-author-box.php CHANGED
@@ -101,6 +101,7 @@ class Simple_Author_Box {
101
 
102
  // Scripts
103
  wp_enqueue_script( 'sabox-admin-js', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sabox-admin.js', array( 'jquery-ui-slider', 'wp-color-picker' ), false, true );
 
104
 
105
  } elseif ( 'profile.php' == $hook || 'user-edit.php' == $hook ) {
106
 
101
 
102
  // Scripts
103
  wp_enqueue_script( 'sabox-admin-js', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sabox-admin.js', array( 'jquery-ui-slider', 'wp-color-picker' ), false, true );
104
+ wp_enqueue_script( 'sabox-plugin-install', SIMPLE_AUTHOR_BOX_ASSETS . 'js/plugin-install.js', array( 'jquery', 'updates' ), '1.0.0', 'all' );
105
 
106
  } elseif ( 'profile.php' == $hook || 'user-edit.php' == $hook ) {
107
 
inc/functions.php CHANGED
@@ -13,7 +13,7 @@ if ( ! function_exists( 'wpsabox_author_box' ) ) {
13
 
14
  function wpsabox_author_box( $saboxmeta = null ) {
15
 
16
- $show = ( is_single() || is_page() || is_author() || is_archive() );
17
  $show = apply_filters( 'sabox_check_if_show', $show );
18
 
19
  if ( $show ) {
13
 
14
  function wpsabox_author_box( $saboxmeta = null ) {
15
 
16
+ $show = ( is_single() || is_author() || is_archive() );
17
  $show = apply_filters( 'sabox_check_if_show', $show );
18
 
19
  if ( $show ) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: machothemes
3
  Tags: author box, responsive author box, author profile fields, author social icons, profile fields, author bio, author description, author profile, user profile, post author, rtl author box
4
  Requires at least: 3.6
5
  Tested up to: 4.9
6
- Stable tag: 2.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -52,13 +52,14 @@ We are a young team of WordPress aficionados who love building WordPress plugins
52
 
53
  == Changelog ==
54
 
 
 
 
 
55
  = 2.0 =
56
  Included the option to add html to a user's description ( https://github.com/MachoThemes/simple-author-box/issues/23 )
57
  Fixed Google fonts error ( https://github.com/MachoThemes/simple-author-box/issues/14 )
58
  Added new features ( https://github.com/MachoThemes/simple-author-box/issues/7 )
59
- Added the posibility to select where to show the author box ( https://github.com/MachoThemes/simple-author-box/issues/5 )
60
- Added the option to link the author's name to its website ( https://github.com/MachoThemes/simple-author-box/issues/4 )
61
- Added the posibility to add guest authors
62
  Added the posibility to add custom profile images
63
  Created a shortcode that can be placed inside the posts' content wherever a user wants
64
  Improved how you add social links
3
  Tags: author box, responsive author box, author profile fields, author social icons, profile fields, author bio, author description, author profile, user profile, post author, rtl author box
4
  Requires at least: 3.6
5
  Tested up to: 4.9
6
+ Stable tag: 2.0.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
52
 
53
  == Changelog ==
54
 
55
+ = 2.0.1 =
56
+ Removed simple author box from pages.
57
+ Added new tab in setting page
58
+
59
  = 2.0 =
60
  Included the option to add html to a user's description ( https://github.com/MachoThemes/simple-author-box/issues/23 )
61
  Fixed Google fonts error ( https://github.com/MachoThemes/simple-author-box/issues/14 )
62
  Added new features ( https://github.com/MachoThemes/simple-author-box/issues/7 )
 
 
 
63
  Added the posibility to add custom profile images
64
  Created a shortcode that can be placed inside the posts' content wherever a user wants
65
  Improved how you add social links
simple-author-box.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Author Box
4
  * Plugin URI: http://wordpress.org/plugins/simple-author-box/
5
  * Description: Adds a responsive author box with social icons on your posts.
6
- * Version: 2.0
7
  * Author: Macho Themes
8
  * Author URI: https://www.machothemes.com/
9
  * License: GPLv2
@@ -30,7 +30,7 @@
30
  define( 'SIMPLE_AUTHOR_BOX_PATH', plugin_dir_path( __FILE__ ) );
31
  define( 'SIMPLE_AUTHOR_BOX_ASSETS', plugins_url( '/assets/', __FILE__ ) );
32
  define( 'SIMPLE_AUTHOR_BOX_SLUG', plugin_basename( __FILE__ ) );
33
- define( 'SIMPLE_AUTHOR_BOX_VERSION', '2.0.0' );
34
  define( 'SIMPLE_AUTHOR_SCRIPT_DEBUG', true );
35
 
36
 
3
  * Plugin Name: Simple Author Box
4
  * Plugin URI: http://wordpress.org/plugins/simple-author-box/
5
  * Description: Adds a responsive author box with social icons on your posts.
6
+ * Version: 2.0.1
7
  * Author: Macho Themes
8
  * Author URI: https://www.machothemes.com/
9
  * License: GPLv2
30
  define( 'SIMPLE_AUTHOR_BOX_PATH', plugin_dir_path( __FILE__ ) );
31
  define( 'SIMPLE_AUTHOR_BOX_ASSETS', plugins_url( '/assets/', __FILE__ ) );
32
  define( 'SIMPLE_AUTHOR_BOX_SLUG', plugin_basename( __FILE__ ) );
33
+ define( 'SIMPLE_AUTHOR_BOX_VERSION', '2.0.1' );
34
  define( 'SIMPLE_AUTHOR_SCRIPT_DEBUG', true );
35
 
36