RewriteEngine On
RewriteRule ^([a-zA-Z]+)/ - [L]
RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.ru$
RewriteCond %{DOCUMENT_ROOT}/%1%{REQUEST_URI} -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R,L]
RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.ru$
RewriteRule (.*) %1/$1 [L,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.mysite.ru$
RewriteCond %{HTTP_HOST} ^((.*)\.)mysite.ru$
RewriteRule ^/(.*) /%2/$1
function my_jpeg_quality($arg)
{
return (int)100;
}
add_filter('jpeg_quality', 'my_jpeg_quality');
<?php
$all_price = array();
while($row = mysql_fetch_assoc($sql)):
$i++;
if(checkKod($i)):
$size = isset($sizes[$row['id']]) ? $sizes[$row['id']] : $S_1_s1;
$sum = $row['price'] * $size;
if($sum != 0):
$pdf->Row(
array(
'id' => $row['id'],
'name' => $row['name'],
'size' => $size,
'type' => $row['type'],
'price' => $row['price'],
'sum' => $sum
)
);
$all_price [] = $sum;
endif;
endif;
endwhile;
echo array_sum($all_price);
while($row = mysql_fetch_assoc($sql)):
$i++;
if(checkKod($i)):
$size = isset($sizes[$row['id']]) ? $sizes[$row['id']] : $S_1_s1;
$sum = $row['price'] * $size;
if($sum != 0):
$pdf->Row(
array(
'id' => $row['id'],
'name' => $row['name'],
'size' => $size,
'type' => $row['type'],
'price' => $row['price'],
'sum' => $sum
)
);
endif;
endif;
endwhile;
if( has_shortcode( $post->post_content, 'gallery' ) ) {
$gallery = get_post_gallery($post->ID, false);
$gallery_ids = explode(',', $gallery['ids']);
$g_i = 0;
foreach( $gallery['src'] as $image ) {
$title_img = get_the_title($gallery_ids[$g_i]);
?>
<div class="gallery-box-img">
<div class="gallery-img">
<a href="<?php echo str_replace('-150x150','',$image); ?>" class="lightbox" rel="gallery">
<img src="<?php echo $image; ?>" alt="<?php echo $title_img; ?>">
</a>
</div>
</div>
<?php
$g_i++;
}
}
<?php
$tag_arr = array();
foreach (get_the_tags() as $tag)
{
$tag_arr []= '<a href="'.get_tag_link($tag->term_id).'" class="name_class">'.$tag->name.'</a>';
}
echo implode(',', $tag_arr);
$tag->term_id - ID метки
$tag->name - название метки
$tag->slug - альтернативное название
$tag->term_group - группа, к которой принадлежит метка, если такая имеется
$tag->taxonomy - таксономия. Для этого примера всегда 'post_tag'
$tag->description - описание метки, указанное в настройках
$tag->count - количество записей у метки