__('Link & Highlight Color'), "desc" => __(''), "id" => "ia3_highlight_color", "std" => "#CC0000", "type" => "text" ), array( "name" => __('Visited Link Color'), "desc" => __(''), "id" => "ia3_lowlight_color", "std" => "#666666", "type" => "text" ), ); $ia3_cache_categories = get_categories(); $ia3_cache_pages = get_pages(); /** * @param integer * @return string * @author Ben Sekulowicz-Barclay * **/ function ia3_get_layout_text($column, $html = FALSE, $default = ' ') { $option = get_option($column); if ($html != TRUE) { $a = htmlspecialchars(strip_tags($option)); $b = htmlspecialchars(strip_tags($default)); } else { $a = stripslashes($option); $b = stripslashes($default); } return ($a !== '')? $a: $b; } /** * @param integer * @param integer * @return string * @author Ben Sekulowicz-Barclay * **/ function ia3_get_layout_select($column) { $option = get_option($column); $select = 0; if (preg_match("/^c\-(.*)/", $option, $select)) { $item = ia3_get_category($select[1]); $item_i = isset($item->cat_ID)? $item->cat_ID: 0; $item_n = isset($item->name)? $item->name: 'Unknown'; return '' . $item_n . ''; } else if (preg_match("/^p\-(.*)/", $option, $select)) { $item = ia3_get_page($select[1]); $item_i = isset($item->ID)? $item->ID: 0; $item_n = isset($item->post_title)? $item->post_title: 'Unknown'; return '' . $item_n . ''; } return ' '; } /** * @param string * @return string * @author Ben Sekulowicz-Barclay * * Returns the category based on the ID, (key) passed to it. Uses the cached array to improve performance. * **/ function ia3_get_category($key = '') { global $ia3_cache_categories; foreach($ia3_cache_categories as $c) { if ($c->cat_ID == $key) return $c; } return $ia3_cache_categories[0]; } /** * @param string * @return string * @author Ben Sekulowicz-Barclay * * Returns the key's value form the above options array, if defined. Messy, due to the structure of the Wordpress options array. * **/ function ia3_get_option($key = '') { global $ia3_options; $default; foreach($ia3_options as $option) { if ($option['id'] == $key) { $default = $option['std']; continue; } } $option = get_option($key); return ($option !== FALSE)? $option: $default; } /** * @param string * @return string * @author Ben Sekulowicz-Barclay * * Returns the page based on the ID, (key) passed to it. Uses the cached array to improve performance. * **/ function ia3_get_page($key = '') { global $ia3_cache_pages; foreach($ia3_cache_pages as $p) { if ($p->ID == $key) return $p; } return $ia3_cache_pages[0]; } function ia3_prevnext() { if(get_previous_post()): previous_post_link('%link', '« Previous'); else: ?>« Previous | Next »'); else: ?>Next »
iA3 ' . __('settings saved.', 'thematic') . '
iA3 ' . __('settings reset.', 'thematic') . '
iA3 ' . __('widgets reset.', 'thematic') . '