Advertisement
designbymerovingi

Untitled

Sep 19th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Plugin Name: PRMascot
  4.  * Description: A custom plugin for PRMascot
  5.  * Version: 1.0.4
  6.  * Tags: custom
  7.  * Author: Jason Hogan
  8.  * Author URI: https://www.prmascot.com/
  9.  */
  10.  
  11. /**
  12. /**
  13.  * Disable Notifications Addon
  14.  * @since 1.0
  15.  * @version 1.0.2
  16.  */
  17. function mycred_pro_disable_notice_addon( $modules ) {
  18.  
  19.     if ( get_current_blog_id() != get_network()->site_id && array_key_exists( 'notices', $modules['solo'] ) ) {
  20.         unset( $modules['solo']['notices'] );
  21.     }
  22.  
  23.     return $modules;
  24.  
  25. }
  26. add_filter( 'mycred_load_modules', 'mycred_pro_disable_notice_addon', 999 );
  27.  
  28. /**
  29.  * Disable Notifications
  30.  * @since 1.0.3
  31.  * @version 1.0
  32.  */
  33. function mycred_pro_disable_notices( $content ) {
  34.  
  35.     if ( get_current_blog_id() != get_network()->site_id )
  36.         return '';
  37.  
  38.     return $content;
  39.  
  40. }
  41. add_filter( 'mycred_notifications_note', 'mycred_pro_disable_notices' );
  42.  
  43. /**
  44.  * Disable Points for Viewing Content Hook
  45.  * @since 1.0.4
  46.  * @version 1.0
  47.  */
  48. function mycred_pro_disable_view_content_hook( $run ) {
  49.  
  50.     if ( $run && get_current_blog_id() != get_network()->site_id )
  51.         return false;
  52.  
  53.     return $run;
  54.  
  55. }
  56. add_filter( 'mycred_view_content', 'mycred_pro_disable_view_content_hook' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement