'ilost-sidebar','description'=>themename.' theme\'s SideBar','before_widget'=>'
','after_widget'=>'','before_title'=>''));
register_nav_menus(array('primary'=>__('Primary Navigation','iLost'),));
add_action('admin_menu','ilost_excerpt_meta_box');
add_action('init','iloft_post_type');
add_custom_background();
add_editor_style();
add_filter('excerpt_length','ilost_excerpt_length');
add_filter('excerpt_more','ilost_excerpt_more');
add_filter('wp_page_menu_args','ilost_home_menulink');
add_theme_support('automatic-feed-links');
add_theme_support('post-thumbnails');
if(!isset($content_width))$content_width=640;
}
function ilost_excerpt_meta_box(){add_meta_box('postexcerpt',__('Excerpt','iLost'),'ilost_excerpt_meta_box','page','normal','core');}
function ilost_excerpt_length($length){return 20;}
function ilost_excerpt_more($more){return '...';}
function ilost_from_email($email){$wp_from_email=get_option('admin_email');return $wp_from_email;}
function ilost_from_name($email){$wp_from_name=get_option('blogname');return $wp_from_name;}
function ilost_home_menulink($args){$args['show_home']=true;return $args;}
function ilost_enqueue_script(){
wp_enqueue_script('jquery');
wp_enqueue_script('lazyload',get_template_directory_uri().'/scripts/lazyload.js');
wp_enqueue_script('ilostq',get_template_directory_uri().'/scripts/ilostq.js');
if(is_singular()&&get_option('thread_comments'))wp_enqueue_script('comment-reply');
}
function iloft_post_type(){
$Show_Image_labels=array('name'=>_x('Show images','post type general name'),'singular_name'=>_x(__('Show image','iLost'),'post type singular name'),'add_new'=>_x('Add Images','Image'),'add_new_item'=>__('Add New Images','iLost'),'edit_item'=>__('Edit Image','iLost'),'new_item'=>__('Add Show image','iLost'),'view_item'=>__('View Image','iLost'),'search_items'=>__('Search Show images','iLost'),'not_found'=>__('No images found','iLost'),'not_found_in_trash'=>__('No images found in Trash','iLost'),'parent_item_colon'=>'');
$Show_Image_Aargs=array('labels'=>$Show_Image_labels,'public'=>true,'publicly_queryable'=>true,'show_ui'=>true,'query_var'=>true,'rewrite'=>true,'capability_type'=>'post','hierarchical'=>false,'menu_position'=>7,'supports'=>array('title','custom-fields','thumbnail'));
register_post_type('ilostshow',$Show_Image_Aargs);
}
function ilost_rcomments($limit=5){
$comments=get_comments(array('number'=>$limit,'status'=>'approve','offset'=>'1','orderby'=>'comment_date','order'=>'DESC'));
$wpchres=get_option('blog_charset');$ilostoutput='';
foreach($comments as $comment){
$ilostoutput.=''.stripslashes($comment->comment_author).': '.mb_substr($comment->comment_content,0,25,$wpchres).'...'."\n";
}echo ent2ncr($ilostoutput);
}
function ilost_lgshow(){if(is_user_logged_in())echo ' style="display:block"';}
function ilost_page_number(){global $paged;if($paged>=2)echo ' - '.sprintf('Page %s',$paged);}
if(!function_exists('ilost_comments')){function ilost_comments($comment,$args,$depth){
$GLOBALS['comment']=$comment;
switch($comment->comment_type){
case '':?>
id="li-comment-">
'Page %CURRENT_PAGE% of %TOTAL_PAGES%','current_text'=>'%PAGE_NUMBER%','page_text'=>'%PAGE_NUMBER%','first_text'=>'« First','last_text'=>'Last »','prev_text'=>'«','next_text'=>'»','dotleft_text'=>'...','dotright_text'=>'...','num_pages'=>5,'always_show'=>false);
$posts_per_page=intval(get_query_var('posts_per_page'));$paged=absint(get_query_var('paged'));if(!$paged){$paged=1;}$total_pages=absint($wp_query->max_num_pages);if(!$total_pages){$total_pages=1;}if(1==$total_pages && !$options['always_show']){return;}$request=$wp_query->request;$numposts=$wp_query->found_posts;$pages_to_show=absint($options['num_pages']);$pages_to_show_minus_1=$pages_to_show-1;$half_page_start=floor($pages_to_show_minus_1/2);$half_page_end=ceil($pages_to_show_minus_1/2);$start_page=$paged-$half_page_start;if($start_page<=0){$start_page=1;}$end_page=$paged+$half_page_end;if(($end_page-$start_page)!=$pages_to_show_minus_1){$end_page=$start_page+$pages_to_show_minus_1;} if($end_page>$total_pages){$start_page=$total_pages-$pages_to_show_minus_1;$end_page=$total_pages;}if($start_page<=0){$start_page=1;}$out='';
if(!empty($options['pages_text'])){$pages_text=str_replace(array("%CURRENT_PAGE%","%TOTAL_PAGES%"),array(number_format_i18n($paged),number_format_i18n($total_pages)),$options['pages_text']);$out.="$pages_text";}
if($start_page>=2 && $pages_to_show<$total_pages){$first_text=str_replace('%TOTAL_PAGES%',number_format_i18n($total_pages),$options['first_text']);$out.=ilost_pgnavnum(1,'first',$first_text,'%TOTAL_PAGES%');
if(!empty($options['dotleft_text'])){$out.="{$options['dotleft_text']}";}}
if(!empty($options['prev_text'])){$out.=get_previous_posts_link($options['prev_text']);}
foreach(range($start_page,$end_page) as $i){if($i==$paged && !empty($options['current_text'])){$current_page_text=str_replace('%PAGE_NUMBER%',number_format_i18n($i),$options['current_text']);$out.="$current_page_text";}else{$out.=ilost_pgnavnum($i,'page',$options['page_text']);}}
if(!empty($options['next_text'])){$out.=get_next_posts_link($options['next_text'],$total_pages);}$larger_page_end=0;
if($end_page<$total_pages){if(!empty($options['dotright_text'])){$out.="{$options['dotright_text']}";}$out.=ilost_pgnavnum($total_pages,'last',$options['last_text'],'%TOTAL_PAGES%');}
$out="\n$out\n
\n";
echo apply_filters('ilost_pagenav',$out);
}function ilost_pgnavnum($page,$class,$raw_text,$format='%PAGE_NUMBER%'){if(empty($raw_text)){return '';}$text=str_replace($format,number_format_i18n($page),$raw_text);return "$text";}
remove_action('wp_head','wp_generator');?>