I hereby claim:
- I am vyskoczilova on github.
- I am vyskocilova (https://keybase.io/vyskocilova) on keybase.
- I have a public key whose fingerprint is 6A45 DE74 18D7 0694 AC1D 1F39 FAF6 7F1C 5A13 0C66
To claim this, I am signing this object:
<?php | |
add_filter('wp_img_tag_add_decoding_attr', '__return_false'); |
<?php // don't copy this line | |
/** | |
* Add page template support | |
* @return void | |
* @author Karolína Vyskočilová (https://kybernaut.cz) | |
* @see https://wordpress.org/support/topic/page-templates-missing-from-page-attributes-after-5-8/ | |
* @updated 2021-08-19 | |
*/ | |
function add_page_template_support_missing_in_WP_5_8() |
<?php // nekopírujte tento řádek | |
/** | |
* @snippet WooCommerce: Ulice (první řádek) obsahuje alespoň jednu číslici (číslo popisné) | |
* @author Karolína Vyskočilová (https://kybernaut.cz) | |
* @testedwith WordPress 5.8 & WooCommmerce 5.5 | |
*/ | |
function my_theme_validate_street( $fields, $errors ){ | |
if ( ! preg_match('/[0-9]+/', $fields['billing_address_1']) && !empty( $fields['billing_address_1'] ) ) { | |
$errors->add( 'validation', __( '<strong>Adresa ulice</strong> musí obsahovat číslo popisné.', 'my-theme' ) ); |
<?php | |
// Do not copy the line above if you don't need it. | |
/** | |
* Has block function which searches as well in reusable blocks. | |
* | |
* Extends functionality of core's has_block (https://developer.wordpress.org/reference/functions/has_block/) | |
* | |
* @author Karolína Vyskočilová <karolina@kybernaut.cz> | |
* @since 2021-04-12 |
/** | |
* Solving a trouble with WP Engine which is caching website without URL parameters and re-attaches them back once the request is compiled. | |
* If you need to add UTM values to any form (not only CF7) you can use this JS snippet on the form page. | |
* | |
* Author: Karolína Vyskočilová (karolina@kybernaut.cz) | |
* Author website: https://kybernaut.cz | |
* Date created: 2020-11-13 | |
* | |
* Read more about WP Engine's cache: https://wpengine.com/support/utm-gclid-variables-caching/ | |
*/ |
<?php | |
/** | |
* Plugin Name: Theme Guard | |
* Plugin URI: https://kybernaut.cz/?p=3204 | |
* Description: Check if theme exists and is active or die. | |
* Version: 0.0.1 | |
* Author: Karolína Vyskočilová | |
* Author URI: https://kybernaut.cz | |
* License: MIT |
#!/bin/sh | |
# An additional confirmation if you really want to push to remote (prevents accidental pushes). | |
# | |
# This hook is called with the following parameters: | |
# | |
# $1 -- Name of the remote to which the push is being done | |
# $2 -- URL to which the push is being done | |
# | |
# Information about the commits which are being pushed is supplied as lines to |
<?php | |
/** | |
* @snippet Přidání uživatele s administrátorskými právy. Obsah souboru ideálně vložte do mu-plugins/add-admin-user.php a po vytvoření uživatele odstraňte z vwebu. | |
* @source https://kybernaut.cz/?p=3070 | |
* @author Karolína Vyskočilová (https://kybernaut.cz) | |
* @testedwith WordPress 5.3 | |
*/ | |
add_action( 'init', function () { |
I hereby claim:
To claim this, I am signing this object:
<?php // nekopírujte tento řádek | |
/** | |
* @snippet WooCommerce: Minimální délka telefonního čísla | |
* @author Karolína Vyskočilová (https://kybernaut.cz) | |
* @testedwith WordPress 5.2 & WooCommmerce 3.7.0 | |
*/ | |
// ------------------- | |
function my_theme_validate_phone( $fields, $errors ){ |