'; if ($url) echo $eol.$tab.''; echo $eol.$tab.'

'.$plugin_name.' '.__('Settings').'

'.$eol; } static function open_form($action) { $eol = "\r\n"; echo $eol.'
'.$eol; } static function close_page() { $eol = "\r\n"; $tab = "\t"; echo $eol.$tab.'
'.$eol.''.$eol; } /** * * Building the menu for the tabs * */ static function nav_menu($args) { $eol = "\r\n"; $tab = "\t"; extract ($args); echo ''.$eol; } /** * * Opening and closing the tabs * */ static function open_tab($plugin_name, $tab_name) { $eol = "\r\n"; echo $eol.'
'.$eol.'
'.$eol; } static function close_tab() { $eol = "\r\n"; echo $eol.'
'.$eol.'
'.$eol; } /** * * Opening and closing the draggable boxes * */ static function open_draggable($label, $id) { $eol = "\r\n"; $tab = "\t"; $dtab = $tab.$tab; echo $eol.'
'.$eol.$tab.'
'.$eol.$dtab.'
'.$eol.$tab.'
'.$eol.$tab; echo $eol.'

'.$eol.$dtab.''.$label.''.$eol.$tab.'

'.$eol.$tab.'
'.$eol.$tab; } static function close_draggable() { self::close_tab(); } /** * * Wrapping sections in containers * */ static function wrap_section($section_id, $atts = false) { $eol = "\r\n"; $tab = "\t"; $attributes = ''; if (false !== $atts) : foreach ($atts as $attribute => $value) $attributes .= ' '.$attribute.'="'.$value.'"'; endif; echo $eol.''.$eol.$tab; do_settings_sections($section_id); echo $eol.'
'.$eol; } /** * * Wrapping elements into html tags * */ static function tag_it($element, $tag, $indent = false, $atts = false, $echo = false) { $eol = "\r\n"; $tab = "\t"; $attributes = ''; if (false !== $atts) : foreach ($atts as $attribute => $value) $attributes .= ' '.$attribute.'="'.$value.'"'; endif; $item = $eol; if (false != $indent) : for ($i = 0; $i <= $indent; $i++) $item .= $tab; endif; $item .= '<'.$tag.$attributes.'>'.$element.''; if (false === $echo) return $item; echo $item; } /** * * Wrapping fields in unordered lists * * uses tag_it function * */ static function list_it($fields, $header = false, $atts = false, $list_atts = false, $echo = true) { $eol = "\r\n"; $list = ''; $list_items = ''; if (false != $header) $list .= $header.$eol; foreach ($fields as $field) $list_items .= self::tag_it($field, 'li', 1, $list_atts); $list .= self::tag_it($list_items, 'ul', $atts); if (false === $echo) return $list; echo $list; } /** * * Putting the clear both div * * uses tag_it function * */ static function clear_it($echo = true) { $clear_both = self::tag_it('', 'div', false, array('style' => 'clear: both;')); if (false === $echo) return $clear_both; echo $clear_both; } } // A5_OptionPage ?>