Bernhard Kau
Forum Replies Created
-
Forum: Plugins
In reply to: [Language Fallback] Fails with WooCommece when User logged inHi Ingo!
It’s hard to debug such a case, when you are using a WooCommerce site with some (potential third-party) plugins, and it only occurs for logged-in users.
My advice would be to use this alternative plugin: https://www.ads-software.com/plugins/preferred-languages/
It is currently in the phase to be merged into core, at which point my plugin is not needed anymore. So I would suggest you give it a try now.Forum: Plugins
In reply to: [Antispam Bee] PHP-ProzesseHallo @monetenfuchs
Antispam Bee selbst startet keine eigenen PHP-Prozesse. Es wird lediglich ein WP-Cron angelegt, der einmal am Tag Spam-Kommentare l?scht.
Da vorher eine PHP-Umstellung passiert ist, k?nnte ich mir allerdings vorstellen, dass es noch alte PHP-Prozesse gab. Wie diese allerdings mit Antispam Bee zu tun haben sollen, kann ich mir nicht erkl?ren.
Ich selbst habe Antispam Bee auf verschiedenen Servern ebenfalls mit PHP 8.2 laufen und kann keine solchen Probleme feststellen.
Konnte der Provider denn etwas zu der Thematik sagen?
Forum: Plugins
In reply to: [Campaign Archive Block for Mailchimp] shortcodeHi @ibaan,
this is specifically a (Gutenberg) block plugin. It was never my goal to also have it as a shortcode as well, as this would go against it being a Block Only Plugin.
I’m not really familiar with WP Bakery. There might be a plugin/extension you can install to use Gutenberg blocks in your code. This would probably the best approach, if something like this exists.
If not, you could download version 1.0.3 of the plugin, that still has the settings page: https://www.ads-software.com/plugins/campaign-archive-block-for-mailchimp/advanced/You could then add this code to a plugin (or your
functions.php
file) to create your own shortcode:add_shortcode( 'cabfm', function () { return (new CABFM\Blocks\CampaignArchive())->render_block([ 'itemsToShow' => 7, 'campaignTitle' => 'Mail Archive', 'displayDate' => true, 'displayTime' => true, 'displaySender' => true, ]); } );
You can then add it to a page using this shortcode:
[cabfm]
As an alternative, you can use the functionality provided by Mailchimp to embed a campaign archive, which is rather limited: https://mailchimp.com/en/help/add-an-email-campaign-archive-to-your-website/
Forum: Plugins
In reply to: [Language Fallback] bypasses the individual loco language fileHi @uponity,
I’m not too familiar with Loco Translate. Do you, by any chance, know where the individual file from Loco Translate is being saved?
You can also use the plugin “Query Monitor” to debug where WordPress is trying to load translation files from. Maybe this helps.
If not, I’d recommend you try out the “Preferred Languages” plugin instead of mine, as it’s a more advanced plugin for fallback languages.
If all of that does not help, I’ll have to debug that locally.Forum: Plugins
In reply to: [Language Fallback] Compatibility with YITH WooCommerce Affiliates pluginHi @marcguay,
sorry for my late reply. As you already found out yourself, the plugin does have aes_CO
file and is therefore using it, although that file has fewer translations. Thees_ES
file is not loaded at all, and there is no “merge” functionality in my plugin. There is another plugin that does offer this type of merge, but only through a filter: https://www.ads-software.com/plugins/preferred-languages/
I’d recommend you contribute the missing translations fores_CO
yourself: https://translate.www.ads-software.com/projects/wp-plugins/yith-woocommerce-affiliates/Forum: Plugins
In reply to: [Language Fallback] Is plugin GDPR compliant?Hi Leonie,
yes! This plugin only sets the language setting, does not store any user data and is not using third party libraries.Forum: Plugins
In reply to: [Language Fallback] Support for Contact Form 7?Hey Matthias, thanks again for your report. The newly released version 2.0.0 should fix it for CF7 and many other plugins and themes.
- This reply was modified 1 year, 10 months ago by Bernhard Kau.
I’ve checked the code from Contract Form 7 and the issue seems to be, that the plugin is not calling the
load_plugin_textdomain()
function. In this case it will only use the_load_textdomain_just_in_time()
function (which is called as many times as there are translatable strings, if there is no translation file) and in this function there is no way for thelanguage-fallback
plugin to overwrite the path.
So the best way would probably to provide a translation tode_AT
. Please do this at https://translate.www.ads-software.com/locale/de-at/default/wp-plugins/contact-form-7/ where you can also import your existing po/mo file for everyone to use.
As for Contact Form 7, it would be best if @takayukister would add a call toload_plugin_textdomain()
. This would helplanguage-fallback
any other plugins with these type of issues.
Here is a small “proof-of-concept” MU-Plugin to show that this call would fix the issue:<?php /** * Plugin Name: CF7 Load Textdomain Fix */ function wpcf7_load_textdomain_fix_init() { load_plugin_textdomain( 'contact-form-7' ); } add_action( 'init', 'wpcf7_load_textdomain_fix_init', 9 );
Forum: Plugins
In reply to: [Unique Title Checker] add a line of jsHi David,
what exactly do you want to achieve? And do you want to do that in the block editor or the classic editor?
To me, is looks like you want to disable the “publish” or “save” button. This plugin specifically does want to block anyone from publishing (or saving) content with a duplicate title. It just wants to inform users that there is content with the same title, which might be totally OK on that specific WordPress site.
Forum: Plugins
In reply to: [Antispam Bee] How to configure in multisiteHello @arutha176,
I do use it on my personal multilingual blog using a multisite as you have described. It’s activated on both sites individually, and I can configure it to best match the individual site. So on the German site I can use different settings than on the English site.
Forum: Plugins
In reply to: [Bulk Download for Gravity Forms] Security token for bulk downloading linkHi @jassimp,
sorry it took me so long to anwsers. I was on vacation last week.
You are right, that the URL looks quite easy to guess, and you might think, that anyone can just download any files. But this is not true.
Before a download is made, we check for the
gravityforms_view_entries
capability. Only logged-in users with this capability will be able to download entry files. You can find the check here: https://github.com/VCATconsulting/bulk-download-for-gravity-forms/blob/develop/lib/Helpers/BulkDownload.php#L84There was a support thread asking for public download links: https://www.ads-software.com/support/topic/bulk-download-without-login/
If we are adding a feature like this, then we need to implement a different type of check using security tokens. But as of today, they are not needed and still downloads are protected.
On my personal blog, I’ve also explained how these form specific hooks are used: https://kau-boys.com/3032/wordpress/dynamic-form-specific-hooks-for-gravityforms
Using an entry field would only make sense, if you only bulk download all files from a single entry. If you mass download all files for multiple entries, this wouldn’t work.
Also, the filter only sets the initial zip name. You can always choose to safe if under a different name.
If you just need solution for a single entry, this code should do it_
/** * Filter the file name of the zip archive (without extension) just for the form with ID 2. * * @param string $filename The current zip archive file name. * @param array $form The GF form array. * @param array $entry_ids The entry IDs of all files being added to the archive. * * @return string */ function my_bdfgf_download_filename_form_id_1( $filename, $form, $entry_ids ) { $entry = GFAPI::get_entry( $entry_ids[0] ); $title = rgar( $entry, 3 ); $email = rgar( $entry, 4 ); return $form['title'] . ' – ' . $title . ' – ' . $email; } add_filter( 'bdfgf_download_filename_1', 'my_bdfgf_download_filename_form_id_1', 10, 3 );
This would change the ZIP archive name for the form with ID 1 (as used in the filter name) and it would get the title input field from the form with ID 3 and the email field with ID 4. Change these IDs depending on your needs.
- This reply was modified 2 years, 3 months ago by Bernhard Kau.
- This reply was modified 2 years, 3 months ago by Bernhard Kau.
- This reply was modified 2 years, 3 months ago by Bernhard Kau.
Forum: Plugins
In reply to: [Protect the Children!] not allowed to edit custom field errorI’ve had the same issue. The issue is probably a missing line in the
.htaccess
file. This line has to be added after theRewriteEngine On
line:RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Hi @jassimp,
please find my answer in the GIST.