PluginProbe
Passster – Password Protect Pages and Content / 4.3.16
Passster – Password Protect Pages and Content v4.3.16
4.3.16 4.3.15 4.3.14 4.3.12 4.3.13 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 trunk 3.5.4 3.5.5.2 3.5.5.8 3.5.5.9 4.0 4.1.4 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 4.2.15 All 48 releases
← All changes | inc/freemius-setup.php +31 -0 4.3.74.3.16 View file →
@@ -40,8 +40,11 @@
40 40 function passster_fs_settings_url() {
41 41 return admin_url( 'admin.php?page=passster-settings' );
42 42 }
43 43
44 +if ( !passster_fs()->is_registered() && !passster_fs()->is_anonymous() && !passster_fs()->is_pending_activation() ) {
45 + passster_fs()->skip_connection();
46 +}
44 47 passster_fs()->add_filter( 'connect_url', 'passster_fs_settings_url' );
45 48 passster_fs()->add_filter( 'after_skip_url', 'passster_fs_settings_url' );
46 49 passster_fs()->add_filter( 'after_connect_url', 'passster_fs_settings_url' );
47 50 passster_fs()->add_filter( 'after_pending_connect_url', 'passster_fs_settings_url' );
@@ -46,8 +49,36 @@
46 49 passster_fs()->add_filter( 'after_connect_url', 'passster_fs_settings_url' );
47 50 passster_fs()->add_filter( 'after_pending_connect_url', 'passster_fs_settings_url' );
48 51 passster_fs()->add_filter( 'show_deactivation_subscription_cancellation', '__return_false' );
49 52 passster_fs()->add_filter( 'show_deactivation_feedback_form', '__return_false' );
53 +/**
54 + * Hide specific Freemius sticky admin notices.
55 + *
56 + * @param bool $show Whether the notice should be shown.
57 + * @param array $notice Notice data, includes 'id'.
58 + *
59 + * @return bool
60 + */
61 +function passster_hide_admin_notices( $show, $notice ) {
62 + $hidden_notice_ids = array(
63 + 'connect_account',
64 + // "We made a few tweaks to the plugin, Opt in to make it better!"
65 + 'premium_activated',
66 + // "W00t! Premium plugin version was successfully activated."
67 + 'plan_upgraded',
68 + );
69 + if ( in_array( $notice['id'], $hidden_notice_ids, true ) ) {
70 + return false;
71 + }
72 + return $show;
73 +}
74 +
75 +passster_fs()->add_filter(
76 + 'show_admin_notice',
77 + 'passster_hide_admin_notices',
78 + 10,
79 + 2
80 +);
50 81 /**
51 82 * Hide freemius submenus except account (for license management).
52 83 *
53 84 * @param bool $is_visible indicates if visible or not.