Convert settings page to tabs

This commit is contained in:
Robin Cornett
2016-04-01 17:06:57 -04:00
parent 22d12180fd
commit e7d138eb6c
2 changed files with 76 additions and 13 deletions
@@ -22,10 +22,10 @@ class Display_Featured_Image_Genesis_Helper {
foreach ( $sections as $section ) {
add_settings_section(
$section['id'],
$this->page . '_' . $section['id'],
$section['title'],
array( $this, $section['id'] . '_section_description' ),
$this->page
$this->page . '_' . $section['id']
);
}
}
@@ -44,8 +44,8 @@ class Display_Featured_Image_Genesis_Helper {
'[' . $field['id'] . ']',
sprintf( '<label for="%s[%s]">%s</label>', $this->page, $field['id'], $field['title'] ),
array( $this, $field['callback'] ),
$this->page,
$sections[ $field['section'] ]['id'],
$this->page . '_' . $sections[ $field['section'] ]['id'],
$this->page . '_' . $sections[ $field['section'] ]['id'],
empty( $field['args'] ) ? array() : $field['args']
);
}