Skip to content

Instantly share code, notes, and snippets.

@florianziegler
florianziegler / list-of-all-gutenberg-blocks.php
Created Dec 10, 2019
List of all Gutenberg block types, including WooCommerce blocks
View list-of-all-gutenberg-blocks.php
/**
* Complete list of block type slugs as of WordPress 5.3 and WooCommerce Blocks 2.5.3
*/
$block_types = array(
// Common blocks
'core/paragraph',
'core/image',
'core/heading',
'core/gallery',
'core/list',
View picu-client-mail-message-filter.php
<?php // Change the default client email message
function my_custom_mail_message( $mail_message, $user_name ) {
$mail_message = 'Nice!&#10;&#10;Now I have my own mail message.&#10;&#10;';
$mail_message .= 'I can even automatically end the message with the current username:&#10;' . $user_name;
return $mail_message;
}
@florianziegler
florianziegler / google-maps-api-supported-languages
Last active Apr 22, 2016
Array of all the languages the Google Maps API supports (as of April 2016)
View google-maps-api-supported-languages
{
'العربيّة (ar)' => 'ar',
'български (bg)' => 'bg',
'Bengali (bn)' => 'bn',
'català (ca)' => 'ca',
'česky (cs)' => 'cs',
'dansk (da)' => 'da',
'Deutsch (de)' => 'de',
'Ελληνικά (el)' => 'el',
'English (en)' => 'en',
@florianziegler
florianziegler / utc-time-zones-offset-minutes
Created Sep 3, 2014
Array of UTC-based timezones, key => time zone, value => time offset in seconds
View utc-time-zones-offset-minutes
{
'UTC-12' => '-43200',
'UTC-11' => '-39600',
'UTC-10' => '-36000',
'UTC-9.5' => '-34200',
'UTC-9' => '-32400',
'UTC-8' => '-28800',
'UTC-7' => '-25200',
'UTC-6' => '-21600',
'UTC-5' => '-18000',