php

Fixing Fatal PHP PharException without disabling your accelerator

When you encounter Fatal error: PharException with message __HALT_COMPILER(); must be declared in a phar the easiest solution to keep your project environment the same is to convert the phar file into multiple PHP files and include them in the classic style !

Phar archive

Tags: , , ,

PHP Code for removing all “generator” content from wordpress 4.0 – HTML & Feed/Rss

Update your functions.php from your template theme to get rid of such “generator” content.
functions.php location

PHP code example how to remove generator content, like:
<meta name=”generator” content=”WordPress 4.0″ />
<generator>http://wordpress.org/?v=4.0 </generator>
<link rel=”stylesheet” href=”/style/wp4.css?v=4.0″ />
<script type=’text/javascript’ src’/resize.js?ver=4.0′></script>
<link rel=”EditURI” type=”application/rsd+xml” title=”RSD” href=”/xmlrpc.php?rsd” />
<link rel=”wlwmanifest” type=”application/wlwmanifest+xml” href=”/wlwmanifest.xml” />

Note: The code applied for Wordpress 4.0, written in PHP.

Tags: ,