From 9518cfdd31c288c363cc267f368f2c2207e2a506 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 21 Jan 2014 18:52:07 -0200 Subject: [PATCH] fixed the indentation in includes/admin/post-types/class-wc-admin-cpt-shop_order.php --- .../class-wc-admin-cpt-shop_order.php | 130 +++++++++--------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/includes/admin/post-types/class-wc-admin-cpt-shop_order.php b/includes/admin/post-types/class-wc-admin-cpt-shop_order.php index d5b40e7d6c6..1d1b7f453f3 100644 --- a/includes/admin/post-types/class-wc-admin-cpt-shop_order.php +++ b/includes/admin/post-types/class-wc-admin-cpt-shop_order.php @@ -137,12 +137,12 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { break; case "billing_address" : if ( $the_order->get_formatted_billing_address() ) - echo '' . esc_html( preg_replace( '##i', ', ', $the_order->get_formatted_billing_address() ) ) .''; - else - echo '–'; + echo '' . esc_html( preg_replace( '##i', ', ', $the_order->get_formatted_billing_address() ) ) .''; + else + echo '–'; - if ( $the_order->payment_method_title ) - echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . ''; + if ( $the_order->payment_method_title ) + echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . ''; break; case "order_items" : @@ -175,12 +175,12 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { break; case "shipping_address" : if ( $the_order->get_formatted_shipping_address() ) - echo ''. esc_html( preg_replace( '##i', ', ', $the_order->get_formatted_shipping_address() ) ) .''; - else - echo '–'; + echo ''. esc_html( preg_replace( '##i', ', ', $the_order->get_formatted_shipping_address() ) ) .''; + else + echo '–'; - if ( $the_order->get_shipping_method() ) - echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->get_shipping_method() ) . ''; + if ( $the_order->get_shipping_method() ) + echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->get_shipping_method() ) . ''; break; case "order_notes" : @@ -211,17 +211,17 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { echo esc_html( strip_tags( $the_order->get_formatted_order_total() ) ); if ( $the_order->payment_method_title ) - echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . ''; + echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . ''; break; case "order_title" : - $customer_tip = ''; + $customer_tip = ''; - if ( $address = $the_order->get_formatted_billing_address() ) - $customer_tip .= __( 'Billing:', 'woocommerce' ) . ' ' . $address . '

'; + if ( $address = $the_order->get_formatted_billing_address() ) + $customer_tip .= __( 'Billing:', 'woocommerce' ) . ' ' . $address . '

'; - if ( $the_order->billing_phone ) - $customer_tip .= __( 'Tel:', 'woocommerce' ) . ' ' . $the_order->billing_phone; + if ( $the_order->billing_phone ) + $customer_tip .= __( 'Tel:', 'woocommerce' ) . ' ' . $the_order->billing_phone; echo '
'; @@ -230,46 +230,46 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { if ( ! empty( $user_info ) ) { - $user = ''; + $user = ''; - if ( $user_info->first_name || $user_info->last_name ) - $user .= esc_html( $user_info->first_name . ' ' . $user_info->last_name ); - else - $user .= esc_html( $user_info->display_name ); + if ( $user_info->first_name || $user_info->last_name ) + $user .= esc_html( $user_info->first_name . ' ' . $user_info->last_name ); + else + $user .= esc_html( $user_info->display_name ); - $user .= ''; + $user .= ''; - } else { - $user = __( 'Guest', 'woocommerce' ); - } + } else { + $user = __( 'Guest', 'woocommerce' ); + } - if ( $the_order->user_id ) + if ( $the_order->user_id ) $user_info = get_userdata( $the_order->user_id ); if ( ! empty( $user_info ) ) { - $username = ''; + $username = ''; - if ( $user_info->first_name || $user_info->last_name ) - $username .= esc_html( ucfirst( $user_info->first_name ) . ' ' . ucfirst( $user_info->last_name ) ); - else - $username .= esc_html( ucfirst( $user_info->display_name ) ); + if ( $user_info->first_name || $user_info->last_name ) + $username .= esc_html( ucfirst( $user_info->first_name ) . ' ' . ucfirst( $user_info->last_name ) ); + else + $username .= esc_html( ucfirst( $user_info->display_name ) ); - $username .= ''; + $username .= ''; - } else { - if ( $the_order->billing_first_name || $the_order->billing_last_name ) - $username = trim( $the_order->billing_first_name . ' ' . $the_order->billing_last_name ); - else - $username = __( 'Guest', 'woocommerce' ); - } + } else { + if ( $the_order->billing_first_name || $the_order->billing_last_name ) + $username = trim( $the_order->billing_first_name . ' ' . $the_order->billing_last_name ); + else + $username = __( 'Guest', 'woocommerce' ); + } - printf( __( '%s by %s', 'woocommerce' ), '' . esc_attr( $the_order->get_order_number() ) . '', $username ); + printf( __( '%s by %s', 'woocommerce' ), '' . esc_attr( $the_order->get_order_number() ) . '', $username ); - if ( $the_order->billing_email ) - echo ''; + if ( $the_order->billing_email ) + echo ''; - echo '
'; + echo ''; break; case "order_actions" : @@ -360,11 +360,11 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { * @return array */ public function remove_row_actions( $actions ) { - if( get_post_type() === 'shop_order' ) { - unset( $actions['view'] ); - unset( $actions['inline hide-if-no-js'] ); - } - return $actions; + if( get_post_type() === 'shop_order' ) { + unset( $actions['view'] ); + unset( $actions['inline hide-if-no-js'] ); + } + return $actions; } /** @@ -418,25 +418,25 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { jQuery('select#dropdown_shop_order_status, select[name=m]').css('width', '150px').chosen(); jQuery('select#dropdown_customers').css('width', '250px').ajaxChosen({ - method: 'GET', - url: '" . admin_url('admin-ajax.php') . "', - dataType: 'json', - afterTypeDelay: 100, - minTermLength: 1, - data: { - action: 'woocommerce_json_search_customers', + method: 'GET', + url: '" . admin_url('admin-ajax.php') . "', + dataType: 'json', + afterTypeDelay: 100, + minTermLength: 1, + data: { + action: 'woocommerce_json_search_customers', security: '" . wp_create_nonce("search-customers") . "', default: '" . __( 'Show all customers', 'woocommerce' ) . "' - } + } }, function (data) { var terms = {}; - $.each(data, function (i, val) { - terms[i] = val; - }); + $.each(data, function (i, val) { + terms[i] = val; + }); - return terms; + return terms; }); " ); } @@ -450,7 +450,7 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { */ public function orders_by_customer_query( $vars ) { global $typenow, $wp_query; - if ( $typenow == 'shop_order' && isset( $_GET['_customer_user'] ) && $_GET['_customer_user'] > 0 ) { + if ( $typenow == 'shop_order' && isset( $_GET['_customer_user'] ) && $_GET['_customer_user'] > 0 ) { $vars['meta_key'] = '_customer_user'; $vars['meta_value'] = (int) $_GET['_customer_user']; @@ -489,10 +489,10 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { */ public function custom_shop_order_orderby( $vars ) { global $typenow, $wp_query; - if ( $typenow != 'shop_order' ) - return $vars; + if ( $typenow != 'shop_order' ) + return $vars; - // Sorting + // Sorting if ( isset( $vars['orderby'] ) ) { if ( 'order_total' == $vars['orderby'] ) { $vars = array_merge( $vars, array( @@ -596,8 +596,8 @@ class WC_Admin_CPT_Shop_Order extends WC_Admin_CPT { public function shop_order_search_label($query) { global $pagenow, $typenow; - if ( 'edit.php' != $pagenow ) return $query; - if ( $typenow != 'shop_order' ) return $query; + if ( 'edit.php' != $pagenow ) return $query; + if ( $typenow != 'shop_order' ) return $query; if ( ! get_query_var( 'shop_order_search' ) ) return $query; return wp_unslash( $_GET['s'] );