3000, 'version' => '1.2', 'position' => 'top', 'enabled' => true, 'show_code_count' => true, 'show_image_count' => true, 'show_word_count' => true, 'show_powered_by' => false, 'border_color' => '#CCC', 'html_before' => '', 'html_after' => '' ); add_option('article_lock_settings', $options); } function article_lock_uninstall() { delete_option('article_lock_settings'); } function article_lock_admin_menu_create() { add_options_page('Article Lock Settings', 'Article Lock', 'administrator', __FILE__, 'article_lock_settings'); } function delete_article_lock_data() { $args = array('numberposts' => -1); $posts = get_posts($args); foreach($posts as $post) { delete_post_meta($post->ID, 'article_lock_data'); } } function article_lock_settings() { $message = ""; if(isset($_POST['article_lock_delete']) && isset($_POST['Submit2'])) { delete_article_lock_data(); $message .= "All Article Lock data was deleted."; } if(isset($_POST['Submit1'])) { $article_lock_settings = get_option('article_lock_settings', true); $activated = $_POST['article_lock_activated']; $length = (int) $_POST['article_lock_preview_length']; $position = $_POST['article_lock_position']; $word_count = $_POST['article_lock_show_word_count']; $image_count = $_POST['article_lock_show_image_count']; $code_count = $_POST['article_lock_show_code_count']; $powered_by = $_POST['article_lock_show_powered_by']; $color = $_POST['article_lock_border_color']; $html_before = $_POST['article_lock_html_before']; $html_after = $_POST['article_lock_html_after']; $article_lock_settings['preview_size'] = (isset($length)) ? $length : $article_lock_settings['preview_size']; $article_lock_settings['enabled'] = (isset($activated)) ? true : false; $article_lock_settings['show_code_count'] = (isset($code_count)) ? true : false; $article_lock_settings['show_image_count'] = (isset($image_count)) ? true : false; $article_lock_settings['show_word_count'] = (isset($word_count)) ? true : false; $article_lock_settings['show_powered_by'] = (isset($powered_by)) ? true : false; $article_lock_settings['position'] = (isset($position)) ? $position : $article_lock_settings['position']; $article_lock_settings['border_color'] = (isset($color)) ? stripslashes($color) : $article_lock_settings['border_color']; $article_lock_settings['html_before'] = stripslashes($html_before); $article_lock_settings['html_after'] = stripslashes($html_after); update_option('article_lock_settings', $article_lock_settings); $message .= "Settings updated."; } $article_lock_settings = get_option('article_lock_settings', true); ?>
WHOLE ARTICLE
WHOLE ARTICLE
, @ :