'', 'table_style' => '', 'row_styles' => '', 'table_heading_type' => 'horizontal', 'columns_classes' => array(), 'columns_styles' => array(), ); $args = array_merge( $defaults, $args ); extract( $args ); $table_class = ( '' == $table_class ) ? '' : ' class="' . $table_class . '"'; $table_style = ( '' == $table_style ) ? '' : ' style="' . $table_style . '"'; $row_styles = ( '' == $row_styles ) ? '' : ' style="' . $row_styles . '"'; $html = ''; $html .= ''; $html .= ''; foreach( $data as $row_number => $row ) { $html .= ''; foreach( $row as $column_number => $value ) { $th_or_td = ( ( 0 === $row_number && 'horizontal' === $table_heading_type ) || ( 0 === $column_number && 'vertical' === $table_heading_type ) ) ? 'th' : 'td'; $column_class = ( ! empty( $columns_classes ) && isset( $columns_classes[ $column_number ] ) ) ? ' class="' . $columns_classes[ $column_number ] . '"' : ''; $column_style = ( ! empty( $columns_styles ) && isset( $columns_styles[ $column_number ] ) ) ? ' style="' . $columns_styles[ $column_number ] . '"' : ''; $html .= '<' . $th_or_td . $column_class . $column_style . '>'; $html .= $value; $html .= ''; } $html .= ''; } $html .= ''; $html .= ''; return $html; } } if ( ! function_exists( 'wcj_get_option_html' ) ) { /** * wcj_get_option_html. * * @version 3.3.0 */ function wcj_get_option_html( $option_type, $option_id, $option_value, $option_description, $option_class ) { if ( 'checkbox' === $option_type ) $is_checked = checked( $option_value, 'on', false ); $html = ''; switch ( $option_type ) { case 'number': case 'text': $html .= ''; break; case 'textarea': $html .= ''; break; case 'checkbox': $html .= ''; break; case 'select': $html .= ''; break; } $html .= '' . $option_description . ''; return $html; } } if ( ! function_exists( 'wcj_empty_cart_button_html' ) ) { /** * wcj_empty_cart_button_html. * * @version 3.7.0 * @since 2.8.0 * @todo optional function parameters instead of default `get_option()` calls */ function wcj_empty_cart_button_html() { $confirmation_html = ( 'confirm_with_pop_up_box' == get_option( 'wcj_empty_cart_confirmation', 'no_confirmation' ) ) ? ' onclick="return confirm(\'' . get_option( 'wcj_empty_cart_confirmation_text', __( 'Are you sure?', 'woocommerce-jetpack' ) ) . '\')"' : ''; return '
' . '
' . '
' . '
'; } }