The dark mode settings depend on the theme/”dark mode plugin” installed. Which one do you use?
My theme has both dark and light modes, which apply depending on the mode the device is in. Can you apply this to your plugin?
What is the Theme name, where can I download it for testing?
I know all of that. Different plugins and themes add different classes to different elements to turn on dark theme.
Can you provide a link to a page using your custom theme with dark mode switcher?
I added you on Skype, can I send link there?
I have added dark mode support for
WP 2021 theme
WP Dark Mode plugin
WP Droit plugin
As your theme is custom, I cannot include support for it in the plugin with 50,000+ installs. Instead, I have added a JS filter, which can be used to follow dark mode settings on your website.
When v3.5.0 is released, you can set Auto for the hCaptcha theme on the General settings page.
After that, you can add the following file to your wp-content/mu-plugins folder. You should see dark hCaptcha in a dark theme, then.
<?php
function my_print_scripts() {
?>
<script>
document.addEventListener( 'DOMContentLoaded', function() {
const callback = ( darkData ) => {
darkData['blog-stream'] = {
// Blogstream theme.
darkStyleId: 'blogstream-style-css',
darkElement: document.body,
darkClass: 'dark',
};
console.log( 'Data added.' );
return darkData;
};
window.hCaptcha.hooks.addFilter( 'hcaptcha.darkData', 'hcaptcha', callback );
} );
</script>
<?php
}
add_action( 'wp_print_scripts', 'my_print_scripts' );
-
This reply was modified 2 years, 6 months ago by
kaggdesign.
-
This reply was modified 2 years, 6 months ago by
kaggdesign.