Skip to content

Commit

Permalink
pub themes: Restore changes overwritten from latest themes deploy (D1…
Browse files Browse the repository at this point in the history
…44213 D144218 D144223 D144228 D144234 D144240 D144244) (#7708)
  • Loading branch information
mreishus committed Apr 3, 2024
1 parent 1196e44 commit 836413e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion altofocus/inc/jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function altofocus_get_featured_post_ids() {
if ( false === $featured_ids ) {

$featured_options = get_option( 'featured-content', FALSE );
$featured_tag_name = $featured_options[ 'tag-name' ];
$featured_tag_name = $featured_options[ 'tag-name' ] ?? null;
$term = get_term_by( 'name', $featured_tag_name, 'post_tag' );

if ( $term ) {
Expand Down
6 changes: 5 additions & 1 deletion dyad-2/inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ function dyad_2_body_classes( $classes ) {
}

//Has featured image?
if ( ! is_page() && dyad_2_has_post_thumbnail( $post->ID ) && dyad_2_jetpack_featured_image_display() ) {
if (
! is_page()
&& dyad_2_has_post_thumbnail( $post->ID ?? null )
&& dyad_2_jetpack_featured_image_display()
) {
$classes[] = 'has-post-thumbnail';
}

Expand Down
3 changes: 3 additions & 0 deletions lodestar/components/page/content-front-page-panels.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

$thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'lodestar-featured-image' );
//Calculate aspect ratio: h / w * 100%
$ratio = 100;
if ( isset($thumbnail_attributes[2] ) && isset( $thumbnail_attributes[1] ) && $thumbnail_attributes[1] > 0 ) {
$ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100;
}
?>

<div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
Expand Down
3 changes: 3 additions & 0 deletions radcliffe-2/inc/logo-resizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ function logo_awesomeness_customize_logo_resize( $html ) {

/* Helper function to determine the max size of the logo */
function logo_awesomeness_min_max( $short, $long, $short_max, $long_max, $percent, $min ){
$short ??= 1;
$long ??= 1;

$max = [];
$size = [];
$ratio = ( $long / $short );
Expand Down
10 changes: 5 additions & 5 deletions seedlet/inc/wpcom.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ function seedlet_wpcom_setup() {

$wpcom_colors_array = get_theme_mod( 'colors_manager' );
if ( ! empty( $wpcom_colors_array ) ) {
$primary = $wpcom_colors_array['colors']['link'];
$secondary = $wpcom_colors_array['colors']['fg1'];
$foreground = $wpcom_colors_array['colors']['txt'];
$tertiary = $wpcom_colors_array['colors']['fg2'];
$background = $wpcom_colors_array['colors']['bg'];
$primary = $wpcom_colors_array['colors']['link'] ?? '';
$secondary = $wpcom_colors_array['colors']['fg1'] ?? '';
$foreground = $wpcom_colors_array['colors']['txt'] ?? '';
$tertiary = $wpcom_colors_array['colors']['fg2'] ?? '';
$background = $wpcom_colors_array['colors']['bg'] ?? '';

/**
* De-register original editor color palette in favor of the wpcom implementation
Expand Down
2 changes: 1 addition & 1 deletion shoreditch/inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function shoreditch_background_image() {
}
else {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'post-thumbnail' );
$image = $image[0];
$image = $image[0] ?? null;
}

if ( ! $image ) {
Expand Down

0 comments on commit 836413e

Please sign in to comment.