This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // PHP memory limit for this site | |
| define( 'WP_MEMORY_LIMIT', '128M' ); | |
| define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
| // Database | |
| define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
| define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
| // Explicitely setting url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Uses the technique from https://css-tricks.com/lazy-load-embedded-youtube-videos/ to add an srcdoc | |
| * attribute to YouTube embeds, which prevents the content of the YouTube iframe from loading until | |
| * the user clicks on the video link. This code is intended for WordPress through the use of the | |
| * embed_oembed_html filter hook. | |
| * | |
| * Although the autoplay code is correct, current browsers appear to block the autoplay feature when | |
| * loading the iframe content when the link is clicked. This means that the visitor will need to click |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| transforms: { | |
| from: [ | |
| { | |
| type: 'block', | |
| blocks: ['core/list'], | |
| transform: ({ values }) => { | |
| let entries = values.split('</li><li>'); | |
| const link_pattern = /<a href=['"]#endnote[0-9]+['"]>([0-9]+)<\/a>/gi; | |
| entries.forEach((entry, index) => { | |
| entries[index] = entry.replace('<li>', '').replace('</li>', ''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :root { | |
| --vh: 1vh; | |
| } | |
| .c-browserheight { | |
| min-height: calc(100 * var(--vh)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * ***************************************************************************** | |
| * GIST - EXIF 01 - Get EXIF-Information from wp_get_attachment_image_attributes | |
| * ***************************************************************************** | |
| */ | |
| if ( is_attachment() ) { | |
| $imgmeta = wp_get_attachment_metadata( $id ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * External Dependencies | |
| */ | |
| import classnames from 'classnames'; | |
| /** | |
| * WordPress Dependencies | |
| */ | |
| const { __ } = wp.i18n; | |
| const { addFilter } = wp.hooks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This add-in gives you full Polylang support in WordPress customizer. By full support I mean that you customize each language site differently. | |
| * Minor adaptation from https://github.com/soderlind/customizer-polylang to fit into the Hello Roots logic. | |
| */ | |
| namespace SayHello\Theme\Plugin; | |
| class CustomizerPolylang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Extend the Gutenberg Package with the following function | |
| */ | |
| add_filter('admin_body_class', [$this, 'extendAdminBodyClass']); | |
| … |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .wp-block-group { | |
| margin-top: 0; | |
| margin-bottom: 0; | |
| &.is-style-padding { | |
| .wp-block-group__inner-container { | |
| padding-top: var(--unit); | |
| padding-bottom: var(--unit); | |
| } |