" method="post" id="admin_searchlight_form" >

allowedPostType = $_POST['asl_post_type']; $asl_options->showIcon = $_POST['asl_icon']; $asl_options->minimumCharacters = $_POST['asl_min_char']; $asl_options->searchDelay = $_POST['asl_activation_delay']; $asl_options->limitPerCategory = $_POST['asl_limit_per_category']; update_option('asl_options', serialize($asl_options)); wp_redirect("/wp-admin/tools.php?page=admin_searchlight_menu"); exit(); endif; } add_action('init', 'admin_searchlight_update_options'); function admin_searchlight_page(){ $asl_options = get_option('asl_options', new AdminSearchlight()); if(is_string($asl_options)) $asl_options = unserialize($asl_options); $post_types = get_post_types(array( 'public' => true )); $remove = array_search( 'attachment', $post_types ); if ( $remove ) unset( $post_types[$remove] ); ?>

Admin Searchlight 0.2

:
allowedPostType)) echo 'checked="checked"';?>/>

:
showIcon=='enable') echo 'checked="checked"';?>/>
showIcon=='disable') echo 'checked="checked"';?>/>

:

:

:

query['admin_searchlight_like']) ): $pattern = $wp_query->query['admin_searchlight_like']; if ($pattern == '0-9' ): $pattern = '^[0-9]'; $custom_where .= " AND wp_posts.post_title RLIKE '".$pattern."' "; else: $pattern .= (strstr($pattern, '%')?'':'%'); $custom_where .= " AND wp_posts.post_title LIKE '".$pattern."' "; endif; endif; return $where.$custom_where; } add_filter('posts_where', 'admin_searchlight_like_where'); ?>