diff --git a/src/Modules/Dashboard_widget.php b/src/Modules/Dashboard_widget.php index 384dc919..9b778204 100644 --- a/src/Modules/Dashboard_widget.php +++ b/src/Modules/Dashboard_widget.php @@ -72,7 +72,9 @@ public function can_load( $product ) { * @return Dashboard_Widget Module instance. */ public function load( $product ) { - + if ( apply_filters( 'themeisle_sdk_hide_dashboard_widget', false ) ) { + return; + } $this->product = $product; $this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' ); $this->feeds = apply_filters( diff --git a/src/Modules/Licenser.php b/src/Modules/Licenser.php index ec4f1ce6..a2cd8ef4 100644 --- a/src/Modules/Licenser.php +++ b/src/Modules/Licenser.php @@ -89,6 +89,9 @@ public function register_settings() { if ( ! is_admin() ) { return false; } + if ( apply_filters( $this->product->get_key() . '_hide_license_field', false ) ) { + return; + } add_settings_field( $this->product->get_key() . '_license', $this->product->get_name() . ' license', @@ -226,6 +229,10 @@ function show_notice() { if ( ! is_admin() ) { return false; } + + if ( apply_filters( $this->product->get_key() . '_hide_license_notices', false ) ) { + return; + } $status = $this->get_license_status(); $no_activations_string = apply_filters( $this->product->get_key() . '_lc_no_activations_string', 'No activations left for %s !!!. You need to upgrade your plan in order to use %s on more websites. Please ask the %s Staff for more details.' ); $no_valid_string = apply_filters( $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add your license code from your purchase history and validate it here. ' ); diff --git a/src/Modules/Notification.php b/src/Modules/Notification.php index d6a19744..b7b69c6e 100644 --- a/src/Modules/Notification.php +++ b/src/Modules/Notification.php @@ -430,6 +430,9 @@ function ( $value ) { * @return Notification Module instance. */ public function load( $product ) { + if ( apply_filters( 'themeisle_sdk_hide_notifications', false ) ) { + return; + } $this->product = $product; $notifications = apply_filters( 'themeisle_sdk_registered_notifications', [] ); diff --git a/src/Modules/Uninstall_feedback.php b/src/Modules/Uninstall_feedback.php index 04ac27e6..ccc6ca2a 100644 --- a/src/Modules/Uninstall_feedback.php +++ b/src/Modules/Uninstall_feedback.php @@ -836,6 +836,11 @@ public function can_load( $product ) { * @return Uninstall_Feedback Current module instance. */ public function load( $product ) { + + if ( apply_filters( $product->get_key() . '_hide_uninstall_feedback', false ) ) { + return; + } + $this->product = $product; add_action( 'admin_head', array( $this, 'load_resources' ) ); add_action( 'wp_ajax_' . $this->product->get_key() . '_uninstall_feedback', array( $this, 'post_deactivate' ) );