' . esc_html__( 'Error: non-existing attribute ID.', 'woocommerce' ) . '
' . esc_html__( 'Attribute updated successfully', 'woocommerce' ) . '
attribute_label ); ?> | attribute_name ); ?> | attribute_type ) ); ?> attribute_public ? esc_html__( '(Public)', 'woocommerce' ) : ''; ?> | attribute_orderby ) { case 'name': esc_html_e( 'Name', 'woocommerce' ); break; case 'name_num': esc_html_e( 'Name (numeric)', 'woocommerce' ); break; case 'id': esc_html_e( 'Term ID', 'woocommerce' ); break; default: esc_html_e( 'Custom ordering', 'woocommerce' ); break; } ?> |
attribute_name );
if ( taxonomy_exists( $taxonomy ) ) {
$total_count = (int) get_terms(
array(
'taxonomy' => $taxonomy,
'fields' => 'count',
'hide_empty' => false,
)
);
if ( 0 === $total_count ) {
echo '–';
} elseif ( $max_terms_to_display > 0 ) {
$terms = get_terms(
array(
'taxonomy' => $taxonomy,
'number' => $max_terms_to_display,
'fields' => 'names',
'hide_empty' => false,
)
);
$terms_string = implode( ', ', $terms );
if ( $total_count > $max_terms_to_display ) {
$remaining = $total_count - $max_terms_to_display;
/* translators: 1: Comma-separated terms list, 2: how many terms are hidden */
$terms_string = sprintf( __( '%1$s... (%2$s more)', 'woocommerce' ), $terms_string, $remaining );
}
echo esc_html( $terms_string );
} elseif ( 1 === $total_count ) {
echo esc_html( __( '1 term', 'woocommerce' ) );
} else {
/* translators: %s: Total count of terms available for the attribute */
echo esc_html( sprintf( __( '%s terms', 'woocommerce' ), $total_count ) );
}
} else {
echo '– '; } ?> |
|