Shariff Wrapper - Version 4.4.4

Version Description

  • add support for automatic addition to bbpress forums, topics and replies
  • fix a bug that caused "hideshariff" to not function properly
Download this release

Release Info

Developer starguide
Plugin Icon 128x128 Shariff Wrapper
Version 4.4.4
Comparing to
See all releases

Code changes from version 4.4.3 to 4.4.4

Files changed (6) hide show
  1. admin/admin-menu.php +0 -7
  2. changelog.txt +4 -0
  3. css/shariff.css +3 -1
  4. css/shariff.min.css +1 -1
  5. readme.txt +6 -2
  6. shariff.php +74 -8
admin/admin-menu.php CHANGED
@@ -592,13 +592,6 @@ function shariff3uu_multiplecheckbox_add_after_render() {
592
  }
593
  echo ' value="1">' . esc_html__( 'Pages', 'shariff' ) . '</p>';
594
 
595
- // Add after all bbpress replies.
596
- echo '<p><input type="checkbox" name="shariff3uu_basic[add_after][bbp_reply]" ';
597
- if ( isset( $GLOBALS['shariff3uu_basic']['add_after']['bbp_reply'] ) ) {
598
- echo checked( $GLOBALS['shariff3uu_basic']['add_after']['bbp_reply'], 1, 0 );
599
- }
600
- echo ' value="1">' . esc_html__( 'bbPress replies', 'shariff' ) . '</p>';
601
-
602
  // Add after all excerpts.
603
  echo '<p><input type="checkbox" name="shariff3uu_basic[add_after][excerpt]" ';
604
  if ( isset( $GLOBALS['shariff3uu_basic']['add_after']['excerpt'] ) ) {
592
  }
593
  echo ' value="1">' . esc_html__( 'Pages', 'shariff' ) . '</p>';
594
 
 
 
 
 
 
 
 
595
  // Add after all excerpts.
596
  echo '<p><input type="checkbox" name="shariff3uu_basic[add_after][excerpt]" ';
597
  if ( isset( $GLOBALS['shariff3uu_basic']['add_after']['excerpt'] ) ) {
changelog.txt CHANGED
@@ -2,6 +2,10 @@
2
 
3
  == Changelog ==
4
 
 
 
 
 
5
  = 4.4.3 =
6
  - new support for additional manual AMP integrations
7
  - new support for the print button on AMP pages
2
 
3
  == Changelog ==
4
 
5
+ = 4.4.4 =
6
+ - add support for automatic addition to bbpress forums, topics and replies
7
+ - fix a bug that caused "hideshariff" to not function properly
8
+
9
  = 4.4.3 =
10
  - new support for additional manual AMP integrations
11
  - new support for the print button on AMP pages
css/shariff.css CHANGED
@@ -346,13 +346,15 @@
346
  .shariff .shariff-buttons.buttonsize-small li { width: 25px; }
347
  .shariff .shariff-buttons.buttonsize-large li { width: 45px; }
348
  .shariff .shariff-buttons .shariff-icon svg { display: block; margin: auto; }
349
- .shariff .shariff-buttons .shariff-count { display: none; }
350
  .shariff .shariff-buttons .shariff-text { display: none; }
351
  }
352
  @media only screen and (min-width: 361px) {
353
  .shariff .shariff-buttons li { width: 90px; }
354
  .shariff .shariff-buttons.buttonsize-large li { width: 130px; }
355
  }
 
 
 
356
  @media only screen and (min-width: 768px) {
357
  .shariff .shariff-buttons li { width: 130px; }
358
  .shariff .shariff-buttons.buttonsize-small li { width: 105px; }
346
  .shariff .shariff-buttons.buttonsize-small li { width: 25px; }
347
  .shariff .shariff-buttons.buttonsize-large li { width: 45px; }
348
  .shariff .shariff-buttons .shariff-icon svg { display: block; margin: auto; }
 
349
  .shariff .shariff-buttons .shariff-text { display: none; }
350
  }
351
  @media only screen and (min-width: 361px) {
352
  .shariff .shariff-buttons li { width: 90px; }
353
  .shariff .shariff-buttons.buttonsize-large li { width: 130px; }
354
  }
355
+ @media only screen and (max-width: 768px) {
356
+ .shariff .shariff-buttons .shariff-count { display: none; }
357
+ }
358
  @media only screen and (min-width: 768px) {
359
  .shariff .shariff-buttons li { width: 130px; }
360
  .shariff .shariff-buttons.buttonsize-small li { width: 105px; }
css/shariff.min.css CHANGED
@@ -1 +1 @@
1
- .shariff{display:block !important;clear:both}.shariff ul{display:flex;flex-direction:row;flex-flow:row wrap;padding:0 !important;margin:0 !important}.shariff li{height:35px;box-sizing:border-box;list-style:none !important;overflow:hidden !important;margin:5px !important;padding:0 !important;text-indent:0 !important;border-left:0 none !important}.shariff a{position:relative;display:block !important;height:35px;padding:0;margin:0;box-sizing:border-box;border:0;text-decoration:none;background-image:none !important;text-align:left;box-shadow:none;cursor:pointer}.shariff a:hover{color:#fff;background-color:inherit !important;text-decoration:none !important}.shariff a:visited{color:inherit}.shariff .shariff-count{position:absolute;height:33px;top:0;right:0;margin:1px;padding:0 8px;background-color:rgba(255,255,255,0.5)}.shariff .shariff-count,.shariff .shariff-text{font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:36px;vertical-align:top}.shariff .shariff-text{padding-left:3px}.shariff .shariff-icon svg{width:32px;height:20px;padding:7px 1px;box-sizing:content-box}.shariff-button::before{content:none !important}.shariff .shariff-buttons .shariff-text-white{color:#fff}.shariff .shariff-buttons .shariff-hidezero{opacity:0}.shariff .theme-default a{color:#fff !important}.shariff .theme-default .shariff-icon svg path{fill:#fff}.shariff .theme-color .shariff-count{background-color:transparent !important;color:#fff !important}.shariff .theme-color .shariff-icon svg path{fill:#fff}.shariff .theme-grey a{background-color:#b0b0b0 !important}.shariff .theme-grey a:hover{background-color:inherit !important}.shariff .theme-grey .shariff-count{background-color:transparent;color:#fff !important}.shariff .theme-grey .shariff-icon svg path{fill:#fff}.shariff .theme-white a{background-color:#fff !important;border:1px solid #ddd}.shariff .theme-white a:hover{background-color:#eee !important;color:inherit}.shariff .theme-white svg{fill:currentColor}.shariff .theme-white .shariff-count{background-color:transparent;margin:0}.shariff .shariff-buttons.theme-round li{width:35px !important;height:35px;border-radius:50%;margin:5px}.shariff .theme-round a{position:relative;height:35px;border-radius:50%}.shariff .theme-round .shariff-icon svg{display:block;margin:auto;padding:8px 1px}.shariff .theme-round .shariff-text{display:block}.shariff .theme-round .shariff-count{display:inline;padding:0;right:0;left:0;top:0;background-color:transparent;color:transparent !important;text-align:center}.shariff .theme-round .shariff-count:hover{background-color:inherit !important;color:#fff !important}.shariff .theme-round .shariff-icon svg path{fill:#fff}.shariff .shariff-buttons.buttonsize-small li{height:25px !important}.shariff .shariff-buttons.buttonsize-small a{height:25px !important}.shariff .shariff-buttons.buttonsize-small.orientation-vertical li{width:115px}.shariff .shariff-buttons.buttonsize-small .shariff-icon svg{width:22px;height:15px;padding:5px 1px}.shariff .shariff-buttons.buttonsize-small .shariff-text,.shariff .shariff-buttons.buttonsize-small .shariff-count{font-size:11px;line-height:25px;padding:0 5px;height:23px}.shariff .shariff-buttons.buttonsize-small .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-small.theme-round li{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round a{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round .shariff-count{padding:0 !important;height:25px !important}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li{margin:5px 7px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:first-child{margin-left:5px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:last-child{margin-right:5px}.shariff .buttonsize-large li{height:45px !important}.shariff .buttonsize-large a{height:45px !important}.shariff .buttonsize-large.orientation-vertical li{width:155px}.shariff .buttonsize-large .shariff-icon svg{width:40px;height:28px;padding:9px 2px}.shariff .buttonsize-large .shariff-text,.shariff .buttonsize-large .shariff-count{font-size:14px;line-height:45px;padding:0 10px;height:43px}.shariff .buttonsize-large .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-large.theme-round li{width:45px !important;height:45px !important}.shariff .buttonsize-large.theme-round a{width:45px !important}.shariff .buttonsize-large.theme-round .shariff-count{padding:0 !important;height:45px !important}.shariff .orientation-vertical{flex-direction:column}.shariff .orientation-vertical li{width:135px}.shariff.shariff-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.shariff.shariff-align-center ul{justify-content:center;align-items:center}.shariff.shariff-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.widget .shariff.shariff-widget-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.widget .shariff.shariff-widget-align-center ul{justify-content:center;align-items:center}.widget .shariff.shariff-widget-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.shariff.shariff-buttonstretch li{flex:1 0 auto !important}.shariff.shariff-buttonstretch .orientation-vertical li{width:100% !important}.widget .shariff li{border:0;font-weight:400}.widget .shariff .theme-default a,.widget .shariff .theme-color a,.widget .shariff .theme-grey a,.widget .shariff .theme-round a{color:#fff;display:block;font-weight:400}.widget .shariff .theme-default a:hover,.widget .shariff .theme-color a:hover,.widget .shariff .theme-grey a:hover,.widget .shariff .theme-round a:hover{color:#fff;font-weight:400}.shariff-warning{background-color:red;color:#fff;font-size:20px;font-weight:700;padding:10px;text-align:center;margin:0 auto;line-height:1.5}.shariff .info a{border:1px solid #ddd;width:35px}.shariff .shariff-button.info{width:35px;flex:0 0 auto !important}.shariff .theme-default .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .theme-round .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .buttonsize-small .shariff-button.info{width:25px}.shariff .buttonsize-small .info a{width:25px}.shariff .buttonsize-large .shariff-button.info{width:45px}.shariff .buttonsize-large .info a{width:45px}.shariff .info .shariff-icon svg{display:block;margin:auto}@media only screen and (max-width:360px){.shariff .shariff-buttons li{width:35px}.shariff .shariff-buttons.buttonsize-small li{width:25px}.shariff .shariff-buttons.buttonsize-large li{width:45px}.shariff .shariff-buttons .shariff-icon svg{display:block;margin:auto}.shariff .shariff-buttons .shariff-count{display:none}.shariff .shariff-buttons .shariff-text{display:none}}@media only screen and (min-width:361px){.shariff .shariff-buttons li{width:90px}.shariff .shariff-buttons.buttonsize-large li{width:130px}}@media only screen and (min-width:768px){.shariff .shariff-buttons li{width:130px}.shariff .shariff-buttons.buttonsize-small li{width:105px}.shariff .shariff-buttons.buttonsize-large li{width:155px}.shariff .shariff-buttons li .shariff-text{display:inline}}@media only screen and (min-device-width:1025px){.shariff .shariff-mobile{display:none !important}}
1
+ .shariff{display:block !important;clear:both}.shariff ul{display:flex;flex-direction:row;flex-flow:row wrap;padding:0 !important;margin:0 !important}.shariff li{height:35px;box-sizing:border-box;list-style:none !important;overflow:hidden !important;margin:5px !important;padding:0 !important;text-indent:0 !important;border-left:0 none !important}.shariff a{position:relative;display:block !important;height:35px;padding:0;margin:0;box-sizing:border-box;border:0;text-decoration:none;background-image:none !important;text-align:left;box-shadow:none;cursor:pointer}.shariff a:hover{color:#fff;background-color:inherit !important;text-decoration:none !important}.shariff a:visited{color:inherit}.shariff .shariff-count{position:absolute;height:33px;top:0;right:0;margin:1px;padding:0 8px;background-color:rgba(255,255,255,0.5)}.shariff .shariff-count,.shariff .shariff-text{font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:36px;vertical-align:top}.shariff .shariff-text{padding-left:3px}.shariff .shariff-icon svg{width:32px;height:20px;padding:7px 1px;box-sizing:content-box}.shariff-button::before{content:none !important}.shariff .shariff-buttons .shariff-text-white{color:#fff}.shariff .shariff-buttons .shariff-hidezero{opacity:0}.shariff .theme-default a{color:#fff !important}.shariff .theme-default .shariff-icon svg path{fill:#fff}.shariff .theme-color .shariff-count{background-color:transparent !important;color:#fff !important}.shariff .theme-color .shariff-icon svg path{fill:#fff}.shariff .theme-grey a{background-color:#b0b0b0 !important}.shariff .theme-grey a:hover{background-color:inherit !important}.shariff .theme-grey .shariff-count{background-color:transparent;color:#fff !important}.shariff .theme-grey .shariff-icon svg path{fill:#fff}.shariff .theme-white a{background-color:#fff !important;border:1px solid #ddd}.shariff .theme-white a:hover{background-color:#eee !important;color:inherit}.shariff .theme-white svg{fill:currentColor}.shariff .theme-white .shariff-count{background-color:transparent;margin:0}.shariff .shariff-buttons.theme-round li{width:35px !important;height:35px;border-radius:50%;margin:5px}.shariff .theme-round a{position:relative;height:35px;border-radius:50%}.shariff .theme-round .shariff-icon svg{display:block;margin:auto;padding:8px 1px}.shariff .theme-round .shariff-text{display:block}.shariff .theme-round .shariff-count{display:inline;padding:0;right:0;left:0;top:0;background-color:transparent;color:transparent !important;text-align:center}.shariff .theme-round .shariff-count:hover{background-color:inherit !important;color:#fff !important}.shariff .theme-round .shariff-icon svg path{fill:#fff}.shariff .shariff-buttons.buttonsize-small li{height:25px !important}.shariff .shariff-buttons.buttonsize-small a{height:25px !important}.shariff .shariff-buttons.buttonsize-small.orientation-vertical li{width:115px}.shariff .shariff-buttons.buttonsize-small .shariff-icon svg{width:22px;height:15px;padding:5px 1px}.shariff .shariff-buttons.buttonsize-small .shariff-text,.shariff .shariff-buttons.buttonsize-small .shariff-count{font-size:11px;line-height:25px;padding:0 5px;height:23px}.shariff .shariff-buttons.buttonsize-small .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-small.theme-round li{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round a{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round .shariff-count{padding:0 !important;height:25px !important}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li{margin:5px 7px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:first-child{margin-left:5px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:last-child{margin-right:5px}.shariff .buttonsize-large li{height:45px !important}.shariff .buttonsize-large a{height:45px !important}.shariff .buttonsize-large.orientation-vertical li{width:155px}.shariff .buttonsize-large .shariff-icon svg{width:40px;height:28px;padding:9px 2px}.shariff .buttonsize-large .shariff-text,.shariff .buttonsize-large .shariff-count{font-size:14px;line-height:45px;padding:0 10px;height:43px}.shariff .buttonsize-large .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-large.theme-round li{width:45px !important;height:45px !important}.shariff .buttonsize-large.theme-round a{width:45px !important}.shariff .buttonsize-large.theme-round .shariff-count{padding:0 !important;height:45px !important}.shariff .orientation-vertical{flex-direction:column}.shariff .orientation-vertical li{width:135px}.shariff.shariff-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.shariff.shariff-align-center ul{justify-content:center;align-items:center}.shariff.shariff-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.widget .shariff.shariff-widget-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.widget .shariff.shariff-widget-align-center ul{justify-content:center;align-items:center}.widget .shariff.shariff-widget-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.shariff.shariff-buttonstretch li{flex:1 0 auto !important}.shariff.shariff-buttonstretch .orientation-vertical li{width:100% !important}.widget .shariff li{border:0;font-weight:400}.widget .shariff .theme-default a,.widget .shariff .theme-color a,.widget .shariff .theme-grey a,.widget .shariff .theme-round a{color:#fff;display:block;font-weight:400}.widget .shariff .theme-default a:hover,.widget .shariff .theme-color a:hover,.widget .shariff .theme-grey a:hover,.widget .shariff .theme-round a:hover{color:#fff;font-weight:400}.shariff-warning{background-color:red;color:#fff;font-size:20px;font-weight:700;padding:10px;text-align:center;margin:0 auto;line-height:1.5}.shariff .info a{border:1px solid #ddd;width:35px}.shariff .shariff-button.info{width:35px;flex:0 0 auto !important}.shariff .theme-default .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .theme-round .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .buttonsize-small .shariff-button.info{width:25px}.shariff .buttonsize-small .info a{width:25px}.shariff .buttonsize-large .shariff-button.info{width:45px}.shariff .buttonsize-large .info a{width:45px}.shariff .info .shariff-icon svg{display:block;margin:auto}@media only screen and (max-width:360px){.shariff .shariff-buttons li{width:35px}.shariff .shariff-buttons.buttonsize-small li{width:25px}.shariff .shariff-buttons.buttonsize-large li{width:45px}.shariff .shariff-buttons .shariff-icon svg{display:block;margin:auto}.shariff .shariff-buttons .shariff-text{display:none}}@media only screen and (min-width:361px){.shariff .shariff-buttons li{width:90px}.shariff .shariff-buttons.buttonsize-large li{width:130px}}@media only screen and (max-width:768px){.shariff .shariff-buttons .shariff-count{display:none}}@media only screen and (min-width:768px){.shariff .shariff-buttons li{width:130px}.shariff .shariff-buttons.buttonsize-small li{width:105px}.shariff .shariff-buttons.buttonsize-large li{width:155px}.shariff .shariff-buttons li .shariff-text{display:inline}}@media only screen and (min-device-width:1025px){.shariff .shariff-mobile{display:none !important}}
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Shariff Wrapper ===
2
  Contributors: starguide, 3UU
3
  Tags: Shariff, GDPR, DSGVO, share buttons, sharing
4
- Requires at least: 4.7
5
  Requires PHP: 5.6
6
  Tested up to: 4.9
7
- Stable tag: 4.4.3
8
  License: MIT
9
  License URI: http://opensource.org/licenses/mit
10
 
@@ -168,6 +168,10 @@ These are bugs or unexpected glitches that we know of, but that do not have an i
168
 
169
  == Changelog ==
170
 
 
 
 
 
171
  = 4.4.3 =
172
  - new support for additional manual AMP integrations
173
  - fixed a PHP error on certain server configurations
1
  === Shariff Wrapper ===
2
  Contributors: starguide, 3UU
3
  Tags: Shariff, GDPR, DSGVO, share buttons, sharing
4
+ Requires at least: 4.9
5
  Requires PHP: 5.6
6
  Tested up to: 4.9
7
+ Stable tag: 4.4.4
8
  License: MIT
9
  License URI: http://opensource.org/licenses/mit
10
 
168
 
169
  == Changelog ==
170
 
171
+ = 4.4.4 =
172
+ - add support for automatic addition to bbpress forums, topics and replies
173
+ - fix a bug that caused "hideshariff" to not function properly
174
+
175
  = 4.4.3 =
176
  - new support for additional manual AMP integrations
177
  - fixed a PHP error on certain server configurations
shariff.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Shariff Wrapper
4
  * Plugin URI: https://wordpress.org/plugins-wp/shariff/
5
  * Description: Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR).
6
- * Version: 4.4.3
7
  * Author: Jan-Peter Lambeck & 3UU
8
  * Author URI: https://wordpress.org/plugins/shariff/
9
  * License: MIT
@@ -33,7 +33,7 @@ $shariff3uu = array_merge( $shariff3uu_basic, $shariff3uu_design, $shariff3uu_ad
33
  */
34
  function shariff3uu_update() {
35
  // Adjust code version.
36
- $code_version = '4.4.3';
37
 
38
  // Get options.
39
  $shariff3uu = $GLOBALS['shariff3uu'];
@@ -544,9 +544,9 @@ function shariff3uu_posts( $content ) {
544
  }
545
 
546
  // If we want to see it as text - replace the slash.
547
- if ( true === strpos( $content, '/hideshariff' ) ) {
548
  $content = str_replace( '/hideshariff', 'hideshariff', $content );
549
- } elseif ( true === strpos( $content, 'hideshariff' ) ) {
550
  // Remove the sign.
551
  $content = str_replace( 'hideshariff', '', $content );
552
  // Return the content without adding Shariff.
@@ -682,17 +682,83 @@ function shariff3uu_remove_from_rss( $content ) {
682
  }
683
  add_filter( 'the_content_feed', 'shariff3uu_remove_from_rss', 999 );
684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  /**
686
  * Adds shariff buttons after bbpress replies.
687
  */
688
- function shariff3uu_bbp_add_shariff_after_replies() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
689
  // Get options.
690
  $shariff3uu = $GLOBALS['shariff3uu'];
691
- if ( isset( $shariff3uu['add_after']['bbp_reply'] ) && 1 === $shariff3uu['add_after']['bbp_reply'] ) {
692
- echo esc_html( shariff3uu_render( array() ) );
 
693
  }
694
  }
695
- add_action( 'bbp_theme_after_reply_content', 'shariff3uu_bbp_add_shariff_after_replies' );
696
 
697
  /**
698
  * Function is called to include the shariff.css in the header of AMP pages.
3
  * Plugin Name: Shariff Wrapper
4
  * Plugin URI: https://wordpress.org/plugins-wp/shariff/
5
  * Description: Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR).
6
+ * Version: 4.4.4
7
  * Author: Jan-Peter Lambeck & 3UU
8
  * Author URI: https://wordpress.org/plugins/shariff/
9
  * License: MIT
33
  */
34
  function shariff3uu_update() {
35
  // Adjust code version.
36
+ $code_version = '4.4.4';
37
 
38
  // Get options.
39
  $shariff3uu = $GLOBALS['shariff3uu'];
544
  }
545
 
546
  // If we want to see it as text - replace the slash.
547
+ if ( false !== strpos( $content, '/hideshariff' ) ) {
548
  $content = str_replace( '/hideshariff', 'hideshariff', $content );
549
+ } elseif ( false !== strpos( $content, 'hideshariff' ) ) {
550
  // Remove the sign.
551
  $content = str_replace( 'hideshariff', '', $content );
552
  // Return the content without adding Shariff.
682
  }
683
  add_filter( 'the_content_feed', 'shariff3uu_remove_from_rss', 999 );
684
 
685
+ /**
686
+ * Adds shariff buttons after bbpress forums.
687
+ */
688
+ function shariff3uu_bbp_add_shariff_after_forum() {
689
+ // Get options.
690
+ $shariff3uu = $GLOBALS['shariff3uu'];
691
+ if ( isset( $shariff3uu['add_after']['forum'] ) && 1 === $shariff3uu['add_after']['forum'] ) {
692
+ // phpcs:ignore
693
+ echo shariff3uu_render( array() );
694
+ }
695
+ }
696
+ add_action( 'bbp_template_after_forums_loop', 'shariff3uu_bbp_add_shariff_after_forum' );
697
+
698
+ /**
699
+ * Adds shariff buttons after bbpress topics.
700
+ */
701
+ function shariff3uu_bbp_add_shariff_after_topic() {
702
+ // Get options.
703
+ $shariff3uu = $GLOBALS['shariff3uu'];
704
+ if ( isset( $shariff3uu['add_after']['topic'] ) && 1 === $shariff3uu['add_after']['topic'] ) {
705
+ // phpcs:ignore
706
+ echo shariff3uu_render( array() );
707
+ }
708
+ }
709
+ add_action( 'bbp_template_after_topics_loop', 'shariff3uu_bbp_add_shariff_after_topic' );
710
+
711
  /**
712
  * Adds shariff buttons after bbpress replies.
713
  */
714
+ function shariff3uu_bbp_add_shariff_after_reply() {
715
+ // Get options.
716
+ $shariff3uu = $GLOBALS['shariff3uu'];
717
+ if ( isset( $shariff3uu['add_after']['reply'] ) && 1 === $shariff3uu['add_after']['reply'] ) {
718
+ // phpcs:ignore
719
+ echo shariff3uu_render( array() );
720
+ }
721
+ }
722
+ add_action( 'bbp_theme_after_reply_content', 'shariff3uu_bbp_add_shariff_after_reply' );
723
+
724
+ /**
725
+ * Adds shariff buttons before bbpress forums.
726
+ */
727
+ function shariff3uu_bbp_add_shariff_before_forum() {
728
+ // Get options.
729
+ $shariff3uu = $GLOBALS['shariff3uu'];
730
+ if ( isset( $shariff3uu['add_before']['forum'] ) && 1 === $shariff3uu['add_before']['forum'] ) {
731
+ // phpcs:ignore
732
+ echo shariff3uu_render( array() );
733
+ }
734
+ }
735
+ add_action( 'bbp_template_before_forums_loop', 'shariff3uu_bbp_add_shariff_before_forum' );
736
+
737
+ /**
738
+ * Adds shariff buttons before bbpress topics.
739
+ */
740
+ function shariff3uu_bbp_add_shariff_before_topic() {
741
+ // Get options.
742
+ $shariff3uu = $GLOBALS['shariff3uu'];
743
+ if ( isset( $shariff3uu['add_before']['topic'] ) && 1 === $shariff3uu['add_before']['topic'] ) {
744
+ // phpcs:ignore
745
+ echo shariff3uu_render( array() );
746
+ }
747
+ }
748
+ add_action( 'bbp_template_before_topics_loop', 'shariff3uu_bbp_add_shariff_before_topic' );
749
+
750
+ /**
751
+ * Adds shariff buttons before bbpress replies.
752
+ */
753
+ function shariff3uu_bbp_add_shariff_before_reply() {
754
  // Get options.
755
  $shariff3uu = $GLOBALS['shariff3uu'];
756
+ if ( isset( $shariff3uu['add_before']['reply'] ) && 1 === $shariff3uu['add_before']['reply'] ) {
757
+ // phpcs:ignore
758
+ echo shariff3uu_render( array() );
759
  }
760
  }
761
+ add_action( 'bbp_theme_before_reply_content', 'shariff3uu_bbp_add_shariff_before_reply' );
762
 
763
  /**
764
  * Function is called to include the shariff.css in the header of AMP pages.