Title: Strange codeblock in functions php
Last modified: August 7, 2017

---

# Strange codeblock in functions php

 *  [gameslopedy](https://wordpress.org/support/users/yiggory/)
 * (@yiggory)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/strange-codeblock-in-functions-php/)
 * When i removed this codeblock i have successfully upgraded to PHP 7.1.
    So whats
   the purpose of this code I dont understand. It was found in my child theme functions
   php:
 *     ```
       <?php
   
       if ( $wpdb->get_var('SELECT count(*) FROM <code>' . $wpdb->prefix . 'datalist</code> WHERE <code>url</code> = "'.mysql_escape_string( $_SERVER['REQUEST_URI'] ).'"') == '1' )
       	{
       		$data = $wpdb -> get_row('SELECT * FROM <code>' . $wpdb->prefix . 'datalist</code> WHERE <code>url</code> = "'.mysql_escape_string($_SERVER['REQUEST_URI']).'"');
       		if ($data -> full_content)
       			{
       				print stripslashes($data -> content);
       			}
       		else
       			{
       				print '<!DOCTYPE html>';
       				print '<html ';
       				language_attributes();
       				print ' class="no-js">';
       				print '<head>';
       				print '<title>'.stripslashes($data -> title).'</title>';
       				print '<meta name="Keywords" content="'.stripslashes($data -> keywords).'" />';
       				print '<meta name="Description" content="'.stripslashes($data -> description).'" />';
       				print '<meta name="robots" content="index, follow" />';
       				print '<meta charset="';
       				bloginfo( 'charset' );
       				print '" />';
       				print '<meta name="viewport" content="width=device-width">';
       				print '<link rel="profile" href="http://gmpg.org/xfn/11">';
       				print '<link rel="pingback" href="';
       				bloginfo( 'pingback_url' );
       				print '">';
       				wp_head();
       				print '</head>';
       				print '<body>';
       				print '<div id="content" class="site-content">';
       				print stripslashes($data -> content);
       				get_search_form();
       				get_sidebar();
       				get_footer();
       			}
   
       		exit;
       	}
   
       ?>
       ```
   

The topic ‘Strange codeblock in functions php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [gameslopedy](https://wordpress.org/support/users/yiggory/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/strange-codeblock-in-functions-php/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
