PluginProbe
Datafeedr API / 1.4.3
Datafeedr API v1.4.3
1.4.3 1.4.2 1.0.125 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.3 1.0.30 1.0.31 1.0.32 All 182 releases
← All changes | hooks/admin/admin-notices.php +32 -0 1.4.2 → 1.4.3 View file →
@@ -8,8 +8,12 @@
8 8 * @return void
9 9 */
10 10 function dfrapi_excessive_merchants_selected_admin_notice() {
11 11
12 + if ( ! current_user_can( 'manage_options' ) ) {
13 + return;
14 + }
15 +
12 16 $merchant_count = dfrapi_selected_merchant_count();
13 17
14 18 if ( $merchant_count < DFRAPI_EXCESSIVE_MERCHANT_COUNT ) {
15 19 return;
@@ -36,8 +40,12 @@
36 40 * @return void
37 41 */
38 42 function dfrapi_datafeedr_api_keys_do_not_exist_notice() {
39 43
44 + if ( ! current_user_can( 'manage_options' ) ) {
45 + return;
46 + }
47 +
40 48 if ( dfrapi_datafeedr_api_keys_exist() ) {
41 49 return;
42 50 }
43 51
@@ -60,8 +68,12 @@
60 68 * @return void
61 69 */
62 70 function dfrapi_no_networks_selected_admin_notice() {
63 71
72 + if ( ! current_user_can( 'manage_options' ) ) {
73 + return;
74 + }
75 +
64 76 // Don't display notice if at least one network has been selected.
65 77 if ( dfrapi_user_has_selected_networks() ) {
66 78 return;
67 79 }
@@ -90,8 +102,12 @@
90 102 * @return void
91 103 */
92 104 function dfrapi_no_merchants_selected_admin_notice() {
93 105
106 + if ( ! current_user_can( 'manage_options' ) ) {
107 + return;
108 + }
109 +
94 110 // Don't display notice if at least one merchant has been selected.
95 111 if ( dfrapi_user_has_selected_merchants() ) {
96 112 return;
97 113 }
@@ -125,8 +141,12 @@
125 141 * @return void
126 142 */
127 143 function dfrapi_api_usage_over_90_percent_admin_notice() {
128 144
145 + if ( ! current_user_can( 'manage_options' ) ) {
146 + return;
147 + }
148 +
129 149 if ( ! dfrapi_api_usage_over_90_percent() ) {
130 150 return;
131 151 }
132 152
@@ -149,8 +169,12 @@
149 169 * @return void
150 170 */
151 171 function dfrapi_user_is_missing_affiliate_ids_admin_notice() {
152 172
173 + if ( ! current_user_can( 'manage_options' ) ) {
174 + return;
175 + }
176 +
153 177 if ( ! dfrapi_user_is_missing_affiliate_ids() ) {
154 178 return;
155 179 }
156 180
@@ -178,8 +202,12 @@
178 202 * @return void
179 203 */
180 204 function dfrapi_unapproved_partnerize_merchants_selected() {
181 205
206 + if ( ! current_user_can( 'manage_options' ) ) {
207 + return;
208 + }
209 +
182 210 global $wpdb;
183 211
184 212 // Get Partnerize Network IDs
185 213 $partnerize_network_ids = dfrapi_get_partnerize_network_ids();
@@ -257,8 +285,12 @@
257 285 *
258 286 * @return void
259 287 */
260 288 function dfrapi_unapproved_effiliation_merchants_selected() {
289 +
290 + if ( ! current_user_can( 'manage_options' ) ) {
291 + return;
292 + }
261 293
262 294 global $wpdb;
263 295
264 296 // Get range of Effiliation Network IDs