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 OutputmodMinify | |
| * | |
| * include_once 'OutputmodMinify.php'; | |
| * $html = \OutputmodMinify::minify($html); | |
| */ | |
| /** | |
| * ----------------------------------------------------------------------------------------- |
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_options SET option_value = REPLACE(option_value, 'https://dev.mysite.com', 'https://mysite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET post_content = REPLACE (post_content, 'https://dev.mysite.com', 'https://mysite.com'); | |
| UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'https://dev.mysite.com','https://mysite.com'); | |
| UPDATE wp_comments SET comment_content = REPLACE (comment_content, 'https://dev.mysite.com', 'https://mysite.com'); | |
| UPDATE wp_comments SET comment_author_url = REPLACE (comment_author_url, 'https://dev.mysite.com','https://mysite.com'); | |
| UPDATE wp_posts SET guid = REPLACE (guid, 'https://dev.mysite.com', 'https://mysite.com') WHERE post_type = 'attachment'; | |
| -- мультисайт | |
| UPDATE wp_blogs SET domain = REPLACE (domain, 'dev.mysite.com', 'mysite.com'); | |
| UPDATE wp_site SET domain = REPLACE (domain, 'dev.mysite.com', 'mysite.com'); |
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 | |
| /** | |
| * MODX Evo | |
| */ | |
| // $e = &$modx->event; | |
| // switch ($e->name) { | |
| // case "OnWebPagePrerender":{ | |
| // include_once $_SERVER['DOCUMENT_ROOT'] . '/madmen/output_modifier/core_scripts/output_modifier.php'; | |
| // if (function_exists('modifyImagesWebp')){ |
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
| function addListener(what, cbk, action, deferred, deferred_listener, onAddCallback){ | |
| var what = what || false; | |
| var cbk = cbk || false; | |
| var action = action || 'click'; | |
| var deferred = deferred || false; | |
| var deferred_listener = deferred_listener || document.documentElement; | |
| var onAddCallback = onAddCallback || false; | |
| if (!action){ | |
| action = 'click'; // тут не уверен, если пробросим false или null как будет себя вести, потому такая доп. проверка |
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
| !function(){function e(){ | |
| // ваш код | |
| }"interactive"==document.readyState||"complete"==document.readyState?e():document.addEventListener("DOMContentLoaded",function(){e()})}(); |
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
| wp-config: | |
| define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] ); | |
| define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] ); | |
| plugin/functions.php: | |
| <?php | |
| if (!defined('ABSPATH')){ | |
| die(); |
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 | |
| // https://gist.github.com/HDDen/2e23003b13496bb7ac8eb76a1dc17d2a | |
| // v 1.2.0 | |
| if (!defined('ABSPATH')){ | |
| die(); | |
| } | |
| /* | |
| $team_img = get_kama_img(20, array( | |
| 'width' => 720, |
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 | |
| /** | |
| * Post modified date, post uri and post parent title | |
| */ | |
| //создаем новую колонку | |
| function hdden_manage_pages_columns($columns) | |
| { | |
| $columns['post_modified'] = 'Дата редакт.'; | |
| $columns['fullslug'] = 'URI'; |
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
| /** | |
| * Заходим в редактирование товара, далее в опции. | |
| * Предсоздаём нужные, добавляем новые строки в нужном количестве. | |
| * Затем выполняем скрипт - он лишь заполняет инпуты строк | |
| */ | |
| (function(){ | |
| // включаем вывод в консоль | |
| var debug = true; |
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
| // Получить все css на странице, записать их веса и даты в localstorage | |
| // по таймеру делать head-запрос, сверять. Если изменился - добавлять в адрес гет-параметр | |
| !function(){function n(){ | |
| var whitelistDomains = [ | |
| 'allpans.su', | |
| ]; | |
| var timeout = 700; |
OlderNewer