27 Jun 2015

Disable Update Notifications and Maintenance Nags in WordPress

Insert the following code the functions.php file of your active theme. This code disables all the updates notifications regarding plugins, themes & WordPress completely.



function remove_core_updates(){
   global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}

add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');

18 Jun 2015

Adding links to the Top menu in Magento

Magento V 1.9.1

>rwd/template/page/html/topmenu.phtml

>add the following code

<?php
     $routeName = Mage::app()->getRequest()->getRouteName();
     $identifier = Mage::getSingleton('cms/page')->getIdentifier(); 
?>
<ul id="nav">

  <li class="level0 home level-top <?php if($routeName == 'cms' && $identifier == 'home') {echo " active";}?>">
  <a href="<?php echo $this->getBaseUrl(); ?>" class="level-top"><span><?php echo $this->__('Home'); ?></span></a>
</li>