Complete refactoring and add style settings
This commit is contained in:
@@ -38,36 +38,6 @@ class SP_Settings_Page {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sections
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sections() {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Output sections
|
||||
*/
|
||||
public function output_sections() {
|
||||
global $current_section;
|
||||
|
||||
$sections = $this->get_sections();
|
||||
|
||||
if ( empty( $sections ) )
|
||||
return;
|
||||
|
||||
echo '<ul class="subsubsub">';
|
||||
|
||||
$array_keys = array_keys( $sections );
|
||||
|
||||
foreach ( $sections as $id => $label )
|
||||
echo '<li><a href="' . admin_url( 'admin.php?page=wc-settings&tab=' . $this->id . '§ion=' . sanitize_title( $id ) ) . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> ' . ( end( $array_keys ) == $id ? '' : '|' ) . ' </li>';
|
||||
|
||||
echo '</ul><br class="clear" />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the settings
|
||||
*/
|
||||
@@ -91,4 +61,4 @@ class SP_Settings_Page {
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
endif;
|
||||
|
||||
Reference in New Issue
Block a user