Added new filters to help translation plugins, closes #7338

This commit is contained in:
Claudio Sanches 2015-02-10 10:51:44 -02:00
parent a92156337b
commit 6ca681ce86
2 changed files with 5 additions and 5 deletions

View File

@ -194,7 +194,7 @@ class WC_Admin_Dashboard {
echo '<div class="star-rating" title="' . esc_attr( $rating ) . '">
<span style="width:'. ( $rating * 20 ) . '%">' . $rating . ' ' . __( 'out of 5', 'woocommerce' ) . '</span></div>';
echo '<h4 class="meta"><a href="' . get_permalink( $comment->ID ) . '#comment-' . absint( $comment->comment_ID ) .'">' . esc_html__( $comment->post_title ) . '</a> ' . __( 'reviewed by', 'woocommerce' ) . ' ' . esc_html( $comment->comment_author ) .'</h4>';
echo '<h4 class="meta"><a href="' . get_permalink( $comment->ID ) . '#comment-' . absint( $comment->comment_ID ) .'">' . esc_html__( apply_filters( 'woocommerce_admin_dashboard_recent_reviews', $comment->post_title, $comment ) ) . '</a> ' . __( 'reviewed by', 'woocommerce' ) . ' ' . esc_html( $comment->comment_author ) .'</h4>';
echo '<blockquote>' . wp_kses_data( $comment->comment_excerpt ) . ' [...]</blockquote></li>';
}

View File

@ -312,9 +312,9 @@ class WC_Email extends WC_Settings_API {
*/
public function get_content_type() {
switch ( $this->get_email_type() ) {
case "html" :
case 'html' :
return 'text/html';
case "multipart" :
case 'multipart' :
return 'multipart/alternative';
default :
return 'text/plain';
@ -329,7 +329,7 @@ class WC_Email extends WC_Settings_API {
* @return string
*/
public function get_option( $key, $empty_value = null ) {
return __( parent::get_option( $key, $empty_value ) );
return apply_filters( 'woocommerce_email_get_option', __( parent::get_option( $key, $empty_value ) ), $this );
}
/**
@ -338,7 +338,7 @@ class WC_Email extends WC_Settings_API {
* @return bool
*/
public function is_enabled() {
$enabled = $this->enabled == "yes" ? true : false;
$enabled = $this->enabled == 'yes' ? true : false;
return apply_filters( 'woocommerce_email_enabled_' . $this->id, $enabled, $this->object );
}