', ']]>', $content); echo $content; } function show_hide_get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '', $less_link_text = '(less...)') { global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow; $output = ''; if ( !empty($post->post_password) ) { // if there's a password if ( !isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie $output = get_the_password_form(); return $output; } } if ( $more_file != '' ) $file = $more_file; else $file = $pagenow; //$_SERVER['PHP_SELF']; if ( $page > count($pages) ) // if the requested page doesn't exist $page = count($pages); // give them the highest numbered page that DOES exist $content = $pages[$page-1]; if ( preg_match('//', $content, $matches) ) { $content = explode($matches[0], $content, 2); if ( !empty($matches[1]) && !empty($more_link_text) ) $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1]))); } else { $content = array($content); } if ( (false !== strpos($post->post_content, '') && ((!$multipage) || ($page==1))) ) $stripteaser = 1; $teaser = $content[0]; if ( ($more) && ($stripteaser) ) $teaser = ''; $output .= $teaser; if ( count($content) > 1 ) { if ( $more ) { $output .= "\n\n".''."\n\n".$content[1]; } else { $output = balanceTags($output); if ( !empty($more_link_text) && !empty($less_link_text) ) $output .= "\n\n".'$more_link_text\n\n"; $output .= "\n\n
\n\n" . $content[1] . "\n\n$less_link_text\n\n
\n\n"; } } if ( $preview ) // preview fix for javascript bug with foreign languages $output = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output); return $output; } ?>