forked from mirror/_s
Merge array with wp_parse_args.
This commit is contained in:
parent
3e5f77d27c
commit
b0a272a755
|
@ -92,11 +92,7 @@ add_filter( 'loop_shop_columns', '_s_woocommerce_loop_columns' );
|
||||||
* @return array $args related products args
|
* @return array $args related products args
|
||||||
*/
|
*/
|
||||||
function _s_woocommerce_related_products_args( $args ) {
|
function _s_woocommerce_related_products_args( $args ) {
|
||||||
$args = apply_filters( '_s_woocommerce_related_products_args', array(
|
$args = wp_parse_args( array( 'posts_per_page' => 3, 'columns' => 3 ), $args );
|
||||||
'posts_per_page' => 3,
|
|
||||||
'columns' => 3,
|
|
||||||
) );
|
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
add_filter( 'woocommerce_output_related_products_args', '_s_woocommerce_related_products_args' );
|
add_filter( 'woocommerce_output_related_products_args', '_s_woocommerce_related_products_args' );
|
||||||
|
|
Reference in New Issue