Skip to content

Instantly share code, notes, and snippets.

@morvy
morvy / functions.php
Created December 1, 2019 21:12
[Debug WP updates] Debug WordPress aktualizácií #wordpress
/**
* Debug WP updates
* Displays hidden plugin and theme updates on update-core screen.
*
* @source https://stackoverflow.com/questions/22137814/wordpress-shows-i-have-1-plugin-update-when-all-plugins-are-already-updated/52132227
* @author Peter Morvay <moped@jepan.sk>
*/
function debug_pending_updates() {
// Rough safety nets
/**
* Blocks order if condition is met
* - blocks Emma Rose orders
* - blocks orders from New York
*
* @param array $data
* @param object $errors
* @return void
*/
function pmo_custom_checkout_field_validation( $data, $errors ) {
@morvy
morvy / index.php
Last active April 7, 2019 10:29
Laragon.org enhanced "homepage"
<?php
if (!empty($_GET['q'])) {
switch ($_GET['q']) {
case 'info':
phpinfo();
exit;
break;
}
}
?>