Skip to content

Commit 3b2a953

Browse files
fix: remove all other notices on plugin pages (#1100)
- Remove all notices on the page except `fz-notice` and `themeisle-sale` (Black Friday) - Previously, the CSS page was loaded on all the pages! Now it is restricted to our plugin pages.
1 parent 4667c25 commit 3b2a953

File tree

5 files changed

+119
-57
lines changed

5 files changed

+119
-57
lines changed

css/feedzy-rss-feed-import.css

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Author: Themeisle
99
*/
1010

11-
#feedzy_import_feeds{
11+
#feedzy_import_feeds {
1212
background: transparent;
1313
border: 0;
1414
box-shadow: none;
@@ -18,57 +18,70 @@
1818
padding-right: 12px;
1919
box-sizing: border-box;
2020
}
21-
#feedzy_import_feeds > .postbox-header{
21+
22+
#feedzy_import_feeds>.postbox-header {
2223
display: none;
2324
}
24-
.post-type-feedzy_imports:not(.edit-php) .page-title-action, .post-type-feedzy_imports:not(.edit-php) .wp-heading-inline {
25+
26+
.post-type-feedzy_imports:not(.edit-php) .page-title-action,
27+
.post-type-feedzy_imports:not(.edit-php) .wp-heading-inline {
2528
display: none !important;
2629
}
27-
.post-type-feedzy_imports:not(.edit-php) #wpcontent{
30+
31+
.post-type-feedzy_imports:not(.edit-php) #wpcontent {
2832
padding-left: 0;
2933
}
30-
.post-type-feedzy_imports:not(.edit-php) #post-body-content{
34+
35+
.post-type-feedzy_imports:not(.edit-php) #post-body-content {
3136
display: none;
3237
}
33-
.post-type-feedzy_imports:not(.edit-php) .wrap{
38+
39+
.post-type-feedzy_imports:not(.edit-php) .wrap {
3440
margin-top: 0;
3541
margin-right: 0;
3642
}
37-
.post-type-feedzy_imports:not(.edit-php) .wrap > .wp-heading-inline,
38-
.post-type-feedzy_imports:not(.edit-php) .wrap > .wp-header-end{
43+
44+
.post-type-feedzy_imports:not(.edit-php) .wrap>.wp-heading-inline,
45+
.post-type-feedzy_imports:not(.edit-php) .wrap>.wp-header-end {
3946
display: none;
4047
}
41-
.post-type-feedzy_imports:not(.edit-php) #poststuff{
48+
49+
.post-type-feedzy_imports:not(.edit-php) #poststuff {
4250
padding-top: 0;
4351
}
44-
.post-type-feedzy_imports:not(.edit-php) #poststuff .inside{
52+
53+
.post-type-feedzy_imports:not(.edit-php) #poststuff .inside {
4554
margin-top: 0;
4655
padding-left: 0;
4756
padding-right: 0;
4857
}
49-
.post-type-feedzy_imports:not(.edit-php) #poststuff #post-body.columns-2{
58+
59+
.post-type-feedzy_imports:not(.edit-php) #poststuff #post-body.columns-2 {
5060
margin-right: 0;
5161
}
52-
.post-type-feedzy_imports:not(.edit-php) #post-body.columns-2 #postbox-container-1{
62+
63+
.post-type-feedzy_imports:not(.edit-php) #post-body.columns-2 #postbox-container-1 {
5364
width: 100%;
5465
float: none;
5566
}
67+
5668
.feedzy_page_feedzy-settings #wpcontent,
5769
.feedzy_page_feedzy-support #wpcontent,
58-
.feedzy_page_feedzy-integration #wpcontent{
70+
.feedzy_page_feedzy-integration #wpcontent {
5971
padding-left: 0;
6072
}
73+
6174
.feedzy_page_feedzy-settings .feedzy-header,
6275
.feedzy_page_feedzy-support .feedzy-header,
63-
.feedzy_page_feedzy-integration .feedzy-header{
76+
.feedzy_page_feedzy-integration .feedzy-header {
6477
margin-bottom: 40px;
6578
}
6679

6780
.feedzy-error-critical {
6881
color: #ff0000;
6982
}
7083

71-
tr.feedzy-import-status-row > td {
84+
tr.feedzy-import-status-row>td {
7285
margin: 0;
7386
padding: 0
7487
}
@@ -140,47 +153,60 @@ td.feedzy-has-popup {
140153
.feedzy-onboarding-modal {
141154
max-width: 350px;
142155
}
156+
143157
.feedzy-onboarding-modal .components-modal__header {
144158
text-align: center;
145159
}
160+
146161
.feedzy-onboarding-modal .components-modal__header h1 {
147162
width: 100%;
148163
}
164+
149165
.feedzy-onboarding-modal .feedzy-onboarding-modal-content {
150166
text-align: center;
151167
margin: 10px 0 15px;
152168
}
169+
153170
.feedzy-onboarding-modal .feedzy-onboarding-modal-action {
154171
text-align: center;
155172
margin: 10px 0;
156173
}
174+
157175
.feedzy-onboarding-modal .feedzy-onboarding-modal-action .components-button {
158176
padding: 2px 20px;
159177
font-size: 14px;
160178
margin-right: 10px;
161179
}
180+
162181
.components-modal__screen-overlay {
163182
background-color: rgba(0, 0, 0, 0.5);
164183
}
184+
165185
.react-joyride__tooltip {
166186
font-size: 13px !important;
167187
}
168-
.react-joyride__tooltip > div {
188+
189+
.react-joyride__tooltip>div {
169190
text-align: left !important;
170191
}
171-
.react-joyride__tooltip div:nth-of-type( 2) {
192+
193+
.react-joyride__tooltip div:nth-of-type(2) {
172194
margin-top: 5px !important;
173195
}
196+
174197
.react-joyride__tooltip button {
175198
text-decoration: underline;
176199
}
200+
177201
.react-joyride__beacon span:first-child {
178202
background-color: #4268CF !important;
179203
}
204+
180205
.react-joyride__beacon span:last-child {
181206
background-color: rgba(66, 104, 207, 0.4) !important;
182207
border: 2px solid #4268CF !important;
183208
}
209+
184210
.react-joyride__tooltip button[data-action="primary"] {
185211
background: #4268cf !important;
186212
border-color: #006a95 #00648c #00648c !important;
@@ -193,20 +219,25 @@ td.feedzy-has-popup {
193219
line-height: 28px !important;
194220
font-size: 14px !important;
195221
}
222+
196223
.react-joyride__tooltip button[data-action="back"] {
197224
color: #23282d !important;
198225
font-size: 14px !important;
199226
}
227+
200228
.react-notification-root .notification-container-bottom-left {
201229
bottom: 40px;
202230
}
231+
203232
.react-notification-root .notification-container-mobile-bottom {
204233
bottom: 60px;
205234
}
235+
206236
.feedzy-onboarding-modal-action .components-button.is-primary,
207237
.feedzy-onboarding-modal-action .components-button.is-primary:hover:not(:disabled) {
208238
background: #4268cf;
209239
}
240+
210241
.feedzy-onboarding-modal-action .components-button.is-secondary,
211242
.feedzy-onboarding-modal-action .components-button.is-secondary:hover:not(:disabled),
212243
.feedzy-onboarding-modal-action .components-button.is-tertiary:hover:not(:disabled) {
@@ -279,6 +310,11 @@ i.mce-i-feedzy-icon {
279310
text-align: center;
280311
}
281312

313+
/* NOTE: It will also exclude the Black Friday notice. */
314+
.notice:not(.fz-notice):not(.themeisle-sale) {
315+
display: none;
316+
}
317+
282318
@media screen and (max-width: 782px) {
283319
tr.feedzy-import-status-row table {
284320
width: 100%;

includes/admin/feedzy-rss-feeds-admin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ function closeModal(e) {
426426
</script>
427427
<div id="feedzy-add-new-import" class="wp-core-ui feedzy-modal" style="display:none;">
428428
<div class="modal-content">
429-
<button type="button" class="notice-dismiss close-modal">
429+
<button type="button" class="notice-dismiss fz-notice close-modal">
430430
<span class="screen-reader-text"><?php esc_html_e( 'Dismiss this dialog', 'feedzy-rss-feeds' ); ?></span>
431431
</button>
432432
<div class="modal-header">
@@ -456,7 +456,7 @@ class="button button-primary button-large"><?php esc_html_e( 'Upgrade to PRO', '
456456
?>
457457
<div id="feedzy-renew-edit" class="wp-core-ui feedzy-modal" style="display:none;">
458458
<div class="modal-content">
459-
<button type="button" class="notice-dismiss close-modal">
459+
<button type="button" class="notice-dismiss fz-notice close-modal">
460460
<span class="screen-reader-text"><?php esc_html_e( 'Dismiss this dialog', 'feedzy-rss-feeds' ); ?></span>
461461
</button>
462462
<div class="modal-header">
@@ -481,7 +481,7 @@ class="button button-secondary button-large"><?php esc_html_e( 'Activate License
481481
</div>
482482
<div id="feedzy-clone-modal" class="wp-core-ui feedzy-modal" style="display:none;">
483483
<div class="modal-content">
484-
<button type="button" class="notice-dismiss close-modal">
484+
<button type="button" class="notice-dismiss fz-notice close-modal">
485485
<span class="screen-reader-text"><?php esc_html_e( 'Dismiss this dialog', 'feedzy-rss-feeds' ); ?></span>
486486
</button>
487487
<div class="modal-header">
@@ -1441,7 +1441,7 @@ public function get_source_validity_error( $message = '', $post = '', $css_class
14411441

14421442
if ( $invalid ) {
14431443
if ( empty( $css_class ) ) {
1444-
$css_class = 'notice notice-error notice-alt feedzy-error-critical';
1444+
$css_class = 'notice notice-error notice-alt fz-notice feedzy-error-critical';
14451445
}
14461446
$message .= '<div class="' . $css_class . '"><p style="color: inherit"><i class="dashicons dashicons-warning"></i>' . $text . ': <ol style="color: inherit">';
14471447
foreach ( $invalid as $url ) {
@@ -2215,7 +2215,7 @@ public function add_banner_anchor() {
22152215
add_action(
22162216
'admin_notices',
22172217
function () {
2218-
echo '<div id="tsdk_banner" class="notice feedzy-banner-dashboard"></div>';
2218+
echo '<div id="tsdk_banner" class="notice fz-notice feedzy-banner-dashboard"></div>';
22192219
},
22202220
999
22212221
);

0 commit comments

Comments
 (0)