khromov / clarity Goto Github PK
View Code? Open in Web Editor NEWAd blocker for WordPress
Home Page: https://wp-clarity.dev
Ad blocker for WordPress
Home Page: https://wp-clarity.dev
Describe the bug
I activated the plugin, and it didn't seem to be blocking anything. I did some sniffing and deduced that WP_Clarity->getDefinitions() doesn't seem to be doing what it's supposed to. If I debug line 61, it doesn't actually give me a list of selectors, it seems to return the whole contents of defenitions.txt
The expected output, would be a comma separated selector list appended by the { display: none!important }
. The actual output isn't a valid css selector, and thus doesn't block any popups.
<style type="text/css">
-- Yoast premium nags
.wpseo_content_wrapper #sidebar-container
.yoast_premium_upsell
#wpseo-local-seo-upsell
.yoast-settings-section-upsell
-- Better WordPress ReCAPTCHA
#bwp-get-social
.bwp-button-paypal
#bwp-sidebar-right
-- TJ Custom CSS
.tjcc-custom-css #postbox-container-1
-- CBX Custom Taxonomy Filter
.settings_page_wpcustomtaxfilterinadmin #postbox-container-1
-- Duplicate Posts
.settings_page_duplicatepost #wpbody-content .wrap > div
-- TODO: :above: look over
-- WPS Hide Login
div[id^="dnh-wrm"]
-- Ad Inserter
.notice-info.dst-notice
-- googleanalytics
#googleanalytics_terms_notice
-- Unyson
.fw-brz-dismiss
-- Elementor
div.elementor-message[data-notice_id="elementor_dev_promote"]
-- Redirection for Contact Form 7
.notice-success.wpcf7r-notice
-- Disable Comments
.dc-text__block.disable__comment__alert
-- Admin Menu Editor
#ws_sidebar_pro_ad
-- Premium Addons for Elementor
.pa-new-feature-notice
-- Redux
#redux-connect-message
-- Smush
.frash-notice-email
-- Easy Updates Manager
#easy-updates-manager-dashnotice
-- Metaslider
#metaslider-optin-notice
#extendifysdk_announcement
.updraft-ad-container
-- WP User Avatar "recommends" MailOption
.mo-admin-notice
-- post-smtp-donation
.post-smtp-donation
-- Widget Area Block
div[data-dismissible="notice-owa-sale-forever"]
-- Themeisle Companion
.neve-notice-upsell
-- Pagelayer Pro promo
#pagelayer_promo
-- Simple Custom Post Order rate nag
#simple-custom-post-order-epsilon-review-notice
-- Ultimate Social Media icons nags in various places
.sfsi_new_prmium_follw
-- The Events Calendar analytics nag
div.fs-slug-the-events-calendar[data-id="connect_account"]
-- WebP Converter for Media
div.notice[data-notice="webp-converter-for-media"]
.webpLoader__popup.webpPopup
-- Generic "Plugin Usage Tracker" class
.put-dismiss-notice
-- WP Mail SMTP
.wp-mail-smtp-review-notice
#wp-mail-smtp-pro-banner
-- Hopefully most Freemius ads
body div.promotion.fs-notice
-- Analytify
.analytify-review-thumbnail
-- Jetpack
.jitm-banner.is-upgrade-premium
-- Webcraftic Local Google Analytics
div[data-name*="wbcr_factory_notice_adverts"]
-- Forminator
.sui-subscription-notice
#sui-cross-sell-footer
.sui-cross-sell-modules {
display: none !important;
}
</style>
To Reproduce
Activate the plugin and look at the style block in devtools
Information
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/accessibility-checker/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.wp-core-ui .notice.is-dismissible {
display: none;
}
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/duplicate-post/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
#duplicate-post-notice
Not sure what other notices might use the id #duplicate-post-notice, there isn't a class that's specific to this call to action.
ManageWP or GoDaddy Pro dashboard
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
https://wordpress.org/plugins/codepress-admin-columns/
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/ti-woocommerce-wishlist/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.tinvwl-admin-notice
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/ml-slider/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.ml-discount-ad
The .updraft-ad-container class is used by Updraft on the Updates screen. Having it in the block list disables the ability to change backup options when updating.
https://github.com/khromov/clarity/blob/master/definitions.txt#L63
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning?
AnWP Post Grid and Post Carousel Slider for Elementor
https://fr.wordpress.org/plugins/anwp-post-grid-for-elementor/
When does the nag appear?
All the time in admin pages
Do you have a proposed CSS rule that could hide this nag?
.anwp-post-grid__rate.notice-info.notice
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning?
https://wordpress.org/plugins/product-variation-swatches-for-woocommerce/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
#thwvsf_review_request_notice
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/custom-facebook-feed/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.cff_notice.cff_review_notice_step_1
.cff_get_pro_highlight
.cff-notice-alert
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Hi there,
Are you open for a PR that allows to add the ability to add your own definitions without the need to re-build the definitions.php
.
Because currently wp_clarity_rules
- which I'm using -, only runs after you built the plugin's definitions.php
. And that logic just doesn't hold up because it gets overwritten with an plugin update.
And I don't want to run the command to generate the definitions after each deployment (manually or by hand).
Also, sometimes I can't run a wp-cli command.
It could be as simple as making $loadFromSource
filterable on the line https://github.com/khromov/clarity/blob/master/clarity-ad-blocker.php#L37. Otherwise it would need a bit more work / rewrite.
Ciao,
Jaime
https://fr.wordpress.org/plugins/members/
When does the nag appear?
All the time in admin pages
Do you have a proposed CSS rule that could hide this nag?
.members-review-notice.is-dismissible.notice-info.notice
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
[Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://fr.wordpress.org/plugins/wordpress-seo/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.is-dismissible.notice-warning.notice.yoast-notification
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/bold-timeline-lite/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
All of the time, on ever page load
Do you have a proposed CSS rule that could hide this nag?
No
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? : https://wordpress.org/plugins/woo-billing-with-invoicexpress/#:~:text=%E2%80%9CInvoicing%20with%20InvoiceXpress%20for%20WooCommerce,via%20email%20to%20the%20client.
(https://photos.app.goo.gl/yRRKNotqUPSZ3r3h8)
When does the nag appear?
always shows up event after closing
Do you have a proposed CSS rule that could hide this nag?
no
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Filebird
(https://wordpress.org/plugins/filebird/)
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
div#njt-FileBird-review
[Which plugin is this concerning?] - Please include a link to the listing page on WordPress.org (https://ru.wordpress.org/plugins/pretty-link/)
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
] #prli_review_notice
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/custom-facebook-feed/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.cff-settings-cta
Which plugin is this concerning?
https://wordpress.org/plugins/duplicate-post/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
#duplicate-post-notice
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
https://wordpress.org/plugins/elementskit-lite/
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
I do not know when it appears for a new user. This has been on my site for years, but the ad showed up recently.
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
It is an image link: https://api.wpmet.com/auth/wp-content/uploads/2022/05/InPlugin-Banner-1.gif
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/tabs-responsive/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.wpsm_ac_h_i
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/wp-smushit/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
There is already an entry for smush email notices.
-- Smush
.frash-notice-email
I propose we add an additional rule for the "rating" prompt
.frash-notice-rate
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://www.exactmetrics.com/ (They do not have a page on wordpress.org that I could find.)
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
These "informative messages" (advertisements) appear on the Dashboard as soon as you login. They are constant with this plugin (there were over 20 in 5 days! And each must be manually dismissed) -- and there are so many they sometimes cover up the entire right side of the screen.
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
Here is the CSS rule that covers these popups.
.exactmetrics-tracking-notice p {
font-size: 12px;
color: #7f7f7f;
font-weight: 400;
margin: 0;
padding: 0;
line-height: 1.2;
border: none;
}
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/betterdocs/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.wpdeveloper-review-notice
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
https://wordpress.org/plugins/iworks-pwa/
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
.notice-iworks-rate
https://quadlayers.com/portfolio/woocommerce-direct-checkout/?utm_source=aco_admin
https://quadlayers.com/portfolio/woocommerce-direct-checkout/?utm_source=wooccm_admin
Both ads are on wp-admin for my site
Always shows in wp admin Dashboard. Closing the ad does not make it stay away.
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Do you have a proposed CSS rule that could hide this nag?
Propose the following to definitions.txt
--Woocommerce Checkout Field Editor
.thwcfd-review-wrapper
--Premmerce WooCommerce Product Filter Premium
.woo-permalink-manager-banner
-- Cartbounty
.cartbounty-notification
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://wordpress.org/plugins/wordpress-seo/]
wordpress.org/plugins/google-analytics-dashboard-for-wp/
Upload a screenshot from your WordPress admin where the nag is clearly visible
(Drag an image here to upload it)
When does the nag appear?
Immediately on LOGIN.
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
No.
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
Which plugin is this concerning? - Please include a link to the listing page on WordPress.org
[e.g https://products.wpmet.com/metform/]
Upload a screenshot from your WordPress admin where the nag is clearly visible
When does the nag appear?
Do you have a proposed CSS rule that could hide this nag?
[e.g #ws_sidebar_pro_ad
]
.metform-unsupported-metform-pro-version
.wp-core-ui .notice.is-dismissible{
display: none;
}
*(You can usually find the associated CSS by right-clicking the notification bar in your browser and selecting "Inspect element".)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.