More missing esc_attr calls, :(
This commit is contained in:
parent
b091f12393
commit
c938fa24da
|
@ -301,11 +301,11 @@ abstract class WC_Payment_Gateway extends WC_Settings_API {
|
|||
</p>',
|
||||
'card-expiry-field' => '<p class="form-row form-row-first">
|
||||
<label for="' . esc_attr( $this->id ) . '-card-expiry">' . __( 'Expiry (MM/YY)', 'woocommerce' ) . ' <span class="required">*</span></label>
|
||||
<input id="' . esc_attr( $this->id ) . '-card-expiry" class="input-text wc-credit-card-form-card-expiry" type="text" autocomplete="off" placeholder="' . __( 'MM / YY', 'woocommerce' ) . '" name="' . ( $args['fields_have_names'] ? $this->id . '-card-expiry' : '' ) . '" />
|
||||
<input id="' . esc_attr( $this->id ) . '-card-expiry" class="input-text wc-credit-card-form-card-expiry" type="text" autocomplete="off" placeholder="' . esc_attr__( 'MM / YY', 'woocommerce' ) . '" name="' . ( $args['fields_have_names'] ? $this->id . '-card-expiry' : '' ) . '" />
|
||||
</p>',
|
||||
'card-cvc-field' => '<p class="form-row form-row-last">
|
||||
<label for="' . esc_attr( $this->id ) . '-card-cvc">' . __( 'Card Code', 'woocommerce' ) . ' <span class="required">*</span></label>
|
||||
<input id="' . esc_attr( $this->id ) . '-card-cvc" class="input-text wc-credit-card-form-card-cvc" type="text" autocomplete="off" placeholder="' . __( 'CVC', 'woocommerce' ) . '" name="' . ( $args['fields_have_names'] ? $this->id . '-card-cvc' : '' ) . '" />
|
||||
<input id="' . esc_attr( $this->id ) . '-card-cvc" class="input-text wc-credit-card-form-card-cvc" type="text" autocomplete="off" placeholder="' . esc_attr__( 'CVC', 'woocommerce' ) . '" name="' . ( $args['fields_have_names'] ? $this->id . '-card-cvc' : '' ) . '" />
|
||||
</p>'
|
||||
);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class WC_Admin_Duplicate_Product {
|
|||
return $actions;
|
||||
}
|
||||
|
||||
$actions['duplicate'] = '<a href="' . wp_nonce_url( admin_url( 'edit.php?post_type=product&action=duplicate_product&post=' . $post->ID ), 'woocommerce-duplicate-product_' . $post->ID ) . '" title="' . __( 'Make a duplicate from this product', 'woocommerce' )
|
||||
$actions['duplicate'] = '<a href="' . wp_nonce_url( admin_url( 'edit.php?post_type=product&action=duplicate_product&post=' . $post->ID ), 'woocommerce-duplicate-product_' . $post->ID ) . '" title="' . esc_attr__( 'Make a duplicate from this product', 'woocommerce' )
|
||||
. '" rel="permalink">' . __( 'Duplicate', 'woocommerce' ) . '</a>';
|
||||
|
||||
return $actions;
|
||||
|
|
|
@ -112,7 +112,7 @@ class WC_Admin_Meta_Boxes {
|
|||
add_meta_box( 'woocommerce-order-data', sprintf( __( '%s Data', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Data::output', $type, 'normal', 'high' );
|
||||
add_meta_box( 'woocommerce-order-items', sprintf( __( '%s Items', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Items::output', $type, 'normal', 'high' );
|
||||
add_meta_box( 'woocommerce-order-notes', sprintf( __( '%s Notes', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Notes::output', $type, 'side', 'default' );
|
||||
add_meta_box( 'woocommerce-order-downloads', __( 'Downloadable Product Permissions', 'woocommerce' ) . ' <span class="tips" data-tip="' . __( 'Note: Permissions for order items will automatically be granted when the order status changes to processing/completed.', 'woocommerce' ) . '">[?]</span>', 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' );
|
||||
add_meta_box( 'woocommerce-order-downloads', __( 'Downloadable Product Permissions', 'woocommerce' ) . ' <span class="tips" data-tip="' . esc_attr__( 'Note: Permissions for order items will automatically be granted when the order status changes to processing/completed.', 'woocommerce' ) . '">[?]</span>', 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' );
|
||||
add_meta_box( 'woocommerce-order-actions', sprintf( __( '%s Actions', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Actions::output', $type, 'side', 'high' );
|
||||
remove_meta_box( 'submitdiv', $type, 'side' );
|
||||
}
|
||||
|
|
|
@ -207,7 +207,8 @@ class WC_Admin_Post_Types {
|
|||
|
||||
$columns = array();
|
||||
$columns['cb'] = '<input type="checkbox" />';
|
||||
$columns['thumb'] = '<span class="wc-image tips" data-tip="' . __( 'Image', 'woocommerce' ) . '">' . __( 'Image', 'woocommerce' ) . '</span>';
|
||||
$columns['thumb'] = '<span class="wc-image tips" data-tip="' . esc_attr__( 'Image', 'woocommerce' ) . '">' . __( 'Image', 'woocommerce' ) . '</span>';
|
||||
$columns['thumb'] = '<span class="wc-image tips" data-tip="' . esc_attr__( 'Image', 'woocommerce' ) . '">' . __( 'Image', 'woocommerce' ) . '</span>';
|
||||
$columns['name'] = __( 'Name', 'woocommerce' );
|
||||
|
||||
if ( wc_product_sku_enabled() ) {
|
||||
|
@ -221,8 +222,8 @@ class WC_Admin_Post_Types {
|
|||
$columns['price'] = __( 'Price', 'woocommerce' );
|
||||
$columns['product_cat'] = __( 'Categories', 'woocommerce' );
|
||||
$columns['product_tag'] = __( 'Tags', 'woocommerce' );
|
||||
$columns['featured'] = '<span class="wc-featured parent-tips" data-tip="' . __( 'Featured', 'woocommerce' ) . '">' . __( 'Featured', 'woocommerce' ) . '</span>';
|
||||
$columns['product_type'] = '<span class="wc-type parent-tips" data-tip="' . __( 'Type', 'woocommerce' ) . '">' . __( 'Type', 'woocommerce' ) . '</span>';
|
||||
$columns['featured'] = '<span class="wc-featured parent-tips" data-tip="' . esc_attr__( 'Featured', 'woocommerce' ) . '">' . __( 'Featured', 'woocommerce' ) . '</span>';
|
||||
$columns['product_type'] = '<span class="wc-type parent-tips" data-tip="' . esc_attr__( 'Type', 'woocommerce' ) . '">' . __( 'Type', 'woocommerce' ) . '</span>';
|
||||
$columns['date'] = __( 'Date', 'woocommerce' );
|
||||
|
||||
return array_merge( $columns, $existing_columns );
|
||||
|
@ -339,21 +340,21 @@ class WC_Admin_Post_Types {
|
|||
break;
|
||||
case 'product_type' :
|
||||
if ( 'grouped' == $the_product->product_type ) {
|
||||
echo '<span class="product-type tips grouped" data-tip="' . __( 'Grouped', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips grouped" data-tip="' . esc_attr__( 'Grouped', 'woocommerce' ) . '"></span>';
|
||||
} elseif ( 'external' == $the_product->product_type ) {
|
||||
echo '<span class="product-type tips external" data-tip="' . __( 'External/Affiliate', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips external" data-tip="' . esc_attr__( 'External/Affiliate', 'woocommerce' ) . '"></span>';
|
||||
} elseif ( 'simple' == $the_product->product_type ) {
|
||||
|
||||
if ( $the_product->is_virtual() ) {
|
||||
echo '<span class="product-type tips virtual" data-tip="' . __( 'Virtual', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips virtual" data-tip="' . esc_attr__( 'Virtual', 'woocommerce' ) . '"></span>';
|
||||
} elseif ( $the_product->is_downloadable() ) {
|
||||
echo '<span class="product-type tips downloadable" data-tip="' . __( 'Downloadable', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips downloadable" data-tip="' . esc_attr__( 'Downloadable', 'woocommerce' ) . '"></span>';
|
||||
} else {
|
||||
echo '<span class="product-type tips simple" data-tip="' . __( 'Simple', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips simple" data-tip="' . esc_attr__( 'Simple', 'woocommerce' ) . '"></span>';
|
||||
}
|
||||
|
||||
} elseif ( 'variable' == $the_product->product_type ) {
|
||||
echo '<span class="product-type tips variable" data-tip="' . __( 'Variable', 'woocommerce' ) . '"></span>';
|
||||
echo '<span class="product-type tips variable" data-tip="' . esc_attr__( 'Variable', 'woocommerce' ) . '"></span>';
|
||||
} else {
|
||||
// Assuming that we have other types in future
|
||||
echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . ucfirst( $the_product->product_type ) . '"></span>';
|
||||
|
@ -379,9 +380,9 @@ class WC_Admin_Post_Types {
|
|||
$url = wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_feature_product&product_id=' . $post->ID ), 'woocommerce-feature-product' );
|
||||
echo '<a href="' . esc_url( $url ) . '" title="'. __( 'Toggle featured', 'woocommerce' ) . '">';
|
||||
if ( $the_product->is_featured() ) {
|
||||
echo '<span class="wc-featured tips" data-tip="' . __( 'Yes', 'woocommerce' ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
|
||||
echo '<span class="wc-featured tips" data-tip="' . esc_attr__( 'Yes', 'woocommerce' ) . '">' . __( 'Yes', 'woocommerce' ) . '</span>';
|
||||
} else {
|
||||
echo '<span class="wc-featured not-featured tips" data-tip="' . __( 'No', 'woocommerce' ) . '">' . __( 'No', 'woocommerce' ) . '</span>';
|
||||
echo '<span class="wc-featured not-featured tips" data-tip="' . esc_attr__( 'No', 'woocommerce' ) . '">' . __( 'No', 'woocommerce' ) . '</span>';
|
||||
}
|
||||
echo '</a>';
|
||||
break;
|
||||
|
|
|
@ -534,7 +534,7 @@ class WC_Admin_Settings {
|
|||
?><tr valign="top" class="single_select_page">
|
||||
<th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?> <?php echo $tooltip_html; ?></th>
|
||||
<td class="forminp">
|
||||
<?php echo str_replace(' id=', " data-placeholder='" . __( 'Select a page…', 'woocommerce' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); ?> <?php echo $description; ?>
|
||||
<?php echo str_replace(' id=', " data-placeholder='" . esc_attr__( 'Select a page…', 'woocommerce' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); ?> <?php echo $description; ?>
|
||||
</td>
|
||||
</tr><?php
|
||||
break;
|
||||
|
|
|
@ -326,7 +326,7 @@ class WC_Admin_Taxonomies {
|
|||
// Ref: http://core.trac.wordpress.org/ticket/23605
|
||||
$image = str_replace( ' ', '%20', $image );
|
||||
|
||||
$columns .= '<img src="' . esc_url( $image ) . '" alt="' . __( 'Thumbnail', 'woocommerce' ) . '" class="wp-post-image" height="48" width="48" />';
|
||||
$columns .= '<img src="' . esc_url( $image ) . '" alt="' . esc_attr__( 'Thumbnail', 'woocommerce' ) . '" class="wp-post-image" height="48" width="48" />';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ class WC_Admin {
|
|||
if ( isset( $current_screen->id ) && apply_filters( 'woocommerce_display_admin_footer_text', in_array( $current_screen->id, $wc_pages ) ) ) {
|
||||
// Change the footer text
|
||||
if ( ! get_option( 'woocommerce_admin_footer_text_rated' ) ) {
|
||||
$footer_text = sprintf( __( 'If you like <strong>WooCommerce</strong> please leave us a %s★★★★★%s rating. A huge thank you from WooThemes in advance!', 'woocommerce' ), '<a href="https://wordpress.org/support/view/plugin-reviews/woocommerce?filter=5#postform" target="_blank" class="wc-rating-link" data-rated="' . __( 'Thanks :)', 'woocommerce' ) . '">', '</a>' );
|
||||
$footer_text = sprintf( __( 'If you like <strong>WooCommerce</strong> please leave us a %s★★★★★%s rating. A huge thank you from WooThemes in advance!', 'woocommerce' ), '<a href="https://wordpress.org/support/view/plugin-reviews/woocommerce?filter=5#postform" target="_blank" class="wc-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'woocommerce' ) . '">', '</a>' );
|
||||
wc_enqueue_js( "
|
||||
jQuery( 'a.wc-rating-link' ).click( function() {
|
||||
jQuery.post( '" . WC()->ajax_url() . "', { action: 'woocommerce_rated' } );
|
||||
|
|
|
@ -42,7 +42,7 @@ class WC_Meta_Box_Product_Data {
|
|||
'variable' => __( 'Variable product', 'woocommerce' )
|
||||
), $product_type );
|
||||
|
||||
$type_box = '<label for="product-type"><select id="product-type" name="product-type"><optgroup label="' . __( 'Product Type', 'woocommerce' ) . '">';
|
||||
$type_box = '<label for="product-type"><select id="product-type" name="product-type"><optgroup label="' . esc_attr__( 'Product Type', 'woocommerce' ) . '">';
|
||||
|
||||
foreach ( $product_type_selector as $value => $label ) {
|
||||
$type_box .= '<option value="' . esc_attr( $value ) . '" ' . selected( $product_type, $value, false ) .'>' . esc_html( $label ) . '</option>';
|
||||
|
@ -173,7 +173,7 @@ class WC_Meta_Box_Product_Data {
|
|||
<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . _x( 'From…', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />
|
||||
<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . _x( 'To…', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />
|
||||
<a href="#" class="cancel_sale_schedule">'. __( 'Cancel', 'woocommerce' ) .'</a>
|
||||
<img class="help_tip" style="margin-top: 21px;" data-tip="' . __( 'The sale will end at the beginning of the set date.', 'woocommerce' ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />
|
||||
<img class="help_tip" style="margin-top: 21px;" data-tip="' . esc_attr__( 'The sale will end at the beginning of the set date.', 'woocommerce' ) . '" src="' . esc_url( WC()->plugin_url() ) . '/assets/images/help.png" height="16" width="16" />
|
||||
</p>';
|
||||
|
||||
do_action( 'woocommerce_product_options_pricing' );
|
||||
|
|
|
@ -43,7 +43,7 @@ class WC_Meta_Box_Product_Images {
|
|||
echo '<li class="image" data-attachment_id="' . esc_attr( $attachment_id ) . '">
|
||||
' . wp_get_attachment_image( $attachment_id, 'thumbnail' ) . '
|
||||
<ul class="actions">
|
||||
<li><a href="#" class="delete tips" data-tip="' . __( 'Delete image', 'woocommerce' ) . '">' . __( 'Delete', 'woocommerce' ) . '</a></li>
|
||||
<li><a href="#" class="delete tips" data-tip="' . esc_attr__( 'Delete image', 'woocommerce' ) . '">' . __( 'Delete', 'woocommerce' ) . '</a></li>
|
||||
</ul>
|
||||
</li>';
|
||||
}
|
||||
|
|
|
@ -338,7 +338,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
$plugin_name = esc_html( $plugin_data['Name'] );
|
||||
|
||||
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage' , 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>';
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>';
|
||||
}
|
||||
|
||||
if ( strstr( $dirname, 'woocommerce-' ) && strstr( $plugin_data['PluginURI'], 'woothemes.com' ) ) {
|
||||
|
|
|
@ -90,7 +90,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
|
|||
$icon = (array) $this->get_icon_image( WC()->countries->get_base_country() );
|
||||
|
||||
foreach ( $icon as $i ) {
|
||||
$icon_html .= '<img src="' . esc_attr( $i ) . '" alt="' . __( 'PayPal Acceptance Mark', 'woocommerce' ) . '" />';
|
||||
$icon_html .= '<img src="' . esc_attr( $i ) . '" alt="' . esc_attr__( 'PayPal Acceptance Mark', 'woocommerce' ) . '" />';
|
||||
}
|
||||
|
||||
$icon_html .= sprintf( '<a href="%1$s" class="about_paypal" onclick="javascript:window.open(\'%1$s\',\'WIPaypal\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700\'); return false;" title="' . esc_attr__( 'What is PayPal?', 'woocommerce' ) . '">' . esc_attr__( 'What is PayPal?', 'woocommerce' ) . '</a>', esc_url( $this->get_icon_url( WC()->countries->get_base_country() ) ) );
|
||||
|
|
|
@ -280,7 +280,7 @@ function wc_placeholder_img_src() {
|
|||
function wc_placeholder_img( $size = 'shop_thumbnail' ) {
|
||||
$dimensions = wc_get_image_size( $size );
|
||||
|
||||
return apply_filters('woocommerce_placeholder_img', '<img src="' . wc_placeholder_img_src() . '" alt="' . __( 'Placeholder', 'woocommerce' ) . '" width="' . esc_attr( $dimensions['width'] ) . '" class="woocommerce-placeholder wp-post-image" height="' . esc_attr( $dimensions['height'] ) . '" />', $size, $dimensions );
|
||||
return apply_filters('woocommerce_placeholder_img', '<img src="' . wc_placeholder_img_src() . '" alt="' . esc_attr__( 'Placeholder', 'woocommerce' ) . '" width="' . esc_attr( $dimensions['width'] ) . '" class="woocommerce-placeholder wp-post-image" height="' . esc_attr( $dimensions['height'] ) . '" />', $size, $dimensions );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -128,7 +128,7 @@ function wc_products_rss_feed() {
|
|||
|
||||
$feed = get_post_type_archive_feed_link( 'product' );
|
||||
|
||||
echo '<link rel="alternate" type="application/rss+xml" title="' . __( 'New products', 'woocommerce' ) . '" href="' . esc_url( $feed ) . '" />';
|
||||
echo '<link rel="alternate" type="application/rss+xml" title="' . esc_attr__( 'New products', 'woocommerce' ) . '" href="' . esc_url( $feed ) . '" />';
|
||||
|
||||
} elseif ( is_tax( 'product_cat' ) ) {
|
||||
|
||||
|
@ -1679,7 +1679,7 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) {
|
|||
|
||||
$field .= '</select>';
|
||||
|
||||
$field .= '<noscript><input type="submit" name="woocommerce_checkout_update_totals" value="' . __( 'Update country', 'woocommerce' ) . '" /></noscript>';
|
||||
$field .= '<noscript><input type="submit" name="woocommerce_checkout_update_totals" value="' . esc_attr__( 'Update country', 'woocommerce' ) . '" /></noscript>';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -81,19 +81,19 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
|
|||
$link = add_query_arg( 'filter_' . $taxonomy_filter, implode( ',', $new_filter ), $link );
|
||||
}
|
||||
|
||||
echo '<li class="chosen"><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . $term->name . '</a></li>';
|
||||
echo '<li class="chosen"><a title="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . $term->name . '</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $min_price ) {
|
||||
$link = remove_query_arg( 'min_price' );
|
||||
echo '<li class="chosen"><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . __( 'Min', 'woocommerce' ) . ' ' . wc_price( $min_price ) . '</a></li>';
|
||||
echo '<li class="chosen"><a title="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . __( 'Min', 'woocommerce' ) . ' ' . wc_price( $min_price ) . '</a></li>';
|
||||
}
|
||||
|
||||
if ( $max_price ) {
|
||||
$link = remove_query_arg( 'max_price' );
|
||||
echo '<li class="chosen"><a title="' . __( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . __( 'Max', 'woocommerce' ) . ' ' . wc_price( $max_price ) . '</a></li>';
|
||||
echo '<li class="chosen"><a title="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . __( 'Max', 'woocommerce' ) . ' ' . wc_price( $max_price ) . '</a></li>';
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
|
|
@ -181,8 +181,8 @@ class WC_Widget_Price_Filter extends WC_Widget {
|
|||
<div class="price_slider_wrapper">
|
||||
<div class="price_slider" style="display:none;"></div>
|
||||
<div class="price_slider_amount">
|
||||
<input type="text" id="min_price" name="min_price" value="' . esc_attr( $min_price ) . '" data-min="' . esc_attr( apply_filters( 'woocommerce_price_filter_widget_min_amount', $min ) ) . '" placeholder="' . __('Min price', 'woocommerce' ) . '" />
|
||||
<input type="text" id="max_price" name="max_price" value="' . esc_attr( $max_price ) . '" data-max="' . esc_attr( apply_filters( 'woocommerce_price_filter_widget_max_amount', $max ) ) . '" placeholder="' . __( 'Max price', 'woocommerce' ) . '" />
|
||||
<input type="text" id="min_price" name="min_price" value="' . esc_attr( $min_price ) . '" data-min="' . esc_attr( apply_filters( 'woocommerce_price_filter_widget_min_amount', $min ) ) . '" placeholder="' . esc_attr__('Min price', 'woocommerce' ) . '" />
|
||||
<input type="text" id="max_price" name="max_price" value="' . esc_attr( $max_price ) . '" data-max="' . esc_attr( apply_filters( 'woocommerce_price_filter_widget_max_amount', $max ) ) . '" placeholder="' . esc_attr__( 'Max price', 'woocommerce' ) . '" />
|
||||
<button type="submit" class="button">' . __( 'Filter', 'woocommerce' ) . '</button>
|
||||
<div class="price_label" style="display:none;">
|
||||
' . __( 'Price:', 'woocommerce' ) . ' <span class="from"></span> — <span class="to"></span>
|
||||
|
|
|
@ -22,7 +22,7 @@ foreach ( $items as $item_id => $item ) :
|
|||
|
||||
// Show title/image etc
|
||||
if ( $show_image ) {
|
||||
echo apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $_product->get_image_id() ? current( wp_get_attachment_image_src( $_product->get_image_id(), 'thumbnail') ) : wc_placeholder_img_src() ) .'" alt="' . __( 'Product Image', 'woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-right: 10px;" /></div>', $item );
|
||||
echo apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $_product->get_image_id() ? current( wp_get_attachment_image_src( $_product->get_image_id(), 'thumbnail') ) : wc_placeholder_img_src() ) .'" alt="' . esc_attr__( 'Product Image', 'woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-right: 10px;" /></div>', $item );
|
||||
}
|
||||
|
||||
// Product name
|
||||
|
|
|
@ -127,11 +127,11 @@ class Functions extends \WC_Unit_Test_Case {
|
|||
);
|
||||
|
||||
foreach ( $sizes as $size => $values ) {
|
||||
$img = '<img src="' . wc_placeholder_img_src() . '" alt="' . __( 'Placeholder', 'woocommerce' ) . '" width="' . $values['width'] . '" class="woocommerce-placeholder wp-post-image" height="' . $values['height'] . '" />';
|
||||
$img = '<img src="' . wc_placeholder_img_src() . '" alt="' . esc_attr__( 'Placeholder', 'woocommerce' ) . '" width="' . $values['width'] . '" class="woocommerce-placeholder wp-post-image" height="' . $values['height'] . '" />';
|
||||
$this->assertEquals( apply_filters( 'woocommerce_placeholder_img', $img ), wc_placeholder_img( $size ) );
|
||||
}
|
||||
|
||||
$img = '<img src="' . wc_placeholder_img_src() . '" alt="' . __( 'Placeholder', 'woocommerce' ) . '" width="180" class="woocommerce-placeholder wp-post-image" height="180" />';
|
||||
$img = '<img src="' . wc_placeholder_img_src() . '" alt="' . esc_attr__( 'Placeholder', 'woocommerce' ) . '" width="180" class="woocommerce-placeholder wp-post-image" height="180" />';
|
||||
$this->assertEquals( apply_filters( 'woocommerce_placeholder_img', $img ), wc_placeholder_img() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue