comment_type || 'trackback' == $comment->comment_type ) : ?>
' . esc_html__( 'Camera: %s', 'make' ) . "\n",
esc_html( $image_meta['camera'] )
);
}
// Creation Date
if ( ! empty( $image_meta['created_timestamp'] ) ) {
$date = new DateTime( gmdate( "Y-m-d\TH:i:s\Z", $image_meta['created_timestamp'] ) );
// Translators: "Taken" refers to the date that a photograph was taken. %s is a placeholder for that date.
$output .= sprintf(
'' . esc_html__( 'Taken: %s', 'make' ) . "\n",
esc_html( $date->format( get_option( 'date_format' ) ) )
);
}
// Focal length
if ( ! empty( $image_meta['focal_length'] ) ) {
// Translators: "Focal length" refers to the length of a camera's lens. %s is a placeholder for the focal length value, and "mm" is the units in millimeters.
$output .= sprintf(
'' . esc_html__( 'Focal length: %smm', 'make' ) . "\n",
number_format_i18n( absint( $image_meta['focal_length'] ), 0 )
);
}
// Aperture
if ( ! empty( $image_meta['aperture'] ) ) {
// Translators: "Aperture" refers to the amount of light passing through a camera lens. %s is a placeholder for the aperture value, represented as an f-stop.
$output .= sprintf(
'' . esc_html__( 'Aperture: %s', 'make' ) . "\n",
esc_html( $image_meta['aperture'] )
);
}
// Exposure
if ( ! empty( $image_meta['shutter_speed'] ) ) {
// Translators: "Exposure" refers to a camera's shutter speed. %s is a placeholder for the shutter speed value.
$output .= sprintf(
'' . esc_html__( 'Exposure: %s', 'make' ) . "\n",
esc_html( $image_meta['shutter_speed'] )
);
}
// ISO
if ( ! empty( $image_meta['iso'] ) ) {
// Translators: "ISO" is an acronym that refers to a camera's sensitivity to light. %s is a placeholder for the ISO value.
$output .= sprintf(
'' . esc_html__( 'ISO: %s', 'make' ) . "\n",
absint( $image_meta['iso'] )
);
}
}
// Wrap list items
if ( '' !== $output ) {
$output = "\n";
}
/**
* Alter the exif data output.
*
* @since 1.2.3.
*
* @param string $output The EXIF data prepared as HTML.
* @param int $attachment_id The image being generated.
*/
return apply_filters( 'make_get_exif_data', $output, $attachment_id );
}
endif;
/**
* Get a sanitized value for a Theme Mod setting.
*
* @since 1.7.0.
*
* @param $setting_id
* @param string $context
*
* @return mixed
*/
function make_get_thememod_value( $setting_id, $context = 'template' ) {
return Make()->thememod()->get_value( $setting_id, $context );
}
/**
* Get the default value for a Theme Mod setting.
*
* @since 1.7.0.
*
* @param $setting_id
*
* @return mixed
*/
function make_get_thememod_default( $setting_id ) {
return Make()->thememod()->get_default( $setting_id );
}
/**
* Get the current view.
*
* @since 1.7.0.
*
* @return mixed
*/
function make_get_current_view() {
return Make()->view()->get_current_view();
}
/**
* Check if the current view has a sidebar in the specified location (left or right).
*
* @since 1.7.0.
*
* @param $location
*
* @return mixed
*/
function make_has_sidebar( $location ) {
return Make()->widgets()->has_sidebar( $location );
}
/**
* Check if a custom logo has been set.
*
* @since 1.7.0.
*
* @return bool
*/
function make_has_logo() {
return Make()->logo()->has_logo();
}
/**
* Output the markup for a custom logo.
*
* @since 1.7.0.
*
* return void
*/
function make_logo() {
echo Make()->logo()->get_logo();
}
/**
* Check to see if social icons have been configured for display.
*
* @since 1.7.0.
*
* @return bool
*/
function make_has_socialicons() {
return Make()->socialicons()->has_icon_data();
}
/**
* Display social icons for the site header or footer.
*
* @since 1.7.0.
*
* @param $region
*
* @return void
*/
function make_socialicons( $region ) {
if ( ! in_array( $region, array( 'header', 'footer' ) ) ) {
return;
}
$show_icons = make_has_socialicons() && make_get_thememod_value( $region . '-show-social' );
if ( $show_icons || is_customize_preview() ) : ?>
socialicons()->render_icons(); ?>
', $after = '' ) {
if ( Make()->integration()->has_integration( 'yoastseo' ) ) {
echo Make()->integration()->get_integration( 'yoastseo' )->maybe_render_breadcrumb( $before, $after );
}
}
/**
* Determine which image size to use to display a post's featured image.
*
* @since 1.7.4.
*
* @param string $layout_setting
*
* @return string
*/
function make_get_entry_thumbnail_size( $layout_setting = 'none' ) {
// Currently viewing an attachment
if ( is_attachment() ) {
$size = 'full';
}
// Currently viewing some other post type
else {
if ( 'post-header' === $layout_setting ) {
$size = 'large';
} else {
$size = ( is_singular() ) ? 'medium' : 'thumbnail';
}
}
/**
* Filter: Modify the image size used to display a post's featured image (post thumbnail)
*
* @since 1.7.4.
*
* @param string $size The ID of the image size to use.
* @param string $layout_setting The value of the featured image layout setting for the current view.
*/
return apply_filters( 'make_entry_thumbnail_size', $size, $layout_setting );
}
if ( ! function_exists( 'sanitize_hex_color' ) ) :
/**
* Sanitizes a hex color.
*
* This replicates the core function that is unfortunately only available in the Customizer.
*
* @since 1.0.0.
*
* @param string $color The proposed color.
*
* @return string The sanitized color.
*/
function sanitize_hex_color( $color ) {
if ( '' === $color ) {
return '';
}
// 3 or 6 hex digits, or the empty string.
if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
return $color;
}
return '';
}
endif;
if ( ! function_exists( 'sanitize_hex_color_no_hash' ) ) :
/**
* Sanitizes a hex color without a hash. Use sanitize_hex_color() when possible.
*
* This replicates the core function that is unfortunately only available in the Customizer.
*
* @since 1.0.0.
*
* @param string $color The proposed color.
* @return string|null The sanitized color.
*/
function sanitize_hex_color_no_hash( $color ) {
$color = ltrim( $color, '#' );
if ( '' === $color ) {
return '';
}
return sanitize_hex_color( '#' . $color ) ? $color : null;
}
endif;
if ( ! function_exists( 'maybe_hash_hex_color' ) ) :
/**
* Ensures that any hex color is properly hashed.
*
* This replicates the core function that is unfortunately only available in the Customizer.
*
* @since 1.0.0.
*
* @param string $color The proposed color.
* @return string|null The sanitized color.
*/
function maybe_hash_hex_color( $color ) {
if ( $unhashed = sanitize_hex_color_no_hash( $color ) ) {
return '#' . $unhashed;
}
return $color;
}
endif;