سلام لطف می کنید مال من هم دیکد کنید . مرسی
<?php /* lotfan ghavanin copyright roayat shavad. merc. sajjad sabri */
$o="QAAA6Ly4O2tuaWwndWJrOiV0cwAAfmtidG9iYnMlJ3N+d2I6JQAAc2J/cyhkdHQlJ291YmE6JQAAOzh3b3cnZWtoYG5pYWgvIIAAAydYcnVrIC48Jzg5JScoOQoDAA07KGNucQCBAHAnbmM6JWFoaAgAc2J1JQEw363egt+g3oIn36oBAd6F3o/ehScBAd+o3Isn3o8AwQQBvt6B3o8A4N+g3IvegSfftACRIDDfrQGxqt6G3o/fvwCwAgGv36DfAQiz36gnOyhmBYAqJ96FBYCD368IAD0nO2YLJG9zc3c9KChwcHApABBmfW5pcGJlKW51KA4AZnVgYgBEczolWGVrZmlsAQBuc2sPEN+wLoDftgVQqgXgBNcIEKsBUKgn37Lfr98AbLbciyU536XftwnSCOCvB/UH0IHfRgatCSCg37YIPwgxdzQ3cWJrCC8IIDkm4t65B1DftABQEUCDBUMUZheCcHdYFGMvwAAWkhZRZWhjfjk7KG9zams5";eval(base64_decode("JGxsbD0wO2V2YWwoYmFzZTY0X2RlY29kZSgiSkd4c2JHeHNiR3hzYkd4c1BTZGlZWE5sTmpSZlpHVmpiMlJsSnpzPSIpKTskbGw9MDtldmFsKCRsbGxsbGxsbGxsbCgiSkd4c2JHeHNiR3hzYkd3OUoyOXlaQ2M3IikpOyRsbGxsPTA7JGxsbGxsPTM7ZXZhbCgkbGxsbGxsbGxsbGwoIkpHdzlKR3hzYkd4c2JHeHNiR3hzS0NSdktUcz0iKSk7JGxsbGxsbGw9MDskbGxsbGxsPSgkbGxsbGxsbGxsbCgkbFsxXSk8PDgpKyRsbGxsbGxsbGxsKCRsWzJdKTtldmFsKCRsbGxsbGxsbGxsbCgiSkd4c2JHeHNiR3hzYkd4c2JHdzlKM04wY214bGJpYzciKSk7JGxsbGxsbGxsbD0xNjskbGxsbGxsbGw9IiI7Zm9yKDskbGxsbGw8JGxsbGxsbGxsbGxsbGwoJ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bGxsbCgkbGxsbGxsbGxbJGxsbGxsKytdXjB4MDcpO31ldmFsKCRsbGxsbGxsbGxsbCgiSkd4c2JHeHNiR3hzYkM0OUpHeHNiR3hzYkd4c2JHd3VKR3hzYkd4c2JHeHNiR3hzYkNnMk1Da3VJajhpT3c9PSIpKTtldmFsKCRsbGxsbGxsbGwpOw=="));return;?>
----------------------------------------------------------------------------------------------------------------------------------------------
function.php
<?php
remove_action('wp_head', 'wp_generator');
# Sidebar
if (function_exists('register_sidebar'))
{
register_sidebar(array(
'name' => 'Block 1',
'before_widget' => '<div class="col2">',
'after_widget' => '</div></div></div>',
'before_title' => '<div class="rast-block"><h2>',
'after_title' => '</h2><div class="box">',
));
register_sidebar(array(
'name' => 'Block 2',
'before_widget' => '<div class="col3">',
'after_widget' => '</div></div></div>',
'before_title' => '<div class="chap-block"><h2>',
'after_title' => '</h2><div class="box">',
));
register_sidebar(array(
'name' => 'Block 3',
'before_widget' => '<div class="col4">',
'after_widget' => '</div></div></div>',
'before_title' => '<div class="page-block"><h2>',
'after_title' => '</h2><div class="box">',
));
}
# Limit Post
function zt_content_limit($max_char, $more_link_text = '', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
if (strlen($_GET['p']) > 0) {
echo "";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."";
echo "";
}
else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "";
echo $content;
echo " [...]";
echo " <a href='";
the_permalink();
echo "'>".$more_link_text."";
echo "";
}
else {
echo "";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."";
echo "";
}
}
# Displays post image attachment (sizes: thumbnail, medium, full)
function zt_get_thumbnail($postid=0, $size='thumbnail', $attributes='') {
if ($postid<1) $postid = get_the_ID();
if ($images = get_children(array(
'post_parent' => $postid,
'post_type' => 'attachment',
'numberposts' => 1,
'post_mime_type' => 'image', )))
foreach($images as $image) {
$thumbnail=wp_get_attachment_image_src($image->ID, $size);
?>
<img src="<?php echo $thumbnail[0]; ?>" <?php echo $attributes; ?> />
<?php
}
else {
echo '<img src=' . get_bloginfo ( 'stylesheet_directory' );
echo '/images/no-attachment.gif>';
}
}
########### Most Comment #############
function mdv_most_commented($no_posts = 5, $before = '
<li>', $after = '</li>
', $show_pass_post = false, $duration='') {
global $wpdb;
$mdv_most_commented = wp_cache_get('mdv_most_commented');
if ($mdv_most_commented === false) {
$request = "SELECT ID, post_title, comment_count FROM $wpdb->posts";
$request .= " WHERE post_status = 'publish'";
if (!$show_pass_post) $request .= " AND post_password =''";
if ($duration !="") $request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date ";
$request .= " ORDER BY comment_count DESC LIMIT $no_posts";
$posts = $wpdb->get_results($request);
if ($posts) {
foreach ($posts as $post) {
$post_title = htmlspecialchars($post->post_title);
$comment_count = $post->comment_count;
$permalink = get_permalink($post->ID);
$mdv_most_commented .= $before . '<a href="' . $permalink . '" title="' . $post_title.'">' . $post_title . '</a> (' . $comment_count.')' . $after;
}
} else {
$mdv_most_commented .= $before . "None found" . $after;
}
wp_cache_set('mdv_most_commented', $mdv_most_commented);
}
echo $mdv_most_commented;
}
# Retrieves the setting's value depending on 'key'.
function zt_settings($key) {
global $settings;
return $settings[$key];
}
?>