diff --git a/includes/settings/class-displayfeaturedimagegenesis-helper.php b/includes/settings/class-displayfeaturedimagegenesis-helper.php
index 8a66e0e..97b73ea 100644
--- a/includes/settings/class-displayfeaturedimagegenesis-helper.php
+++ b/includes/settings/class-displayfeaturedimagegenesis-helper.php
@@ -33,7 +33,7 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
$this->page . '_' . $section['id'],
$section['title'],
array( $this, 'section_description' ),
- $this->page . '_' . $section['id']
+ $this->page . '_' . $section['tab']
);
}
}
@@ -49,10 +49,10 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
protected function add_fields( $fields, $sections ) {
foreach ( $fields as $field ) {
add_settings_field(
- '[' . $field['id'] . ']',
- sprintf( '', $field['id'], $field['title'] ),
+ $field['id'],
+ sprintf( '', $this->page, $field['id'], $field['title'] ),
array( $this, $field['callback'] ),
- $this->page . '_' . $sections[ $field['section'] ]['id'],
+ $this->page . '_' . $sections[ $field['section'] ]['tab'],
$this->page . '_' . $sections[ $field['section'] ]['id'],
$field
);
@@ -93,12 +93,12 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
* @param $args
*/
public function do_number( $args ) {
- printf( '',
+ printf( '%6$s',
(int) $args['min'],
(int) $args['max'],
- esc_attr( $args['id'] ),
- esc_attr( $this->setting[ $args['id'] ] ),
- esc_attr( $this->page ),
+ esc_attr( $this->get_field_id( $args ) ),
+ esc_attr( $this->get_field_value( $args ) ),
+ esc_attr( $this->get_field_name( $args ) ),
esc_attr( $args['label'] )
);
$this->do_description( $args );
@@ -113,48 +113,43 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
* @param $args
*/
public function do_checkbox( $args ) {
- $setting = $this->get_checkbox_setting( $args );
- printf( '', esc_attr( $this->page ), esc_attr( $args['id'] ) );
- printf( '',
- esc_attr( $args['id'] ),
- checked( 1, esc_attr( $setting ), false ),
+ $name = $this->get_field_name( $args );
+ $value = $this->get_field_value( $args );
+ printf( '', esc_attr( $name ) );
+ printf( '',
+ esc_attr( $this->get_field_id( $args ) ),
+ checked( 1, esc_attr( $value ), false ),
esc_attr( $args['label'] ),
- esc_attr( $this->page )
+ esc_attr( $name )
);
$this->do_description( $args );
}
- /**
- * Get the current value for the checkbox.
- *
- * @param $args
- *
- * @return int
- */
- protected function get_checkbox_setting( $args ) {
- $setting = isset( $this->setting[ $args['id'] ] ) ? $this->setting[ $args['id'] ] : 0;
- if ( isset( $args['setting_name'] ) && isset( $this->setting[ $args['setting_name'] ][ $args['name'] ] ) ) {
- $setting = $this->setting[ $args['setting_name'] ][ $args['name'] ];
- }
-
- return $setting;
- }
-
/**
* Build a checkbox array.
*
* @param $args
*/
public function do_checkbox_array( $args ) {
- foreach ( $args['options'] as $key => $value ) {
- $type_args = array(
- 'id' => "{$args['id']}][{$key}",
- 'label' => $value,
- 'setting_name' => $args['id'],
- 'name' => $key,
+ echo '
';
$this->do_description( $args );
}
@@ -166,14 +161,17 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
*/
public function do_radio_buttons( $args ) {
echo '';
@@ -185,14 +183,15 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
* @param $args
*/
public function do_select( $args ) {
- printf( '