If you are not on UpCloud ...
(was Hosting.md)
<?php | |
function get_text_width(string $text): int | |
{ | |
$glyph_widths = [ | |
'A' => 10.67, | |
'B' => 10.67, | |
'C' => 11.55, | |
'D' => 11.55, | |
'E' => 10.67, |
diff --git a/dispatchers/Html.php b/dispatchers/Html.php | |
index dcd1b80..e33d3d7 100644 | |
--- a/dispatchers/Html.php | |
+++ b/dispatchers/Html.php | |
@@ -319,6 +319,13 @@ class QM_Dispatcher_Html extends QM_Dispatcher { | |
$switched_locale = self::switch_to_locale( get_user_locale() ); | |
+ob_start(); | |
+$this->enqueue_assets(); |
<?php | |
function addDirToZip(string $dir, ZipArchive $zipFile, string $basePath = '') | |
{ | |
$files = scandir($dir); | |
// Remove '.' and '..' | |
unset($files[0], $files[1]); | |
foreach ($files as $file) { | |
$filePath = $dir . $file; |
<?php | |
/* | |
* Plugin Name: Mark comments from Tor exit nodes as spam | |
* Plugin URI: https://github.com/szepeviktor/wordpress-website-lifecycle | |
*/ | |
/** @return string|null */ | |
function getTorExitNodes() | |
{ |
{ | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://releases.whmcs.com/v2" | |
} | |
], | |
"require": { | |
"whmcs/whmcs": "^8.9" | |
} |
EAM KIEGÉSZÍTŐ SZOLGÁLTATÁSOK ÚTMUTATÓ | |
BKR ÜZLETSZABÁLYZAT 20. SZÁMÚ MELLÉKLETE | |
https://www.giro.hu/storage/DDOYCCedHv8YFOdILSOSNiuL6Mfmu6sv56y2HvBU/BKR%20%C3%9CSZ_20_mell%C3%A9klet_2024_09_01.pdf |
If you are not on UpCloud ...
(was Hosting.md)
<?php | |
/* | |
* Plugin Name: Add cpt templates | |
*/ | |
add_filter( | |
'template_include', | |
function ($template) { | |
if (is_singular('cpt')) { |
apt-get install build-essential autoconf pkg-config nasm libtool | |
# Build https://github.com/mozilla/mozjpeg | |
cmake -G"Unix Makefiles" -DPNG_SUPPORTED=OFF -DBUILD_SHARED_LIBS=OFF . | |
make | |
make install | |
# Build Build danielgtaylor/jpeg-archive | |
# Modify source: https://github.com/danielgtaylor/jpeg-archive/pull/128 | |
make | |
make install |
#!/bin/bash | |
DUMP_FILE="/home/user/product-attr-debug/$(date --utc +%F).product" | |
TOTAL="$(wp wc product list --format=count)" | |
for PAGE in $(seq 1 $(( (TOTAL+99) / 100 ))); do | |
wp wc product list --page=${PAGE} --fields=id,attributes >>"${DUMP_FILE}" | |
done |