WP Socializer - Version 6.3

Version Description

Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 WP Socializer
Version 6.3
Comparing to
See all releases

Code changes from version 6.2 to 6.3

admin/admin.php CHANGED
@@ -146,7 +146,7 @@ class WPSR_Admin{
146
  echo '<h1><i class="fa fa-star-of-life"></i>Features</h1>';
147
  self::admin_pages_list( 'feature' );
148
 
149
- echo '<h1><i class="fas fa-columns"></i>Widgets</h1>';
150
  self::admin_pages_list( 'widget' );
151
 
152
  echo '<h1><i class="fa fa-wrench"></i>Settings</h1>';
@@ -436,9 +436,9 @@ class WPSR_Admin{
436
 
437
  echo '<div class="side_card">';
438
  echo '<h2><i class="fas fa-lightbulb"></i> Floating/sticky widgets</h2>';
439
- echo '<a class="side_banner" href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=ufw" target="_blank"><img src="' . WPSR_ADMIN_URL . '/images/banners/ultimate-floating-widgets.png" /></a>';
440
  echo '<p>If your website does not have a sidebar, but still want to use widgets then you can try Ultimate floating widgets plugin. It creates a sticky popup where you can place your widgets.</p>';
441
- echo '<a class="cta_link" href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=ufw" target="_blank">Learn more <i class="fas fa-arrow-right"></i></a>';
442
  echo '</div>';
443
 
444
  echo '<div class="side_card">';
@@ -446,7 +446,7 @@ class WPSR_Admin{
446
  echo '<p>Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.</p>';
447
 
448
  echo '<form class="subscribe_form" action="https://aakashweb.us19.list-manage.com/subscribe/post?u=b7023581458d048107298247e&amp;id=ef5ab3c5c4" method="post" name="mc-embedded-subscribe-form" target="_blank" novalidate>
449
- <input type="email" value="" name="EMAIL" class="required subscribe_email_box" id="mce-EMAIL" placeholder="Your email address">
450
  <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_b7023581458d048107298247e_ef5ab3c5c4" tabindex="-1" value=""></div>
451
  <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button subscribe_btn">
452
  </form>';
146
  echo '<h1><i class="fa fa-star-of-life"></i>Features</h1>';
147
  self::admin_pages_list( 'feature' );
148
 
149
+ echo '<h1><i class="fas fa-columns"></i>Sidebar Widgets</h1>';
150
  self::admin_pages_list( 'widget' );
151
 
152
  echo '<h1><i class="fa fa-wrench"></i>Settings</h1>';
436
 
437
  echo '<div class="side_card">';
438
  echo '<h2><i class="fas fa-lightbulb"></i> Floating/sticky widgets</h2>';
439
+ echo '<a class="side_banner" href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets-pro/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=ufw-pro" target="_blank"><img src="' . WPSR_ADMIN_URL . '/images/banners/ultimate-floating-widgets.png" /></a>';
440
  echo '<p>If your website does not have a sidebar, but still want to use widgets then you can try Ultimate floating widgets plugin. It creates a sticky popup where you can place your widgets.</p>';
441
+ echo '<a class="cta_link" href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets-pro/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=ufw-pro" target="_blank">Learn more <i class="fas fa-arrow-right"></i></a>';
442
  echo '</div>';
443
 
444
  echo '<div class="side_card">';
446
  echo '<p>Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.</p>';
447
 
448
  echo '<form class="subscribe_form" action="https://aakashweb.us19.list-manage.com/subscribe/post?u=b7023581458d048107298247e&amp;id=ef5ab3c5c4" method="post" name="mc-embedded-subscribe-form" target="_blank" novalidate>
449
+ <input type="email" value="' . get_option( 'admin_email' ) . '" name="EMAIL" class="required subscribe_email_box" id="mce-EMAIL" placeholder="Your email address">
450
  <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_b7023581458d048107298247e_ef5ab3c5c4" tabindex="-1" value=""></div>
451
  <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button subscribe_btn">
452
  </form>';
admin/css/style.css CHANGED
@@ -117,13 +117,13 @@ h1.wpsr_title a i{
117
 
118
 
119
  .admin_pages_list{
120
- display: flex;
121
- flex-wrap: wrap;
 
 
122
  }
123
  .page_card {
124
- flex-basis: calc(25% - 20px);
125
  background-color: #fff;
126
- margin: 0 20px 20px 0;
127
  border: 1px solid #e6e6e6;
128
  position: relative;
129
  box-sizing: border-box;
@@ -158,7 +158,6 @@ h1.wpsr_title a i{
158
  }
159
  .page_card .card_info {
160
  margin: 0 20px;
161
- text-align: center;
162
  }
163
  .page_card .card_info p {
164
  color: #777;
@@ -363,8 +362,6 @@ h1.wpsr_title a i{
363
  vertical-align: middle;
364
  font-size: 13px;
365
  box-shadow: none;
366
- padding: 0 3px;
367
- line-height: 2;
368
  }
369
  .loc_rule_wrap .loc_rule_remove{
370
  position: absolute;
@@ -826,6 +823,7 @@ select[name="ft_status"]{
826
  }
827
  .form_section p{
828
  font-size: 15px;
 
829
  }
830
  .section_head{
831
  font-size: 20px;
117
 
118
 
119
  .admin_pages_list{
120
+ display: grid;
121
+ grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
122
+ grid-gap: 20px;
123
+ margin-bottom: 4em;
124
  }
125
  .page_card {
 
126
  background-color: #fff;
 
127
  border: 1px solid #e6e6e6;
128
  position: relative;
129
  box-sizing: border-box;
158
  }
159
  .page_card .card_info {
160
  margin: 0 20px;
 
161
  }
162
  .page_card .card_info p {
163
  color: #777;
362
  vertical-align: middle;
363
  font-size: 13px;
364
  box-shadow: none;
 
 
365
  }
366
  .loc_rule_wrap .loc_rule_remove{
367
  position: absolute;
823
  }
824
  .form_section p{
825
  font-size: 15px;
826
+ font-style: italic;
827
  }
828
  .section_head{
829
  font-size: 20px;
admin/widgets.php CHANGED
@@ -117,7 +117,7 @@ class WPSR_Widget_Form_Fields{
117
  function footer(){
118
 
119
  echo '<footer>';
120
- echo '<span class="wpsr_version">WP Socializer v' . WPSR_VERSION . '</span> | <a href="https://wordpress.org/support/plugin/wp-socializer/reviews/?rate=5#new-post" target="_blank">Rate this plugin</a> | <a href="https://www.paypal.me/vaakash/6" target="_blank">Buy me a Coffee</a> | <a href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/?utm_source=wp-socializer&utm_medium=widget&utm_campaign=ufw" target="_blank">Add widgets to sticky popup</a>';
121
  echo '</footer>';
122
 
123
  }
117
  function footer(){
118
 
119
  echo '<footer>';
120
+ echo '<span class="wpsr_version">WP Socializer v' . WPSR_VERSION . '</span> | <a href="https://wordpress.org/support/plugin/wp-socializer/reviews/?rate=5#new-post" target="_blank">Rate this plugin</a> | <a href="https://www.paypal.me/vaakash/6" target="_blank">Buy me a Coffee</a> | <a href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets-pro/?utm_source=wp-socializer&utm_medium=widget&utm_campaign=ufw-pro" target="_blank">Add widgets to sticky popup</a>';
121
  echo '</footer>';
122
 
123
  }
core/lists.php CHANGED
@@ -31,7 +31,7 @@ class WPSR_Lists{
31
  public static function ext_res( $name = 'all' ){
32
 
33
  $res = apply_filters( 'wpsr_mod_ext_res', array(
34
- 'font-awesome-adm' => 'https://use.fontawesome.com/releases/v5.12.0/css/all.css',
35
  'wp-socializer-cl' => 'https://raw.githubusercontent.com/vaakash/vaakash.github.io/master/misc/wp-socializer/changelogs/'
36
  ));
37
 
31
  public static function ext_res( $name = 'all' ){
32
 
33
  $res = apply_filters( 'wpsr_mod_ext_res', array(
34
+ 'font-awesome-adm' => 'https://use.fontawesome.com/releases/v5.15.1/css/all.css',
35
  'wp-socializer-cl' => 'https://raw.githubusercontent.com/vaakash/vaakash.github.io/master/misc/wp-socializer/changelogs/'
36
  ));
37
 
core/location-rules.php CHANGED
@@ -24,7 +24,7 @@ class WPSR_Location_Rules{
24
  'callback' => array( __CLASS__, 'rule_is_single' ),
25
  'placeholder' => __( 'Select specific posts', 'wpsr' ),
26
  'helper' => 1,
27
- 'children' => array( 'has-category', 'has-tag', 'post-type' )
28
  ),
29
 
30
  'page' => array(
@@ -32,21 +32,21 @@ class WPSR_Location_Rules{
32
  'callback' => array( __CLASS__, 'rule_is_page' ),
33
  'placeholder' => __( 'Select specific pages', 'wpsr' ),
34
  'helper' => 1,
35
- 'children' => array( 'has-category', 'has-tag', 'post-type' )
36
  ),
37
 
38
  'home' => array(
39
  'name' => 'Home page',
40
  'callback' => array( __CLASS__, 'rule_is_home' ),
41
  'helper' => 0,
42
- 'children' => array( 'in-excerpt', 'post-type', 'has-category', 'has-tag' )
43
  ),
44
 
45
  'front-page' => array(
46
  'name' => 'Front page',
47
  'callback' => array( __CLASS__, 'rule_is_frontpage' ),
48
  'helper' => 0,
49
- 'children' => array( 'in-excerpt', 'post-type', 'has-category', 'has-tag' )
50
  ),
51
 
52
  'sticky' => array(
@@ -60,7 +60,7 @@ class WPSR_Location_Rules{
60
  'callback' => array( __CLASS__, 'rule_post_type' ),
61
  'placeholder' => 'Select available post type',
62
  'helper' => 1,
63
- 'children' => array( 'single', 'page', 'has-category', 'has-tag' )
64
  ),
65
 
66
  'post-format' => array(
@@ -74,7 +74,7 @@ class WPSR_Location_Rules{
74
  'name' => 'Archive pages',
75
  'callback' => array( __CLASS__, 'rule_is_archive' ),
76
  'helper' => 0,
77
- 'children' => array( 'category', 'tag', 'date' )
78
  ),
79
 
80
  'category' => array(
@@ -91,6 +91,14 @@ class WPSR_Location_Rules{
91
  'helper' => 1
92
  ),
93
 
 
 
 
 
 
 
 
 
94
  'date' => array(
95
  'name' => 'Date archive page',
96
  'callback' => array( __CLASS__, 'rule_is_date' ),
@@ -117,6 +125,13 @@ class WPSR_Location_Rules{
117
  'helper' => 1
118
  ),
119
 
 
 
 
 
 
 
 
120
  );
121
 
122
  return apply_filters( 'wpsr_mod_location_rules_list', $rules );
@@ -463,6 +478,28 @@ class WPSR_Location_Rules{
463
 
464
  }
465
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  public static function rule_is_date( $mode, $ids = '' ){
467
 
468
  if( $mode == 1 ){ // Rule selectors
@@ -516,6 +553,28 @@ class WPSR_Location_Rules{
516
 
517
  }
518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  public static function rule_is_home( $mode, $ids = '' ){
520
 
521
  if( $mode == 1 ){
24
  'callback' => array( __CLASS__, 'rule_is_single' ),
25
  'placeholder' => __( 'Select specific posts', 'wpsr' ),
26
  'helper' => 1,
27
+ 'children' => array( 'has-category', 'has-tag', 'post-type', 'has-term' )
28
  ),
29
 
30
  'page' => array(
32
  'callback' => array( __CLASS__, 'rule_is_page' ),
33
  'placeholder' => __( 'Select specific pages', 'wpsr' ),
34
  'helper' => 1,
35
+ 'children' => array( 'has-category', 'has-tag', 'post-type', 'has-term' )
36
  ),
37
 
38
  'home' => array(
39
  'name' => 'Home page',
40
  'callback' => array( __CLASS__, 'rule_is_home' ),
41
  'helper' => 0,
42
+ 'children' => array( 'in-excerpt', 'post-type', 'has-category', 'has-tag', 'has-term' )
43
  ),
44
 
45
  'front-page' => array(
46
  'name' => 'Front page',
47
  'callback' => array( __CLASS__, 'rule_is_frontpage' ),
48
  'helper' => 0,
49
+ 'children' => array( 'in-excerpt', 'post-type', 'has-category', 'has-tag', 'has-term' )
50
  ),
51
 
52
  'sticky' => array(
60
  'callback' => array( __CLASS__, 'rule_post_type' ),
61
  'placeholder' => 'Select available post type',
62
  'helper' => 1,
63
+ 'children' => array( 'single', 'page', 'has-category', 'has-tag', 'has-term' )
64
  ),
65
 
66
  'post-format' => array(
74
  'name' => 'Archive pages',
75
  'callback' => array( __CLASS__, 'rule_is_archive' ),
76
  'helper' => 0,
77
+ 'children' => array( 'category', 'tag', 'date', 'taxonomy' )
78
  ),
79
 
80
  'category' => array(
91
  'helper' => 1
92
  ),
93
 
94
+ 'taxonomy' => array(
95
+ 'name' => 'Taxonomy archive page',
96
+ 'callback' => array( __CLASS__, 'rule_is_taxonomy' ),
97
+ 'placeholder' => __( 'Select available taxonomy archive pages', 'wpsr' ),
98
+ 'children' => array( 'has-term' ),
99
+ 'helper' => 1
100
+ ),
101
+
102
  'date' => array(
103
  'name' => 'Date archive page',
104
  'callback' => array( __CLASS__, 'rule_is_date' ),
125
  'helper' => 1
126
  ),
127
 
128
+ 'has-term' => array(
129
+ 'name' => 'Terms of post',
130
+ 'callback' => array( __CLASS__, 'rule_has_term' ),
131
+ 'placeholder' => __( 'Select available terms', 'wpsr' ),
132
+ 'helper' => 1
133
+ ),
134
+
135
  );
136
 
137
  return apply_filters( 'wpsr_mod_location_rules_list', $rules );
478
 
479
  }
480
 
481
+ function rule_is_taxonomy( $mode, $ids = '' ){
482
+
483
+ if( $mode == 1 ){ // Rule selectors
484
+
485
+ $list = array();
486
+ $taxonomies = get_taxonomies();
487
+
488
+ if( !empty( $taxonomies ) ){
489
+ foreach( $taxonomies as $tax => $tax_name ){
490
+ $list[ $tax ] = $tax_name;
491
+ }
492
+ return $list;
493
+ }else{
494
+ die( __( 'No taxonomies !', 'wpsr' ) );
495
+ }
496
+
497
+ }elseif( $mode == 2 ){ // Rule check
498
+ return is_tax( $this->array_it( $ids ) );
499
+ }
500
+
501
+ }
502
+
503
  public static function rule_is_date( $mode, $ids = '' ){
504
 
505
  if( $mode == 1 ){ // Rule selectors
553
 
554
  }
555
 
556
+ function rule_has_term( $mode, $ids = '' ){
557
+
558
+ if( $mode == 1 ){ // Rule selectors
559
+
560
+ $list = array();
561
+ $terms = get_terms();
562
+
563
+ if( !empty( $terms ) ){
564
+ foreach( $terms as $term ){
565
+ $list[ $term->slug ] = $term->name . ' (' . $term->taxonomy . ')';
566
+ }
567
+ return $list;
568
+ }else{
569
+ die( __( 'No terms !', 'wpsr' ) );
570
+ }
571
+
572
+ }elseif( $mode == 2 ){ // Rule check
573
+ return has_term( $this->array_it( $ids ) );
574
+ }
575
+
576
+ }
577
+
578
  public static function rule_is_home( $mode, $ids = '' ){
579
 
580
  if( $mode == 1 ){
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: vaakash
3
  Donate link: https://www.paypal.me/vaakash/6
4
  Tags: social media, share, buttons, social sharing, share buttons, social profile, social widget, icons, sharing icons, sharing buttons, social share, sharing, shortcode, widget, twitter tweets, facebook page, share count, whatsapp icon, whatsapp button, instagram icon, sticky share, floating share bar
5
  Requires at least: 4.6
6
- Tested up to: 5.5.1
7
- Stable tag: 6.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
@@ -155,6 +155,11 @@ Please refer [this page](https://www.aakashweb.com/docs/) for the full list of F
155
 
156
  ## Changelog
157
 
 
 
 
 
 
158
  ### 6.2
159
  * New: Viber and Google icons can now be selected as follow icons.
160
  * New: In share icons shortcode, page information can be changed when template is selected.
3
  Donate link: https://www.paypal.me/vaakash/6
4
  Tags: social media, share, buttons, social sharing, share buttons, social profile, social widget, icons, sharing icons, sharing buttons, social share, sharing, shortcode, widget, twitter tweets, facebook page, share count, whatsapp icon, whatsapp button, instagram icon, sticky share, floating share bar
5
  Requires at least: 4.6
6
+ Tested up to: 5.6
7
+ Stable tag: 6.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
155
 
156
  ## Changelog
157
 
158
+ ### 6.3
159
+ * New: Support to build show/hide rules for custom taxonomy and terms.
160
+ * Fix: Updated fontawesome to the latest version.
161
+ * Fix: Minor enhancements to admin page.
162
+
163
  ### 6.2
164
  * New: Viber and Google icons can now be selected as follow icons.
165
  * New: In share icons shortcode, page information can be changed when template is selected.
wpsr.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: WP Socializer
4
  * Plugin URI: https://www.aakashweb.com/wordpress-plugins/wp-socializer/
5
  * Description: Add various social media sharing features to posts/pages/widgets like social media share icons, floating/sticky share bar, follow my profile icons and more.
6
- * Version: 6.2
7
  * Author: Aakash Chakravarthy
8
  * Author URI: https://www.aakashweb.com
9
  * Text Domain: wpsr
10
  * Domain Path: /languages
11
  */
12
 
13
- define( 'WPSR_VERSION', '6.2' );
14
  define( 'WPSR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
  define( 'WPSR_URL', plugin_dir_url( __FILE__ ) );
16
  define( 'WPSR_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
3
  * Plugin Name: WP Socializer
4
  * Plugin URI: https://www.aakashweb.com/wordpress-plugins/wp-socializer/
5
  * Description: Add various social media sharing features to posts/pages/widgets like social media share icons, floating/sticky share bar, follow my profile icons and more.
6
+ * Version: 6.3
7
  * Author: Aakash Chakravarthy
8
  * Author URI: https://www.aakashweb.com
9
  * Text Domain: wpsr
10
  * Domain Path: /languages
11
  */
12
 
13
+ define( 'WPSR_VERSION', '6.3' );
14
  define( 'WPSR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
  define( 'WPSR_URL', plugin_dir_url( __FILE__ ) );
16
  define( 'WPSR_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );