Выводим микроразметку в разных ситуациях
This file contains hidden or 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
template |
This file contains hidden or 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
Всё о важности картинок и их ускорении |
This file contains hidden or 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
Directory: .idea/ | |
Mask: *.sql | |
Mask: sitemap*.xml | |
Mask: /upload/* | |
Mask: *.zip | |
Mask: *.rar | |
Mask: *.7z | |
Mask: *.gz | |
Mask: .gzip | |
Mask: *.jar |
This file contains hidden or 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
$ws_uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2); | |
$ws_uri_protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; | |
$ws_uri_canonical = $ws_uri_protocol . $_SERVER['HTTP_HOST'] . $ws_uri_parts[0]; |
This file contains hidden or 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
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://webseo.kz/', '/'); |
This file contains hidden or 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
/* | |
Оптимизация автогенерирующихся картинок | |
*/ | |
imagejpeg($this->image, $file, $quality); | |
// WebSEO.kz START add: После сохранения превьюшки в формате jpg/jpeg, оптимизируем файл классом Imagick | |
// Create new imagick object | |
$im = new Imagick($file); | |
// Optimize the image layers | |
$im->optimizeImageLayers(); |
This file contains hidden or 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
// WebSEO.kz add: перекодирую путь картинок, чтобы прошла валидация | |
// $s='https://www.domen.kz/image/data/печи Варнава/Сказка Мини (до 12 куб.м.)-190x190.jpg'; | |
$url = parse_url($s); | |
$arr = explode('/', $url['path']); | |
$coded = array_map('rawurlencode', $arr); // Обработать массив функцией rawurlencode | |
$restored = 'https://'.$url['host'].implode('/', $coded); // Собрать перекодированный url обратно | |
// $restored = str_replace('%23', '#', $$restored); // Ибо rawurlencode заменяет якорь '#' на ''%23' |
NewerOlder