esc_url() run
This commit is contained in:
parent
627340ea6a
commit
7674bbe60e
|
@ -171,7 +171,7 @@ function woocommerce_add_attribute() {
|
|||
|
||||
<td><a href="edit-tags.php?taxonomy=<?php echo $woocommerce->attribute_taxonomy_name($tax->attribute_name); ?>&post_type=product"><?php echo $tax->attribute_name; ?></a>
|
||||
|
||||
<div class="row-actions"><span class="edit"><a href="<?php echo add_query_arg('edit', $tax->attribute_id, 'admin.php?page=attributes') ?>"><?php _e('Edit', 'woothemes'); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo add_query_arg('delete', $tax->attribute_id, 'admin.php?page=attributes') ?>"><?php _e('Delete', 'woothemes'); ?></a></span></div>
|
||||
<div class="row-actions"><span class="edit"><a href="<?php echo esc_url( add_query_arg('edit', $tax->attribute_id, 'admin.php?page=attributes') ); ?>"><?php _e('Edit', 'woothemes'); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo esc_url( add_query_arg('delete', $tax->attribute_id, 'admin.php?page=attributes') ); ?>"><?php _e('Delete', 'woothemes'); ?></a></span></div>
|
||||
</td>
|
||||
<td><?php echo ucwords($tax->attribute_label); ?></td>
|
||||
<td><?php echo ucwords($tax->attribute_type); ?></td>
|
||||
|
|
|
@ -360,7 +360,7 @@ function woocommerce_duplicate_product_post_button() {
|
|||
$notifyUrl = "admin.php?action=duplicate_product&post=" . $_GET['post'];
|
||||
?>
|
||||
<div id="duplicate-action"><a class="submitduplicate duplication"
|
||||
href="<?php echo $notifyUrl; ?>"><?php _e('Copy to a new draft', 'woothemes'); ?></a>
|
||||
href="<?php echo esc_url( $notifyUrl ); ?>"><?php _e('Copy to a new draft', 'woothemes'); ?></a>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
|
|
@ -155,7 +155,7 @@ function woocommerce_order_items_meta_box($post) {
|
|||
?>" src="<?php echo $woocommerce->plugin_url(); ?>/assets/images/tip.png" />
|
||||
</td>
|
||||
<td class="name">
|
||||
<a href="<?php echo admin_url('post.php?post='. $_product->id .'&action=edit'); ?>"><?php echo $item['name']; ?></a>
|
||||
<a href="<?php echo esc_url( admin_url('post.php?post='. $_product->id .'&action=edit') ); ?>"><?php echo $item['name']; ?></a>
|
||||
<?php
|
||||
if (isset($_product->variation_data)) :
|
||||
echo '<br/>' . woocommerce_get_formatted_variation( $_product->variation_data, true );
|
||||
|
@ -272,7 +272,7 @@ function woocommerce_order_actions_meta_box($post) {
|
|||
else
|
||||
$delete_text = __('Move to Trash');
|
||||
?>
|
||||
<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php
|
||||
<a class="submitdelete deletion" href="<?php echo esc_url( get_delete_post_link($post->ID) ); ?>"><?php echo $delete_text; ?></a><?php
|
||||
} ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -77,7 +77,7 @@ function woocommerce_cart( $atts ) {
|
|||
endif;
|
||||
|
||||
?>
|
||||
<form action="<?php echo $woocommerce->cart->get_cart_url(); ?>" method="post">
|
||||
<form action="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" method="post">
|
||||
<table class="shop_table cart" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -98,9 +98,9 @@ function woocommerce_cart( $atts ) {
|
|||
|
||||
?>
|
||||
<tr>
|
||||
<td class="product-remove"><a href="<?php echo $woocommerce->cart->get_remove_url($cart_item_key); ?>" class="remove" title="<?php _e('Remove this item', 'woothemes'); ?>">×</a></td>
|
||||
<td class="product-remove"><a href="<?php echo esc_url( $woocommerce->cart->get_remove_url($cart_item_key) ); ?>" class="remove" title="<?php _e('Remove this item', 'woothemes'); ?>">×</a></td>
|
||||
<td class="product-thumbnail">
|
||||
<a href="<?php echo get_permalink($values['product_id']); ?>">
|
||||
<a href="<?php echo esc_url( get_permalink($values['product_id']) ); ?>">
|
||||
<?php
|
||||
if ($values['variation_id'] && has_post_thumbnail($values['variation_id'])) :
|
||||
echo get_the_post_thumbnail($values['variation_id'], 'shop_thumbnail');
|
||||
|
@ -113,7 +113,7 @@ function woocommerce_cart( $atts ) {
|
|||
</a>
|
||||
</td>
|
||||
<td class="product-name">
|
||||
<a href="<?php echo get_permalink($values['product_id']); ?>"><?php echo apply_filters('woocommerce_cart_product_title', $_product->get_title(), $_product); ?></a>
|
||||
<a href="<?php echo esc_url( get_permalink($values['product_id']) ); ?>"><?php echo apply_filters('woocommerce_cart_product_title', $_product->get_title(), $_product); ?></a>
|
||||
<?php
|
||||
if($_product instanceof woocommerce_product_variation && is_array($values['variation'])) :
|
||||
echo woocommerce_get_formatted_variation( $values['variation'] );
|
||||
|
@ -137,7 +137,7 @@ function woocommerce_cart( $atts ) {
|
|||
<label for="coupon_code"><?php _e('Coupon', 'woothemes'); ?>:</label> <input name="coupon_code" class="input-text" id="coupon_code" value="" /> <input type="submit" class="button" name="apply_coupon" value="<?php _e('Apply Coupon', 'woothemes'); ?>" />
|
||||
</div>
|
||||
<?php $woocommerce->nonce_field('cart') ?>
|
||||
<input type="submit" class="button" name="update_cart" value="<?php _e('Update Shopping Cart', 'woothemes'); ?>" /> <a href="<?php echo $woocommerce->cart->get_checkout_url(); ?>" class="checkout-button button alt"><?php _e('Proceed to Checkout →', 'woothemes'); ?></a>
|
||||
<input type="submit" class="button" name="update_cart" value="<?php _e('Update Shopping Cart', 'woothemes'); ?>" /> <a href="<?php echo esc_url( $woocommerce->cart->get_checkout_url() ); ?>" class="checkout-button button alt"><?php _e('Proceed to Checkout →', 'woothemes'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -37,7 +37,7 @@ function woocommerce_my_account( $atts ) {
|
|||
<h2><?php _e('Available downloads', 'woothemes'); ?></h2>
|
||||
<ul class="digital-downloads">
|
||||
<?php foreach ($downloads as $download) : ?>
|
||||
<li><?php if (is_numeric($download['downloads_remaining'])) : ?><span class="count"><?php echo $download['downloads_remaining'] . _n(' download Remaining', ' downloads Remaining', $download['downloads_remaining'], 'woothemes'); ?></span><?php endif; ?> <a href="<?php echo $download['download_url']; ?>"><?php echo $download['download_name']; ?></a></li>
|
||||
<li><?php if (is_numeric($download['downloads_remaining'])) : ?><span class="count"><?php echo $download['downloads_remaining'] . _n(' download Remaining', ' downloads Remaining', $download['downloads_remaining'], 'woothemes'); ?></span><?php endif; ?> <a href="<?php echo esc_url( $download['download_url'] ); ?>"><?php echo $download['download_name']; ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
@ -68,10 +68,10 @@ function woocommerce_my_account( $atts ) {
|
|||
<td><?php echo $order->status; ?></td>
|
||||
<td style="text-align:right; white-space:nowrap;">
|
||||
<?php if ($order->status=='pending') : ?>
|
||||
<a href="<?php echo $order->get_checkout_payment_url(); ?>" class="button pay"><?php _e('Pay', 'woothemes'); ?></a>
|
||||
<a href="<?php echo $order->get_cancel_order_url(); ?>" class="button cancel"><?php _e('Cancel', 'woothemes'); ?></a>
|
||||
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php _e('Pay', 'woothemes'); ?></a>
|
||||
<a href="<?php echo esc_url( $order->get_cancel_order_url() ); ?>" class="button cancel"><?php _e('Cancel', 'woothemes'); ?></a>
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo add_query_arg('order', $order->id, get_permalink(get_option('woocommerce_view_order_page_id'))); ?>" class="button"><?php _e('View', 'woothemes'); ?></a>
|
||||
<a href="<?php echo esc_url( add_query_arg('order', $order->id, get_permalink(get_option('woocommerce_view_order_page_id'))) ); ?>" class="button"><?php _e('View', 'woothemes'); ?></a>
|
||||
</td>
|
||||
</tr><?php
|
||||
endforeach;
|
||||
|
@ -87,7 +87,7 @@ function woocommerce_my_account( $atts ) {
|
|||
|
||||
<header class="title">
|
||||
<h3><?php _e('Billing Address', 'woothemes'); ?></h3>
|
||||
<a href="<?php echo add_query_arg('address', 'billing', get_permalink(get_option('woocommerce_edit_address_page_id'))); ?>" class="edit"><?php _e('Edit', 'woothemes'); ?></a>
|
||||
<a href="<?php echo esc_url( add_query_arg('address', 'billing', get_permalink(get_option('woocommerce_edit_address_page_id'))) ); ?>" class="edit"><?php _e('Edit', 'woothemes'); ?></a>
|
||||
</header>
|
||||
<address>
|
||||
<?php
|
||||
|
@ -116,7 +116,7 @@ function woocommerce_my_account( $atts ) {
|
|||
|
||||
<header class="title">
|
||||
<h3><?php _e('Shipping Address', 'woothemes'); ?></h3>
|
||||
<a href="<?php echo add_query_arg('address', 'shipping', get_permalink(get_option('woocommerce_edit_address_page_id'))); ?>" class="edit"><?php _e('Edit', 'woothemes'); ?></a>
|
||||
<a href="<?php echo esc_url( add_query_arg('address', 'shipping', get_permalink(get_option('woocommerce_edit_address_page_id'))) ); ?>" class="edit"><?php _e('Edit', 'woothemes'); ?></a>
|
||||
</header>
|
||||
<address>
|
||||
<?php
|
||||
|
@ -252,7 +252,7 @@ function woocommerce_edit_address() {
|
|||
|
||||
$woocommerce->show_messages();
|
||||
?>
|
||||
<form action="<?php echo add_query_arg('address', $load_address, get_permalink(get_option('woocommerce_edit_address_page_id'))); ?>" method="post">
|
||||
<form action="<?php echo esc_url( add_query_arg('address', $load_address, get_permalink(get_option('woocommerce_edit_address_page_id'))) ); ?>" method="post">
|
||||
|
||||
<h3><?php if ($load_address=='billing') _e('Billing Address', 'woothemes'); else _e('Shipping Address', 'woothemes'); ?></h3>
|
||||
|
||||
|
@ -408,7 +408,7 @@ function woocommerce_change_password() {
|
|||
$woocommerce->show_messages();
|
||||
|
||||
?>
|
||||
<form action="<?php echo get_permalink(get_option('woocommerce_change_password_page_id')); ?>" method="post">
|
||||
<form action="<?php echo esc_url( get_permalink(get_option('woocommerce_change_password_page_id')) ); ?>" method="post">
|
||||
|
||||
<p class="form-row form-row-first">
|
||||
<label for="password-1"><?php _e('New password', 'woothemes'); ?> <span class="required">*</span></label>
|
||||
|
|
|
@ -136,7 +136,7 @@ function woocommerce_order_tracking( $atts ) {
|
|||
else :
|
||||
|
||||
?>
|
||||
<form action="<?php echo get_permalink($post->ID); ?>" method="post" class="track_order">
|
||||
<form action="<?php echo esc_url( get_permalink($post->ID) ); ?>" method="post" class="track_order">
|
||||
|
||||
<p><?php _e('To track your order please enter your Order ID in the box below and press return. This was given to you on your receipt and in the confirmation email you should have received.', 'woothemes'); ?></p>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ global $woocommerce;
|
|||
// filter hook for include new pages inside the payment method
|
||||
$get_checkout_url = apply_filters( 'woocommerce_get_checkout_url', $woocommerce->cart->get_checkout_url() ); ?>
|
||||
|
||||
<form name="checkout" method="post" class="checkout" action="<?php echo $get_checkout_url; ?>">
|
||||
<form name="checkout" method="post" class="checkout" action="<?php echo esc_url( $get_checkout_url ); ?>">
|
||||
|
||||
<div class="col2-set" id="customer_details">
|
||||
<div class="col-1">
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
|
||||
<?php if (get_option('woocommerce_terms_page_id')>0) : ?>
|
||||
<p class="form-row terms">
|
||||
<label for="terms" class="checkbox"><?php _e('I accept the', 'woothemes'); ?> <a href="<?php echo get_permalink(get_option('woocommerce_terms_page_id')); ?>" target="_blank"><?php _e('terms & conditions', 'woothemes'); ?></a></label>
|
||||
<label for="terms" class="checkbox"><?php _e('I accept the', 'woothemes'); ?> <a href="<?php echo esc_url( get_permalink(get_option('woocommerce_terms_page_id')) ); ?>" target="_blank"><?php _e('terms & conditions', 'woothemes'); ?></a></label>
|
||||
<input type="checkbox" class="input-checkbox" name="terms" <?php if (isset($_POST['terms'])) echo 'checked="checked"'; ?> id="terms" />
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -68,7 +68,7 @@ class WooCommerce_Widget_Featured_Products extends WP_Widget {
|
|||
<ul class="product_list_widget">
|
||||
<?php foreach ($featured_posts as $r) : $_product = &new woocommerce_product( $r->ID ); ?>
|
||||
|
||||
<li><a href="<?php echo get_permalink( $r->ID ) ?>" title="<?php echo esc_attr($r->post_title ? $r->post_title : $r->ID); ?>">
|
||||
<li><a href="<?php echo esc_url( get_permalink( $r->ID ) ); ?>" title="<?php echo esc_attr($r->post_title ? $r->post_title : $r->ID); ?>">
|
||||
<?php if (has_post_thumbnail( $r->ID )) echo get_the_post_thumbnail($r->ID, 'shop_thumbnail'); else echo '<img src="'.$woocommerce->plugin_url().'/assets/images/placeholder.png" alt="Placeholder" width="'.$woocommerce->get_image_size('shop_thumbnail_image_width').'px" height="'.$woocommerce->get_image_size('shop_thumbnail_image_height').'px" />'; ?>
|
||||
<?php if ( $r->post_title ) echo get_the_title( $r->ID ); else echo $r->ID; ?>
|
||||
</a> <?php echo $_product->get_price_html(); ?></li>
|
||||
|
|
|
@ -43,7 +43,7 @@ class WooCommerce_Widget_Product_Search extends WP_Widget {
|
|||
if ($title) echo $before_title . $title . $after_title;
|
||||
|
||||
?>
|
||||
<form role="search" method="get" id="searchform" action="<?php echo home_url(); ?>">
|
||||
<form role="search" method="get" id="searchform" action="<?php echo esc_url( home_url() ); ?>">
|
||||
<div>
|
||||
<label class="screen-reader-text" for="s"><?php _e('Search for:', 'woothemes'); ?></label>
|
||||
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Search for products', 'woothemes'); ?>" />
|
||||
|
|
|
@ -72,7 +72,7 @@ class WooCommerce_Widget_Top_Rated_Products extends WP_Widget {
|
|||
<ul class="product_list_widget">
|
||||
<?php while ($top_rated_posts->have_posts()) : $top_rated_posts->the_post(); $_product = &new woocommerce_product( $top_rated_posts->post->ID );
|
||||
?>
|
||||
<li><a href="<?php echo get_permalink( $top_rated_posts->post->ID ) ?>" title="<?php echo esc_attr($top_rated_posts->post->post_title ? $top_rated_posts->post->post_title : $top_rated_posts->post->ID); ?>">
|
||||
<li><a href="<?php echo esc_url( get_permalink( $top_rated_posts->post->ID ) ); ?>" title="<?php echo esc_attr($top_rated_posts->post->post_title ? $top_rated_posts->post->post_title : $top_rated_posts->post->ID); ?>">
|
||||
<?php if (has_post_thumbnail( $top_rated_posts->post->ID )) echo get_the_post_thumbnail($top_rated_posts->post->ID, 'shop_thumbnail'); else echo '<img src="'.$woocommerce->plugin_url().'/assets/images/placeholder.png" alt="Placeholder" width="'.$woocommerce->get_image_size('shop_thumbnail_image_width').'px" height="'.$woocommerce->get_image_size('shop_thumbnail_image_height').'px" />'; ?>
|
||||
<?php if ( $top_rated_posts->post->post_title ) echo get_the_title( $top_rated_posts->post->ID ); else echo $top_rated_posts->post->ID; ?>
|
||||
</a> <?php echo $_product->get_rating_html('sidebar'); ?><?php echo $_product->get_price_html(); ?></li>
|
||||
|
|
|
@ -211,7 +211,7 @@ function woocommerce_add_order_item() {
|
|||
?>" src="<?php echo $woocommerce->plugin_url(); ?>/assets/images/tip.png" />
|
||||
</td>
|
||||
<td class="name">
|
||||
<a href="<?php echo admin_url('post.php?post='. $_product->id .'&action=edit'); ?>"><?php echo $_product->get_title(); ?></a>
|
||||
<a href="<?php echo esc_url( admin_url('post.php?post='. $_product->id .'&action=edit') ); ?>"><?php echo $_product->get_title(); ?></a>
|
||||
<?php
|
||||
if (isset($_product->variation_data)) :
|
||||
echo '<br/>' . woocommerce_get_formatted_variation( $_product->variation_data, true );
|
||||
|
|
|
@ -63,7 +63,7 @@ if (!function_exists('woocommerce_template_loop_add_to_cart')) {
|
|||
return;
|
||||
endif;
|
||||
|
||||
?><a href="<?php echo $_product->add_to_cart_url(); ?>" rel="<?php echo $_product->id; ?>" class="button add_to_cart_button product_type_<?php echo $_product->product_type; ?>"><?php
|
||||
?><a href="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" rel="<?php echo $_product->id; ?>" class="button add_to_cart_button product_type_<?php echo $_product->product_type; ?>"><?php
|
||||
switch ($_product->product_type) :
|
||||
case "variable" :
|
||||
echo apply_filters('variable_add_to_cart_text', __('Select options', 'woothemes'));
|
||||
|
@ -270,7 +270,7 @@ if (!function_exists('woocommerce_simple_add_to_cart')) {
|
|||
// Don't show cart if out of stock
|
||||
if (!$_product->is_in_stock()) return;
|
||||
?>
|
||||
<form action="<?php echo $_product->add_to_cart_url(); ?>" class="cart" method="post">
|
||||
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post">
|
||||
<div class="quantity"><input name="quantity" value="1" size="4" title="Qty" class="input-text qty text" maxlength="12" /></div>
|
||||
<button type="submit" class="button alt"><?php _e('Add to cart', 'woothemes'); ?></button>
|
||||
<?php do_action('woocommerce_add_to_cart_form'); ?>
|
||||
|
@ -298,7 +298,7 @@ if (!function_exists('woocommerce_downloadable_add_to_cart')) {
|
|||
// Don't show cart if out of stock
|
||||
if (!$_product->is_in_stock()) return;
|
||||
?>
|
||||
<form action="<?php echo $_product->add_to_cart_url(); ?>" class="cart" method="post">
|
||||
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post">
|
||||
<button type="submit" class="button alt"><?php _e('Add to cart', 'woothemes'); ?></button>
|
||||
<?php do_action('woocommerce_add_to_cart_form'); ?>
|
||||
</form>
|
||||
|
@ -311,7 +311,7 @@ if (!function_exists('woocommerce_grouped_add_to_cart')) {
|
|||
global $_product;
|
||||
|
||||
?>
|
||||
<form action="<?php echo $_product->add_to_cart_url(); ?>" class="cart" method="post">
|
||||
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="cart" method="post">
|
||||
<table cellspacing="0" class="group_table">
|
||||
<tbody>
|
||||
<?php foreach ($_product->children as $child) : $child_product = &new woocommerce_product( $child->ID ); $cavailability = $child_product->get_availability(); ?>
|
||||
|
@ -380,7 +380,7 @@ if (!function_exists('woocommerce_variable_add_to_cart')) {
|
|||
var product_variations = <?php echo json_encode($available_variations) ?>;
|
||||
</script>
|
||||
|
||||
<form action="<?php echo $_product->add_to_cart_url(); ?>" class="variations_form cart" method="post">
|
||||
<form action="<?php echo esc_url( $_product->add_to_cart_url() ); ?>" class="variations_form cart" method="post">
|
||||
<table class="variations" cellspacing="0">
|
||||
<tbody>
|
||||
<?php foreach ($attributes as $name => $options) :?>
|
||||
|
@ -592,7 +592,7 @@ if (!function_exists('woocommerce_shipping_calculator')) {
|
|||
global $woocommerce;
|
||||
if ($woocommerce->shipping->enabled && get_option('woocommerce_enable_shipping_calc')=='yes' && $woocommerce->cart->needs_shipping()) :
|
||||
?>
|
||||
<form class="shipping_calculator" action="<?php echo $woocommerce->cart->get_cart_url(); ?>" method="post">
|
||||
<form class="shipping_calculator" action="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" method="post">
|
||||
<h2><a href="#" class="shipping-calculator-button"><?php _e('Calculate Shipping', 'woothemes'); ?> <span>↓</span></a></h2>
|
||||
<section class="shipping-calculator-form">
|
||||
<p class="form-row">
|
||||
|
@ -767,7 +767,7 @@ if (!function_exists('woocommerce_login_form')) {
|
|||
<p class="form-row">
|
||||
<?php $woocommerce->nonce_field('login', 'login') ?>
|
||||
<input type="submit" class="button" name="login" value="<?php _e('Login', 'woothemes'); ?>" />
|
||||
<a class="lost_password" href="<?php echo home_url('wp-login.php?action=lostpassword'); ?>"><?php _e('Lost Password?', 'woothemes'); ?></a>
|
||||
<a class="lost_password" href="<?php echo esc_url( home_url('wp-login.php?action=lostpassword') ); ?>"><?php _e('Lost Password?', 'woothemes'); ?></a>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue