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 | |
| /** | |
| * Setup development environment by manipulating plugin activation | |
| * Replace the dev URLs and plugin paths accordingly | |
| */ | |
| function mysite_development_environment_setup() { | |
| // define the development sites | |
| $dev_envs = array( | |
| 'http://localhost:8888', |
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 | |
| //defer css | |
| function add_rel_preload($html, $handle, $href, $media) { | |
| if (is_admin()) | |
| return $html; | |
| $html = <<<EOT | |
| <link defer="defer" rel='stylesheet' href='$href' media="print" onload="this.media='all'" id='$handle' crossorigin="anonymous"/> |
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 memory limit for this site | |
| define( 'WP_MEMORY_LIMIT', '128M' ); | |
| define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
| // Database | |
| define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
| define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
| // Explicitely setting url |
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
| upstream phpfpm { | |
| server unix:/var/run/php5-fpm.sock; | |
| } | |
| upstream hhvm { | |
| server unix:/var/run/hhvm/hhvm.sock; | |
| } | |
| # SSL | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
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
| через терминал | |
| в одном проекте | |
| git config core.autocrlf true | |
| во всех проектах | |
| git config --global core.autocrlf true | |
| или в файле проекта .git\config | |
| [core] | |
| autocrlf = 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
| /** | |
| * Прогресс бар при скроле страницы | |
| * | |
| * @author Artem Abramovich | |
| * @verphp 7.0 | |
| */ | |
| function art_progress_bar() { | |
| ?> | |
| <style> |
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
| # ---------------------------------------------------------------------- | |
| # webP Grafiken statt jpgs verwenden | |
| # ---------------------------------------------------------------------- | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{HTTP_ACCEPT} image/webp | |
| RewriteCond %{DOCUMENT_ROOT}/$1.webp -f | |
| RewriteRule ^(wp-content/uploads.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] | |
| </IfModule> |
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
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.6 - 10/2022 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://seoagentur-hamburg.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
NewerOlder