Max Upload Size

// Max Upload Size / Kiri Vadivelu / 2026 function max_upload_size( $file ) { $max = 9 * 1024 * 1024; // 9 MB if ( $file[‘size’] > $max ) { $file[‘error’] = ‘File exceeds the 9 MB maximum upload…Continue reading

Image Max Pixel

// Image Max Pixel / Kiri Vadivelu / 2026 add_filter(‘wp_handle_upload_prefilter’, ‘image_max_pixel’); function image_max_pixel($file) { $image = getimagesize($file[‘tmp_name’]); if ($image[0] > 4000 || $image[1] > 4000) { $file[‘error’] = ‘Image too large (max 4000×4000).’; } return $file; }Continue reading

lokalstolz | Kleine Stylesheets inline

/* * WPCode-Snippet “lokalstolz | Kleine Stylesheets inline” (Typ php, Location everywhere, Auto-Insert an) * Zentral gepflegt in der WPCode-Bibliothek: Code in der Instanz nicht aendern. * Ziel: weniger render-blockierende Anfragen. Oxygen bindet viele winzige Stylesheets einzeln im Kopf ein…Continue reading

Create Private Folder

// Create Private Folder / Kiri Vadivelu / 2026 function create_private_folder() { $upload_dir = wp_upload_dir(); $private_path = trailingslashit( $upload_dir[‘basedir’] ) . ‘private-files’; // Update the status to debug log if ( ! is_dir( $private_path ) ) { $result = wp_mkdir_p(…Continue reading

lokalstolz | Mauszeiger

/* * WPCode-Snippet “lokalstolz | Mauszeiger” (Typ php, Location everywhere, Auto-Insert an) * Zentral gepflegt in der WPCode-Bibliothek: Code in der Instanz nicht aendern. Farben, Groessen und * Selektoren je Projekt in der Option ls_mauszeiger (Array), siehe stack/wpcode-mauszeiger.md. * Eigener…Continue reading

lokalstolz | Grundkorrekturen

/* * WPCode-Snippet “lokalstolz | Grundkorrekturen” (Typ php, Location everywhere, Auto-Insert an) * Vorlage aus der web-wissensbasis (stack/quelltext-hygiene.md, oxygen/13-wordpress-grundeinstellungen.md). * Titel in WPCode und Bibliothek genau so. Fuer jede Oxygen-6-Instanz (Dev und Studio-WordPress). * Zentral gepflegt in der WPCode-Bibliothek: Code…Continue reading

lokalstolz | Gravity Forms Pflichtfelder (statisch)

/* * WPCode-Snippet “lokalstolz | Gravity Forms Pflichtfelder (statisch)” (Typ php, Location everywhere, Auto-Insert an) * Titel in WPCode und Bibliothek genau so. Fuer jedes Projekt mit Gravity Forms auf Static Studio (Dev und Studio-WordPress). * Entstanden 16.10.2026. Die Studio-Validierung…Continue reading

lokalstolz | Unbekannte Adressen auf die Startseite

/* * WPCode-Snippet “lokalstolz | Unbekannte Adressen auf die Startseite” (Typ php, Location everywhere, Auto-Insert an) * Titel in WPCode und Bibliothek genau so. Standard fuer alle Seiten, ohne zusaetzliches Plugin. * Beschrieben in web-wissensbasis stack/static-studio-einstellungen.md. * * Zwei Ebenen,…Continue reading