This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ load_plugin_textdomain('codecolorer', 'wp-content/plugins/codecolorer'); // NLS include_once('codecolorer.php'); $CodeColorer = new CodeColorer(); $location = get_option('siteurl') . '/wp-admin/admin.php?page=codecolorer/codecolorer-options.php'; // Form Action URI /* Add some default options if they don't exist */ add_option('codecolorer_line_numbers', false); add_option('codecolorer_css_style', $CodeColorer->getDefaultStyle()); add_option('codecolorer_lines_to_scroll', $CodeColorer->getDefaultLinesToScroll()); add_option('codecolorer_line_height', $CodeColorer->getDefaultLineHeight()); add_option('codecolorer_disable_keyword_linking', false); /* Check form submission and update options */ if ('process' == $_POST['stage']) { update_option('codecolorer_css_style', $_POST['codecolorer_css_style']); update_option('codecolorer_lines_to_scroll', intval($_POST['codecolorer_lines_to_scroll'])); update_option('codecolorer_line_height', intval($_POST['codecolorer_line_height'])); update_option('codecolorer_line_numbers', isset($_POST['codecolorer_line_numbers'])); update_option('codecolorer_disable_keyword_linking', isset($_POST['codecolorer_disable_keyword_linking'])); } /* Get options for form fields */ $codecolorer_line_numbers = stripslashes(get_option('codecolorer_line_numbers')); $codecolorer_css_style = stripslashes(get_option('codecolorer_css_style')); $codecolorer_lines_to_scroll = stripslashes(get_option('codecolorer_lines_to_scroll')); $codecolorer_line_height = stripslashes(get_option('codecolorer_line_height')); $codecolorer_disable_keyword_linking = stripslashes(get_option('codecolorer_disable_keyword_linking')); ?>

:
:
:

sampleCodeFactory(); ?>