' . "\n"; } function fortunate_widget($args) { extract($args); echo $before_widget . $before_title . get_option('fortunate_title') . $after_title . fortunate() . $after_widget; } function fortunate_filter($info,$req) { if($req == 'description') return $info . fortunate(); return $info; } function fortunate_stdout() { echo fortunate(); } function fortunate($root = WPINC, $stats = 0 ) { static $fortunate_done = false; if($fortunate_done) return; $advanced = ((get_option('fortunate_advanced') == '1' ) ? 1 : 0); $showstats = (($stats && $advanced) ? 1 : 0); $database = get_option('fortunate_db'); $db = (($advanced && strlen($database)) ? $database : ''); $type = get_option('fortunate_type'); $typeopt = (($advanced && strlen($type)) ? $type : ''); $expr = get_option('fortunate_regex'); $regex = (($advanced && strlen('expr')) ? $expr : ''); $options = array( 'root' => $root, 'home' => get_option('home'), 'read_timeout' => get_option('fortunate_read_timeout'), 'conn_timeout' => get_option('fortunate_conn_timeout'), 'lang' => get_option('fortunate_lang'), 'length' => get_option('fortunate_length'), 'numlines' => get_option('fortunate_numlines'), 'pattern' => get_option('fortunate_pattern'), 'equal' => get_option('fortunate_equal'), 'regex' => $regex, 'db' => $db, 'type' => $typeopt, 'stats' => $showstats ); $result = '
"; echo __('Options saved.', $fortunate_textdomain ); echo "