Skip to content

Instantly share code, notes, and snippets.

View mrcodefinger's full-sized avatar
😊

Mr. Codefinger mrcodefinger

😊
View GitHub Profile
@mrcodefinger
mrcodefinger / freeStringFromGermanUmlauts.php
Last active February 15, 2023 08:20
Free string from German umlauts
function cleanString($string) {
$string = str_replace([' ', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', 'ß'], [' ', 'Ae', 'ae', 'Oe', 'oe', 'Ue', 'ue', 'ss'], $string);
$string = preg_replace('/[^A-Za-z0-9\-]/', '-', $string);
return preg_replace('/-+/', '-', $string);
}
echo cleanString('In Köln trinkt man Kölsch und in Düsseldorf trinkt man Alt.'
$('input[name="number_rooms__to"]').on('change', function () {
$('input[name="number_rooms__of"]').attr('max', $(this).val() - 1);
});
$('input[name="number_rooms__of"]').on('change', function () {
$('input[name="number_rooms__to"]').attr('min', parseInt($(this).val()) + 1);
});
@mrcodefinger
mrcodefinger / elementor-black-list.php
Created October 18, 2019 13:01
Elementor hide widgets by black list
/**
* With this code it is possible to hide unnecessary widgets of the elementor plugin for wordpress.
* Comment in or out relevant values in array.
*/
global $elementor_widget_blacklist;
$elementor_widget_blacklist = [
//'common',
'heading',
//'image',
//'text-editor',