mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-13 19:46:06 +09:00
Refactor widgets
All widgets use new form/builder class and updater class. Also fixes function visibility issues, defaults.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$value = isset( $instance[ $args['id'] ] ) ? $instance[ $args['id'] ] : $this->parent->defaults[ $args['id'] ];
|
||||
$defaults = $this->parent->defaults();
|
||||
$value = isset( $instance[ $args['id'] ] ) ? $instance[ $args['id'] ] : $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 ) );
|
||||
|
||||
Reference in New Issue
Block a user