شبیه این کدی که شما گفتین نیست تو فانکشن این یه قسمت برای ادامه مطلبه
function art_get_content($args = array()) {
$more_tag = art_get_array_value($args, 'more_tag', __('Continue reading <span class="meta-nav">→</span>', THEME_NS));
return art_get_the_content($more_tag . wp_link_pages(array('echo' => 0)));
}
function art_get_excerpt($args = array()) {
global $post;
$more_tag = art_get_array_value($args, 'more_tag', __('Continue reading <span class="meta-nav">→</span>', THEME_NS));
$auto = art_get_array_value($args, 'auto', art_get_option('art_metadata_excerpt_auto'));
$all_words = art_get_array_value($args, 'all_words', art_get_option('art_metadata_excerpt_words'));
$min_remainder = art_get_array_value($args, 'min_remainder', art_get_option('art_metadata_excerpt_min_remainder'));
$allowed_tags = art_get_array_value($args, 'allowed_tags',
(art_get_option('art_metadata_excerpt_use_tag_filter')
? explode(',',str_replace(' ', '', art_get_option('art_metadata_excerpt_allowed_tags')))
: null));
$perma_link = get_permalink($post->ID);
$more_token = '%%art-more%%';
$show_more_tag = false;
if (function_exists('post_password_required') && post_password_required($post)){
return get_the_excerpt();
}
if ($auto && has_excerpt($post->ID)) {
$the_contents = get_the_excerpt();
$the_contents = apply_filters('the_content', $the_contents);
$show_more_tag = strlen($post->post_content) > 0;
} else {
$the_contents = art_get_the_content($more_token);
if(art_is_empty_html($the_contents)) return $the_contents;
if ($allowed_tags !== null) {
$allowed_tags = '<' .implode('><',$allowed_tags).'>';
$the_contents = strip_tags($the_contents, $allowed_tags);
}
$the_contents = strip_shortcodes($the_contents);
if (strpos($the_contents, $more_token) !== false) {
return str_replace($more_token, $more_tag, $the_contents);
}
if($auto && is_numeric($all_words)) {
$token = "%art_tag_token%";
$content_parts = explode($token, str_replace(array('<', '>'), array($token.'<', '>'.$token), $the_contents));
$content = array();
$word_count = 0;
foreach($content_parts as $part)
{
if (strpos($part, '<') !== false || strpos($part, '>') !== false){
$content[] = array('type'=>'tag', 'content'=>$part);
} else {
$all_chunks = preg_split('/([\s])/u', $part, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach($all_chunks as $chunk) {
if('' != trim($chunk)) {
$content[] = array('type'=>'word', 'content'=>$chunk);
$word_count += 1;
} elseif($chunk != '') {
$content[] = array('type'=>'space', 'content'=>$chunk);
}
}
}
}
if(($all_words < $word_count) && ($all_words + $min_remainder) <= $word_count) {
$show_more_tag = true;
$current_count = 0;
$the_contents = '';
foreach($content as $node) {
if($node['type'] == 'word') {
$current_count++;
}
$the_contents .= $node['content'];
if ($current_count == $all_words){
break;
}
}
}
$the_contents = force_balance_tags($the_contents);
}
}
if ($show_more_tag) {
$the_contents = $the_contents.'<p><a class="more-link" href="'.$perma_link.'">'.$more_tag.'</a></p>';
}
return $the_contents;
}
بجای کدوم بزارم؟اینو پاک کنم کد شما دادین رو قرار بدم؟