This file contains 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
//* Add rel nofollow to all external links | |
function wp_nofollow($content) | |
{ | |
return preg_replace_callback('/<a[^>]+/', 'wp_nofollow_callback', $content); | |
} | |
function wp_nofollow_callback($matches) | |
{ | |
$link = $matches[0]; | |
$site_link = get_bloginfo('url'); | |
if (strpos($link, 'rel') === false) |
This file contains 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
//* Display last updated date | |
function wpcb_last_updated_date( $content ) { | |
$u_time = get_the_time('U'); | |
$u_modified_time = get_the_modified_time('U'); | |
if ($u_modified_time >= $u_time + 86400) { | |
$updated_date = get_the_modified_time('d/m/Y'); | |
$updated_time = get_the_modified_time('H:i'); | |
$custom_content .= '<p class="last-updated">Cập nhật lần cuối '. $updated_date . ' at '. $updated_time .'</p>'; | |
} |
This file contains 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
.last-updated { | |
// Your CSS | |
} |
This file contains 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
add_filter('wpdiscuz_comment_author', 'my_commentCount', 10, 2); | |
function my_commentCount($author_name, $comment) { | |
global $wpdb; | |
$count = $wpdb->get_var('SELECT COUNT(comment_ID) FROM ' . $wpdb->comments. ' WHERE comment_author_email = "' . addslashes($comment->comment_author_email) . '"'); | |
return $author_name .' | <span class="wpdiscuz-comment-count">'. $count . ' comments</span>'; | |
} |
This file contains 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
define('WP_TEMP_DIR', ABSPATH . 'wp-content/'); |
This file contains 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
* @package WordPress | |
*/ | |
define('WP_TEMP_DIR', ABSPATH . 'wp-content/'); | |
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'anotherd_wrd1'); |
This file contains 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
* @package WordPress | |
*/ | |
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'anotherd_wrd1'); |
This file contains 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
/*** FTP login settings ***/ | |
define("FTP_HOST", "localhost"); | |
define("FTP_USER", "ftp-user"); | |
define("FTP_PASS", "ftp-password"); |
This file contains 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
define('FS_METHOD', 'direct'); |
This file contains 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_value max_input_time 120 |