mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-13 03:26:02 +09:00
4ef7e552da
Adds new widget form class, which all three widgets can share.
9 lines
607 B
PHP
9 lines
607 B
PHP
<?php
|
|
|
|
$value = isset( $instance[ $args['id'] ] ) ? $instance[ $args['id'] ] : $this->parent->defaults[ $args['id'] ];
|
|
echo '<p>';
|
|
printf( '<input type="hidden" name="%s" value="0" />', esc_attr( $this->parent->get_field_name( $args['id'] ) ) );
|
|
printf( '<input id="%s" type="checkbox" name="%s" value="1" %s/>', esc_attr( $this->parent->get_field_id( $args['id'] ) ), esc_attr( $this->parent->get_field_name( $args['id'] ) ), checked( 1, esc_attr( $value ), false ) );
|
|
printf( '<label for="%s">%s</label>', esc_attr( $this->parent->get_field_id( $args['id'] ) ), esc_attr( $args['label'] ) );
|
|
echo '</p>';
|