diff --git a/functions.php b/functions.php index 47f544c8..aea2ddad 100644 --- a/functions.php +++ b/functions.php @@ -161,4 +161,4 @@ if ( defined( 'JETPACK__VERSION' ) ) { */ if ( class_exists( 'WooCommerce' ) ) { require get_template_directory() . '/inc/woocommerce.php'; -} \ No newline at end of file +} diff --git a/inc/woocommerce.php b/inc/woocommerce.php index e1dd6e85..01de29eb 100644 --- a/inc/woocommerce.php +++ b/inc/woocommerce.php @@ -37,7 +37,7 @@ add_action( 'wp_enqueue_scripts', '_s_woocommerce_scripts' ); /** * Disable the default WooCommerce stylesheet * - * Removing the default WooCommerce stylesheet and enqueing your own will + * Removing the default WooCommerce stylesheet and enqueing your own will * protect you during WooCommerce core updates. * * See: https://docs.woocommerce.com/document/disable-the-default-stylesheet/ @@ -64,7 +64,7 @@ add_filter( 'body_class', '_s_woocommerce_active_body_class' ); * @return integer number of products */ function _s_woocommerce_products_per_page() { - return intval( apply_filters( '_s_woocommerce_products_per_page', 12 ) ); + return absint( apply_filters( '_s_woocommerce_products_per_page', 12 ) ); } add_filter( 'loop_shop_per_page', '_s_woocommerce_products_per_page' ); @@ -75,7 +75,7 @@ add_filter( 'loop_shop_per_page', '_s_woocommerce_products_per_page' ); * @return integer number of columns */ function _s_woocommerce_thumbnail_columns() { - return intval( apply_filters( '_s_woocommerce_product_thumbnail_columns', 4 ) ); + return absint( apply_filters( '_s_woocommerce_product_thumbnail_columns', 4 ) ); } add_filter( 'woocommerce_product_thumbnails_columns', '_s_woocommerce_thumbnail_columns' ); @@ -86,7 +86,7 @@ add_filter( 'woocommerce_product_thumbnails_columns', '_s_woocommerce_thumbnail_ * @return integer products per row */ function _s_woocommerce_loop_columns() { - return intval( apply_filters( '_s_woocommerce_loop_columns', 3 ) ); + return absint( apply_filters( '_s_woocommerce_loop_columns', 3 ) ); } add_filter( 'loop_shop_columns', '_s_woocommerce_loop_columns' ); @@ -116,7 +116,7 @@ if ( ! function_exists( '_s_woocommerce_product_columns_wrapper' ) ) { */ function _s_woocommerce_product_columns_wrapper() { $columns = _s_woocommerce_loop_columns(); - echo '