Skip to content

Instantly share code, notes, and snippets.

@hothanhan
hothanhan / site-phalaionline
Created January 4, 2016 06:46 — forked from quangbahoa/site-phalaionline
site-phalaionline
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
<?php $trimmed = wp_trim_words( $text, $num_words = 55, $more = null ); ?>
/*** Mô tả *************
$text
(string) (required) Text to trim
Default: None
$num_words
(integer) (optional) Number of words
Default: 55
@hothanhan
hothanhan / .htaccess
Last active August 29, 2015 14:19 — forked from quangbahoa/.htaccess
## LEVERAGE BROWSER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
Mở file wp-config.php
Tìm: define('WPLANG', '');
Thêm bên dưới:
define('WP_POST_REVISIONS', false );
define('AUTOSAVE_INTERVAL', 240 );
define('DISALLOW_FILE_EDIT',true);
define('WP_MEMORY_LIMIT', '64M');