getQuery(); if (($q && !$q->single) && !isset($_GET['page'])) { if ($q) list($id) = $q->getLastEntry(); else $id =''; if ($MODE == 'auto' || $MODE == 'semiauto' ) { if (strlen($string) > $CHOP_AT) { return substr($string, 0, $CHOP_AT). "… [Read More...]"; } } if ($MODE == 'manual' || $MODE == 'semiauto' ) { if (($p = strpos($string, '[more]'))!==false){ return substr($string, 0, $p). "[Read More...]"; } } elseif ($MODE == 'sentence') { $matches = array(); if ($v=preg_match_all('|[.!?]\s|', $string, $matches, PREG_OFFSET_CAPTURE)) { if (count($matches[0]) > $CHOP_AT) { $string = substr($string, 0, $matches[0][$CHOP_AT-1][1]). ". [Read More...]"; } } } } if (($q && $q->single) || isset($fp_params['entry'])) { $string = str_replace('[more]', "", $string); } return $string; } add_filter('the_content', 'plugin_readmore_main', 1); ?>