__( 'Primary Navigation', 'amphion' ), ) ); if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'amphion' ), 'foot_menu' => __( 'Footer Navigation', 'amphionfooter' ) ) ); } if (function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Sidebar', 'before_widget' => '
  • ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' )); if (function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Footer' )); if(function_exists('add_theme_support')) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 573, 223, true ); } function amphion_lite_get_custom_field_value($szKey, $bPrint = false) { global $post; $szValue = get_post_meta($post->ID, $szKey, true); if ( $bPrint == false ) return $szValue; else echo $szValue; } add_action('publish_page', 'add_custom_field_automatically'); add_action('publish_post', 'add_custom_field_automatically'); function add_custom_field_automatically($post_ID) { global $wpdb; if(!wp_is_post_revision($post_ID)) { add_post_meta($post_ID, 'summary', 'put your post summary here(only for Easyslider)', true); } } function amphion_lite_the_thumb($size = "medium", $add = "") { global $wpdb, $post; $thumb = $wpdb->get_row("SELECT ID, post_title FROM {$wpdb->posts} WHERE post_parent = {$post->ID} AND post_mime_type LIKE 'image%' ORDER BY menu_order"); if(!empty($thumb)) { $image = image_downsize($thumb->ID, $size); print "{$thumb->post_title}"; } } function wpe_excerptlength_teaser($length) { return 45; } function wpe_excerptlength_index($length) { return 12; } function wpe_excerptmore($more) { return '...'; } function amphion_lite_wpe_excerpt($length_callback='', $more_callback='') { global $post; if(function_exists($length_callback)){ add_filter('excerpt_length', $length_callback); } if(function_exists($more_callback)){ add_filter('excerpt_more', $more_callback); } $output = get_the_excerpt(); $output = apply_filters('wptexturize', $output); $output = apply_filters('convert_chars', $output); $output = '

    '.$output.'

    '; echo $output; } function amphion_lite_getImage($num) { global $more; $more = 1; $content = get_the_content(); $count = substr_count($content, ''); $postOutput = substr($post, 0, $imgEnd+1); $image[$i] = $postOutput; $start=$imgEnd+1; $cleanF = strpos($image[$num],'src="')+5; $cleanB = strpos($image[$num],'"',$cleanF)-$cleanF; $imgThumb = substr($image[$num],$cleanF,$cleanB); } if(stristr($image[$num],'/i', $post->post_content, $matches); $first_img = $matches [1] [0]; $not_broken = @fopen("$first_img","r"); if(empty($first_img) || !($not_broken)){ unset($first_img); } else { $first_img = str_replace($url, '', $first_img); } return $first_img; } // Change what's hidden by default add_filter('default_hidden_meta_boxes', 'be_hidden_meta_boxes', 10, 2); function be_hidden_meta_boxes($hidden, $screen) { if ( 'post' == $screen->base || 'page' == $screen->base ) $hidden = array('slugdiv', 'trackbacksdiv', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv'); // removed 'postcustom', return $hidden; } function amphion_lite_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • id="li-comment-">
    ' ); ?>
    %s says:'), get_comment_author_link()) ?>
    comment_approved == '0') : ?>
  • id="li-comment-">
    comment_approved == '0') : ?>
    %s says:'), get_comment_author_link()) ?>