This file contains hidden or 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 | |
/** | |
* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version); | |
* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all | |
* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info() | |
* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems. | |
* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento | |
* @author Magento Inc. | |
*/ |
This file contains hidden or 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 | |
function buildTree(array $elements, $parentId = NULL) { | |
$branch = array(); | |
foreach ($elements as $key => $element) { | |
if ($element['parent'] == $parentId) { | |
$children = buildTree($elements, $element['id']); | |
if ($children) { | |
$element['children'] = $children; |
This file contains hidden or 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
function lb_editor_remove_meta_box() { | |
global $post_type; | |
/** | |
* Check to see if the global $post_type variable exists | |
* and then check to see if the current post_type supports | |
* excerpts. If so, remove the default excerpt meta box | |
* provided by the WordPress core. If you would like to only | |
* change the excerpt meta box for certain post types replace | |
* $post_type with the post_type identifier. | |
*/ |