Render Magento CMS block code in any phtml file

Standard

<?php echo Mage::helper('cms')->getBlockTemplateProcessor()->filter('{{config path="design/footer/copyright"}}');?>

Advertisements

Add remove WordPress dashboard widgets

Standard
    function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
     
    // Remove the incomming links widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
     
    // Remove right now
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    }
     
    // Hoook into the 'wp_dashboard_setup' action to register our function
    add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets');
    add_action('wp_dashboard_setup', 'example_add_dashboard_widgets');
     
    function example_add_dashboard_widgets() {
    wp_add_dashboard_widget('example', 'Example', 'example_widget_callback');
    }
     
    function example_widget_callback() {
    echo 'testin widget';
    }