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
function storebase_get_image_output($image_id, $size = 'large', $sizes = '(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw') { | |
$alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true ); | |
$metadata = wp_get_attachment_metadata( $image_id ); | |
$src = wp_get_attachment_image_src( $image_id, $size )[0]; | |
$srcset = wp_get_attachment_image_srcset( $image_id, $size ); | |
$width = $metadata['width']; | |
$height = $metadata['height']; | |
$output = '<img src="' . $src . '"'; |
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 | |
/** | |
* Title: Event Card | |
* Slug: text-domain/event-card | |
* Categories: cards | |
*/ | |
?> | |
<!-- wp:group {"className":"specifica-opera","layout":{"type":"default"}} --> | |
<div class="wp-block-group specifica-opera"><!-- wp:heading {"textColor":"hc_azzurro"} --> | |
<h2 class="has-hc-azzurro-color has-text-color">Missa Brevis in La Maggiore BWV 234</h2> |
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 | |
/** | |
* All In One WP Migration: exclude node_modules folder from export files | |
* | |
* Change 'your-theme-name' with the real name of your theme folder | |
* save this file inside your 'inc' folder and require it inside 'functions.php' | |
* | |
* @package Your_Theme_Name | |
*/ | |
function mb_ai1wm_exclude_node_modules($exclude_filters) { |
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
const hexToRGBA = (hex, opacity) => { | |
// remove # from hex color string | |
const value = hex.replace("#", ''); | |
// get red, green and blue pairings and convert them to their equivalent hexadecimal number | |
const red = parseInt(value.substring(0,2), 16); | |
const green = parseInt(value.substring(2,4), 16); | |
const blue = parseInt(value.substring(4,6), 16); | |
// return rgba value adding opacity | |
return `rgba(${red}, ${green}, ${blue}, ${opacity})`; | |
} |
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
license: mit |
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
license: mit |
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
license: mit |