Merge pull request #1448 from franticpsyx/master

Back end filters & support for ML plugins
This commit is contained in:
Mike Jolley 2012-08-31 06:20:07 -07:00
commit 45d43bd148
6 changed files with 11 additions and 11 deletions

View File

@ -139,12 +139,12 @@ function variable_product_type_options() {
if ($attribute['is_taxonomy']) :
$post_terms = wp_get_post_terms( $post->ID, $attribute['name'] );
foreach ($post_terms as $term) :
echo '<option '.selected($variation_selected_value, $term->slug, false).' value="'.$term->slug.'">'.$term->name.'</option>';
echo '<option '.selected($variation_selected_value, $term->slug, false).' value="'.$term->slug.'">' . apply_filters( 'woocommerce_variation_option_name', $term->name ) . '</option>';
endforeach;
else :
$options = explode('|', $attribute['value']);
foreach ($options as $option) :
echo '<option '.selected($variation_selected_value, $option, false).' value="'.$option.'">'.ucfirst($option).'</option>';
echo '<option '.selected($variation_selected_value, $option, false).' value="'.$option.'">'.ucfirst( apply_filters( 'woocommerce_variation_option_name', $option ) ).'</option>';
endforeach;
endif;

View File

@ -330,7 +330,7 @@ function woocommerce_product_data_box() {
<h3>
<button type="button" class="remove_row button"><?php _e('Remove', 'woocommerce'); ?></button>
<div class="handlediv" title="<?php _e('Click to toggle', 'woocommerce'); ?>"></div>
<strong class="attribute_name"><?php echo ($tax->attribute_label) ? $tax->attribute_label : $tax->attribute_name; ?></strong>
<strong class="attribute_name"><?php echo apply_filters( 'woocommerce_attribute_label', ($tax->attribute_label) ? $tax->attribute_label : $tax->attribute_name, $tax->attribute_name ); ?></strong>
</h3>
<table cellpadding="0" cellspacing="0" class="woocommerce_attribute_data wc-metabox-content">
<tbody>
@ -410,7 +410,7 @@ function woocommerce_product_data_box() {
<h3>
<button type="button" class="remove_row button"><?php _e('Remove', 'woocommerce'); ?></button>
<div class="handlediv" title="<?php _e('Click to toggle', 'woocommerce'); ?>"></div>
<strong class="attribute_name"><?php echo esc_attr( $attribute['name'] ); ?></strong>
<strong class="attribute_name"><?php echo apply_filters( 'woocommerce_attribute_label', esc_attr( $attribute['name'] ), esc_attr( $attribute['name'] ) ); ?></strong>
</h3>
<table cellpadding="0" cellspacing="0" class="woocommerce_attribute_data wc-metabox-content">
<tbody>

View File

@ -275,7 +275,7 @@ function woocommerce_dashboard_recent_reviews() {
echo '<div class="star-rating" title="'.$rating.'">
<span style="width:'.($rating*10).'px">'.$rating.' '.__('out of 5', 'woocommerce').'</span></div>';
echo '<h4 class="meta"><a href="'.get_permalink($comment->ID).'#comment-'.$comment->comment_ID .'">'.$comment->post_title.'</a> reviewed by ' .strip_tags($comment->comment_author) .'</h4>';
echo '<h4 class="meta"><a href="'.get_permalink($comment->ID).'#comment-'.$comment->comment_ID .'">'. __( $comment->post_title ) .'</a> reviewed by ' .strip_tags($comment->comment_author) .'</h4>';
echo '<blockquote>'.strip_tags($comment->comment_excerpt).' [...]</blockquote></li>';
endforeach;

View File

@ -1002,7 +1002,7 @@ function woocommerce_top_sellers() {
$product = get_post($product_id);
if ($product) :
$product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>';
$product_name = '<a href="'.get_permalink($product->ID).'">'. __( $product->post_title ) .'</a>';
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
else :
$product_name = __('Product does not exist', 'woocommerce');
@ -1102,7 +1102,7 @@ function woocommerce_top_earners() {
$product = get_post($product_id);
if ($product) :
$product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>';
$product_name = '<a href="'.get_permalink($product->ID).'">'. __( $product->post_title ) .'</a>';
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
else :
$product_name = __('Product no longer exists', 'woocommerce');
@ -1580,7 +1580,7 @@ function woocommerce_stock_overview() {
if ( $stock <= $nostockamount ) continue;
$title = $product->post_title;
$title = __( $product->post_title );
if ( $sku )
$title .= ' (' . __('SKU', 'woocommerce') . ': ' . $sku . ')';
@ -1615,7 +1615,7 @@ function woocommerce_stock_overview() {
if ( $stock > $nostockamount ) continue;
$title = $product->post_title;
$title = __( $product->post_title );
if ( $sku )
$title .= ' (' . __('SKU', 'woocommerce') . ': ' . $sku . ')';

View File

@ -278,7 +278,7 @@ class WooCommerce_Widget_Layered_Nav extends WP_Widget {
echo '<li ' . $class . '>';
echo ( $count > 0 || $option_is_set ) ? '<a href="' . $link . '">' : '<span>';
echo ( $count > 0 || $option_is_set ) ? '<a href="' . apply_filters( 'woocommerce_layered_nav_link', $link ) . '">' : '<span>';
echo $term->name;

View File

@ -1513,7 +1513,7 @@ class Woocommerce {
global $wpdb;
if ( ! $this->attribute_taxonomies )
$this->attribute_taxonomies = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies;" );
return $this->attribute_taxonomies;
return apply_filters( 'woocommerce_attribute_taxonomies', $this->attribute_taxonomies );
}