mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-16 21:13:18 +09:00
Refactor taxonomy widget
Adds new widget form class, which all three widgets can share.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
$after = isset( $args['after'] ) ? $args['after'] : '';
|
||||
$flex = isset( $args['flex'] ) && $args['flex'] ? ' class="flex"' : '';
|
||||
printf( '<p%s>', wp_kses( $flex, array( 'class' ) ) );
|
||||
printf( '<label for="%s">%s </label>', esc_attr( $this->parent->get_field_id( $args['id'] ) ), esc_attr( $args['label'] ) );
|
||||
printf( '<input type="number" min="%s" max="%s" id="%s" name="%s" value="%s" />%s', intval( $args['min'] ), intval( $args['max'] ), esc_attr( $this->parent->get_field_id( $args['id'] ) ), esc_attr( $this->parent->get_field_name( $args['id'] ) ), esc_attr( $instance[ $args['id'] ] ), esc_attr( $after ) );
|
||||
echo '</p>';
|
||||
Reference in New Issue
Block a user