' . "\n";
echo '' . "\n";
echo '' . "\n";
}
}
add_action( 'wp_head', 'altilo_favicon_link', 2 );
add_action( 'admin_head', 'altilo_favicon_link', 2 );
if ( ! function_exists( 'altilo_get_emblem_svg' ) ) {
/**
* Return the theme-aware Altilo emblem SVG for inline use.
*
* @param string $label Accessible label for the emblem.
* @return string
*/
function altilo_get_emblem_svg( $label = '' ) {
$label = '' !== $label ? $label : __( 'Altilo', 'altilo' );
return sprintf(
'',
esc_attr( $label )
);
}
}
if ( ! function_exists( 'altilo_emblem' ) ) {
/**
* Print the theme-aware Altilo emblem SVG.
*
* @param string $label Accessible label for the emblem.
*/
function altilo_emblem( $label = '' ) {
echo wp_kses(
altilo_get_emblem_svg( $label ),
array(
'svg' => array(
'aria-label' => true,
'class' => true,
'focusable' => true,
'role' => true,
'viewBox' => true,
'viewbox' => true,
'xmlns' => true,
),
'rect' => array(
'fill' => true,
'height' => true,
'rx' => true,
'width' => true,
),
'path' => array(
'd' => true,
'fill' => true,
),
)
);
}
}
if ( ! function_exists( 'altilo_viewport_meta' ) ) {
/**
* Add the responsive viewport meta tag required for mobile layouts.
*/
function altilo_viewport_meta() {
echo '' . "\n";
}
}
add_action( 'wp_head', 'altilo_viewport_meta', 1 );
if ( ! function_exists( 'altilo_register_block_styles' ) ) {
/**
* Register block style variations.
*/
function altilo_register_block_styles() {
$styles = array(
'core/button' => array(
array( 'secondary', __( 'Secondary', 'altilo' ) ),
array( 'tertiary', __( 'Tertiary', 'altilo' ) ),
),
'core/quote' => array(
array( 'editorial', __( 'Editorial', 'altilo' ) ),
array( 'pullquote-xl', __( 'Pullquote XL', 'altilo' ) ),
array( 'sidenote', __( 'Sidenote', 'altilo' ) ),
),
'core/image' => array(
array( 'framed-hairline', __( 'Framed Hairline', 'altilo' ) ),
array( 'offset', __( 'Offset', 'altilo' ) ),
array( 'duotone-grayscale', __( 'Duotone Grayscale', 'altilo' ) ),
),
'core/separator' => array(
array( 'hairline-wide', __( 'Hairline Wide', 'altilo' ) ),
array( 'asterism', __( 'Asterism', 'altilo' ) ),
array( 'numbered', __( 'Numbered', 'altilo' ) ),
),
);
foreach ( $styles as $block => $variations ) {
foreach ( $variations as $variation ) {
register_block_style(
$block,
array(
'name' => $variation[0],
'label' => $variation[1],
)
);
}
}
}
}
add_action( 'init', 'altilo_register_block_styles' );
if ( ! function_exists( 'altilo_register_pattern_categories' ) ) {
/**
* Register pattern categories.
*/
function altilo_register_pattern_categories() {
$categories = array(
'altilo-home' => __( 'Altilo: Home', 'altilo' ),
'altilo-hero' => __( 'Altilo: Hero', 'altilo' ),
'altilo-sections' => __( 'Altilo: Sections', 'altilo' ),
'altilo-cards' => __( 'Altilo: Cards', 'altilo' ),
'altilo-forms' => __( 'Altilo: Forms', 'altilo' ),
'altilo-contact' => __( 'Altilo: Contact', 'altilo' ),
'altilo-about' => __( 'Altilo: About', 'altilo' ),
'altilo-changelog' => __( 'Altilo: Changelog', 'altilo' ),
'altilo-blog' => __( 'Altilo: Blog', 'altilo' ),
'altilo-trust' => __( 'Altilo: Trust', 'altilo' ),
'altilo-services' => __( 'Altilo: Services', 'altilo' ),
'altilo-content' => __( 'Altilo: Content', 'altilo' ),
'altilo-pages' => __( 'Altilo: Pages', 'altilo' ),
'altilo-page-starters' => __( 'Altilo: Page Starters', 'altilo' ),
'altilo-cta' => __( 'Altilo: CTA', 'altilo' ),
'altilo-pricing' => __( 'Altilo: Pricing', 'altilo' ),
'altilo-faq' => __( 'Altilo: FAQ', 'altilo' ),
'altilo-portfolio' => __( 'Altilo: Portfolio', 'altilo' ),
'altilo-footer' => __( 'Altilo: Footer', 'altilo' ),
);
foreach ( $categories as $slug => $label ) {
register_block_pattern_category( $slug, array( 'label' => $label ) );
}
}
}
add_action( 'init', 'altilo_register_pattern_categories' );