Add a security credit for wordpress site

Hiee friends,

I found  a code over wordpress site which was checking footer page for its credit and dies if not matching with the phrase.

function wp_initialize_the_theme_load() {
if (!function_exists(“wp_initialize_the_theme”)) {
wp_initialize_the_theme_message(); die;
}
}

function wp_initialize_the_theme_finish() {
$uri = strtolower($_SERVER[“REQUEST_URI”]); if(is_admin() || substr_count($uri, “wp-admin”) > 0 || substr_count($uri, “wp-login”) > 0 ) { /* */ } else { $l = ‘ | Designed by: <a href=”http://www.shakalya.com”>shakalya</a> | Thanks to <a href=”http://www.shakalya.me/”>www.shakalya.me</a>’; $f = dirname(__file__) . “/footer.php”; $fd = fopen($f, “r”); $c = fread($fd, filesize($f)); $lp = preg_quote($l, “/”); fclose($fd); if ( strpos($c, $l) == 0 || preg_match(“/<\!–(.*” . $lp . “.*)–>/si”, $c) || preg_match(“/<\?php([^\?]+[^>]+” . $lp . “.*)\?>/si”, $c) ) { /*wp_initialize_the_theme_message(); die;*/ } } }

wp_initialize_the_theme_finish();

The code reads the footer.php and match with its credit phrase.

If the code does’t match it through a theme message and stops.

If it founds the exact match of the credit phase it passess the credit checkout and site runs smoothly.

Leave a Comment