Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
// create fake page called "chat-room" | |
// modify function and variable names with "ABCD" to whatever you like | |
// modify variable $fakepage_ABCD_url to the fake URL you require | |
add_filter('the_posts','fakepage_ABCD_detect',-10); | |
function fakepage_ABCD_detect($posts){ | |
global $wp; | |
global $wp_query; | |
global $fakepage_ABCD_detect; // used to stop double loading |
#!/bin/sh | |
# PATH TO YOUR HOSTS FILE | |
ETC_HOSTS=/etc/hosts | |
# DEFAULT IP FOR HOSTNAME | |
IP="127.0.0.1" | |
# Hostname to add/remove. | |
HOSTNAME=$1 |
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
/** | |
* Отключаем srcset и sizes для картинок в WordPress | |
*/ | |
// Отменяем srcset | |
// выходим на раннем этапе, этот фильтр лучше чем 'wp_calculate_image_srcset' | |
add_filter('wp_calculate_image_srcset_meta', '__return_null' ); | |
// Отменяем sizes - это поздний фильтр, но раннего как для srcset пока нет... | |
add_filter('wp_calculate_image_sizes', '__return_false', 99 ); |
#!/usr/bin/env bash | |
# Exit if any command fails | |
set -o errexit | |
# Exit if trying to use undeclared var | |
set -o nounset | |
# On piped commands, use the exit status of the last command throwing a non-zero exit code |
/* fixes */ | |
body {-webkit-text-size-adjust: 100% !important;} | |
html * {max-height:1000000px; min-height: 0; min-width: 0;} | |
body, | |
body * { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
vertical-align: middle; | |
} |