- Свободная лицензия (в идеале)
- API
- Масштабировать текст по количеству символов (в идеале)
- Быть кроссбраузерным IE9+
- Сокращать ссылки и подсвечивать ссылки
- Иметь защиту от XSS
- Конфигурироваться
- Поддерживать историю
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
<?php | |
// Only dependency that's used | |
// TODO: Implement filter for the_content(); | |
use WebPConvert\WebPConvert; | |
add_filter('wp_generate_attachment_metadata', function($meta) { | |
$path = wp_upload_dir(); // get upload directory |
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
<? | |
//amo | |
//ПРЕДОПРЕДЕЛЯЕМЫЕ ПЕРЕМЕННЫЕ | |
$responsible_user_id = 7292136; //id ответственного по сделке, контакту, компании | |
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки | |
$lead_status_id = '11331793'; //id этапа продаж, куда помещать сделку | |
$contact_name = $cname; //Название добавляемого контакта | |
$contact_phone = $cphone; //Телефон контакта |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www\.context-promo\.ru$ [NC,OR] | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://context-promo.ru/$1 [R=301,L] | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] |
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
<?php | |
/* | |
* Class mainMenuWalker | |
* | |
* Walker класс для меню | |
* | |
*/ | |
class mainMenuWalker extends Walker_Nav_Menu { | |
function start_el(&$output, $item, $depth=0, $args=array(), $id = 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
@import "vars"; | |
@import "fonts"; | |
@media screen and (min-width: 1300px) { | |
.container-fluid { | |
max-width: 1320px; | |
margin: 0 auto; | |
} | |
} |
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
<?php | |
/** | |
* Поддержка миниатюр | |
*/ | |
add_theme_support('post-thumbnails'); | |
/** | |
* Подключение скриптов |
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
<?php | |
/** | |
* Простой прокси-сервер на PHP для изучения и модификации данных, | |
* передаваемых между браузером и сторонним сервером. | |
* | |
* Запуск: | |
* | |
* указать URL сайта в $base | |
* php -S 127.0.0.1:9001 proxy.php | |
* |
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
/** | |
* Отформатировать телефонный номер. | |
* | |
* Для мобильных код отбивается пробелами, для домашних — скобками. | |
* | |
* Грамотно обрабатываются только русские номера, | |
* для остальных функция пытается отформатировать более-менее нормально. | |
* | |
* Для отбивания цифр используются не просто дефисы, а специальные цифровые чёрточки, не хухры. | |
* |
NewerOlder