Skip to content

Commit

Permalink
fix (inc) fix m_image and theme support html5
Browse files Browse the repository at this point in the history
  • Loading branch information
gennarooo committed Jul 13, 2022
1 parent 6318180 commit 0298d8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions inc/m_image.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function m_bottom( $image, $sz = 'medium' ) {
}
}

return 100 * bcdiv( int( $hh ), int( $ww ), 5 );
return 100 * bcdiv( (int) $hh, (int) $ww, 5 );
}
}

Expand Down Expand Up @@ -269,7 +269,6 @@ function m_media( $field, string $sz = 'medium', string $class = '', bool $video
return $html;
}


function get_m_image( $field, $sz = 'medium', $class = '', $video = false ): string {
return m_media( $field, $sz, $class, $video );
}
Expand All @@ -279,9 +278,9 @@ function get_m_image_ofit( $field, $sz = 'medium', $class = '', $video = false )
}

function m_image( $field, $sz = 'medium', $class = '', $video = false ) {
echo wp_kses_post( get_m_image( $field, $sz, $class, $video ) );
echo get_m_image( $field, $sz, $class, $video );
}

function m_image_ofit( $field, $sz = 'medium', $class = '', $video = false ) {
echo wp_kses_post( get_m_image_ofit( $field, $sz, $class, $video ) );
echo get_m_image_ofit( $field, $sz, $class, $video );
}
1 change: 0 additions & 1 deletion inc/theme-support.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/** defines theme supports **/
add_theme_support( 'html5' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'woocommerce' );
add_theme_support( 'align-wide' );
Expand Down
7 changes: 4 additions & 3 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
<property name="customAutoEscapedFunctions" type="array">
<element value="m_icon" />
<element value="m_image" />
<element value="m_include" />
<element value="m_if" />
<element value="m_section" />
<element value="m_image_ofit" />
<element value="m_include" />
<element value="m_if" />
<element value="m_section" />
</property>
</properties>
</rule>
Expand Down

0 comments on commit 0298d8c

Please sign in to comment.