This file contains 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 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 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 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 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 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); | |
} |
This file contains 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 | |
add_action('enqueue_block_editor_assets', [$this, 'enqueueBlockAssets']); | |
… | |
public function enqueueBlockAssets() | |
{ | |
$dirpath = plugin_dir_path(shp_myplugin_get_instance()->file); |
This file contains 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 | |
public function onlyFutureEntries($query) | |
{ | |
if (!is_admin() && isset($query->query['post_type']) && $query->query['post_type'] === 'sht_event') { | |
$query->set('orderby', 'meta_value'); | |
$query->set('order', 'ASC'); | |
$query->set('meta_key', 'start_date'); | |
$meta_query = (array) $query->get('meta_query'); |
This file contains 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 | |
$featured_image_atts = wp_get_attachment_image_src(get_post_thumbnail_id(), 'post_thumbnail'); | |
$aspect_ratio = $featured_image_atts[1]/$featured_image_atts[2]; | |
if ($aspect_ratio < 1) { | |
$image_size = 'post_thumbnail_tall'; | |
} elseif ($aspect_ratio === 1) { | |
$image_size = 'post_thumbnail_square'; | |
} else { |