Comments (2)
Relevant code checks if the short-code is already called:
if ( $input['link_position'] === 'message' && strpos( $input['message_text'], '[cookies_policy_link' ) === false )
$input['message_text'] .= ' [cookies_policy_link]';
and the short-code accepts a class argument
// defaults
$defaults = array(
'title' => esc_html( $options['see_more_opt']['text'] !== '' ? $options['see_more_opt']['text'] : '➜' ),
'link' => ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ),
'class' => $options['css_class']
);
// combine shortcode arguments
$args = shortcode_atts( $defaults, $args );
So an immediate fix is to just call the shortcode in the message with a parameter (any class will do to avoid the default kicking in) [cookies_policy_link class="text-link"]
.
However, the menu clearly calls it button class - and there's a button wrapper for buttons and this link is not in it.
Maybe we could document that the short-code takes an optional class parameter?
from cookie-notice.
As for the alignment issue in the screenshot shown earlier...
The wrapper for the buttons is new - before it was flatter - so I used Grid to style it, which now broke - but it's a good change on your end!
And on mine, this restores what I had:
#cn-notice-buttons {
display: contents;
}
Except for the specificity war. Adding an id in front of the selectors #cookie-notice .cookie-notice-container
broke a bunch of my stuff (easily fixed on my end by adding #cookie-notice
in front of my styles as well, but annoying).
#
is an _ aggressive_ level of specificity even without adding extra class things on top. I'm assuming it's because you use #cookie-notice
for JS somewhere? It only has either .cn-bottom
or the other one as class. Just give it cookie-notice
also as additional class (to use for CSS).
So, in conclusion, managed to resolve the issues I had on my end.
BUT I do recommend changing the styles to be less dramatic so that users can overwrite them more easily if they chose to. :)
from cookie-notice.
Related Issues (20)
- [Feature Request] add filter to the cookieDomain param HOT 1
- noopener in the custom link of the read more buttom HOT 1
- Cookie text not readable on mobile devices
- Exclude cookie notice on some pages HOT 2
- The cookie bar breaks responsive compatibility
- wp-super-cache integration needs refining HOT 1
- wpsc_add_cookie called on init causes corruption
- Version on GitHub does not match version on WP.org SVN
- Banner Text Extends Off Viewport
- Footer option enable, but script and css are loaded immediately HOT 1
- Not possible to close bar using iPhone & iPad
- Use translated versions of Privacy Policy that are set from Polylang
- "Close" allows Tracking HOT 2
- A bunch of translations and html output are not escaped
- SameSite attribute default to Lax
- __tcfapi
- Corona bar text string not translated WPML
- 2 Privacy Policy Buttons Displayed
- Uncaught TypeError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookie-notice.