Skip to content

Instantly share code, notes, and snippets.

View joppuyo's full-sized avatar
🏢

Johannes Siipola joppuyo

🏢
View GitHub Profile
@joppuyo
joppuyo / Singleton.php
Last active January 26, 2022 17:07
PHP 7.0 Singleton
<?php
namespace MyNamespace\MySubnameSpace;
class MySingleton
{
private static $instance;
public static function get_instance(): MySingleton
{
== Generic PHP information
PHP version: 7.4.16
Server: Apache
Maximum execution time: 30 seconds
Maximum memory size: 128.00 MB (134217728 bytes)
Maximum upload size: 2.00 MB (2097152 bytes)
Modules loaded:
function removeDropCap(settings, name) {
if (name !== 'core/paragraph') {
return settings;
}
let newSettings = Object.assign({}, settings);
if (newSettings.supports &&
newSettings.supports.__experimentalFeatures &&
newSettings.supports.__experimentalFeatures.typography &&
newSettings.supports.__experimentalFeatures.typography.dropCap) {
newSettings.supports.__experimentalFeatures.typography.dropCap = false