/** * @desc Admin Form to select number of titles * @author Georg Leciejewski */ function c_widget_title_page() { $options = $newoptions = get_option('c_widget_title'); echo king_get_start_form('wrap', '', '', $k_Method = 'post'); ?> <h2><?php _e('Title Widgets', 'widgetContent'); ?> </h2> <?php echo king_get_start_p(); _e('How many Title Boxes would you like? ', 'widgetContent'); echo king_get_select("c_widget_title_number", $options['number'], array('1', '2', '3', '4', '5', '6', '7', '8', '9'), 'c_widget_title_number'); echo king_get_submit('c_widget_title_number_submit', '', 'c_widget_title_number_submit'); echo king_get_end_p(); echo king_get_end_form(); }
/** * @desc get select element row with p and label. Is used for the AJAX popup Options * @author Georg Leciejewski * @param array $options with following params * @param string $k_Label_Id_Name p Label + IDs + select Name * @param string $k_P_Class Class of the surrounding p * @param string $k_Label_Class Class of the label field * @param string $k_Description Description shown before select * @param string $k_Value Value for select * @param string $select_options Select Options * @param string $k_Label_Title Description shown for label * @return string p with checkbox */ function king_get_select_p($options) { $result = king_get_start_p($options['Label_Id_Name'], $options['Description'], $options['Label_Title']); $result .= king_get_select($options['Label_Id_Name'], $options['Value'], $options['select_options'], ''); $result .= king_get_end_p(); return $result; }