This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function excerpt_more($more) { | |
return '...'; | |
} | |
add_filter('excerpt_more', 'excerpt_more'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Функция склонения числительных в русском языке | |
* | |
* @param int $number Число которое нужно просклонять | |
* @param array $titles Массив слов для склонения | |
* @return string | |
**/ | |
$titles = array('Сидит %d котик', 'Сидят %d котика', 'Сидит %d котиков'); | |
function declOfNum($number, $titles) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function commentdataFix($commentdata) { | |
if ( $commentdata['comment_author_url'] == 'Site') { | |
$commentdata['comment_author_url'] = ''; | |
} | |
return $commentdata; | |
} | |
add_filter('preprocess_comment','commentdataFix'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tabs-wrapper .box {display: none;} | |
.tabs-wrapper .box.visible {display: block;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Кол-во лайков по URL | |
*/ | |
function getFBLikes($postID){ | |
$cache = get_transient('likes_' . $postID); | |
if ( empty( $cache ) ){ | |
$url = get_permalink($postID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** Reset by Eric Meyer *****/ | |
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;/*font:inherit;*/vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteRule ^razdel_1(/.*|)$ http://domain.com/razdel_2/? [L,NC,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.extend({ | |
toggle: function( fn ) { | |
// Save reference to arguments for access in closure | |
var args = arguments, | |
guid = fn.guid || jQuery.guid++, | |
i = 0, | |
toggler = function( event ) { | |
// Figure out which function to execute | |
var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; | |
jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Возвращает числовое значение временного интервала | |
1 - Рабочее время | |
2 - Нерабочее время | |
3 - Выходные | |
*/ | |
$starthour = 9; // Время начала рабочего дня | |
$endhour = 18; // Время конца рабочего дня |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img.grayscale{ | |
filter: grayscale(100%); | |
-webkit-filter: grayscale(100%); /* For Webkit browsers */ | |
filter: gray; /* For IE 6 - 9 */ | |
-webkit-transition: all .6s ease; /* Fade to color for Chrome and Safari */ | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
} | |
img.grayscale:hover{ | |
filter: grayscale(0%); |