White Screen

Home Forums General Discussion White Screen

This topic contains 0 replies, has 1 voice, and was last updated by  DSM - Brett 11 months, 2 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2724

    DSM - Brett
    Participant

    All the custom metaboxes I’ve created work fine but when I update a page the screen goes white and takes me to a short url of http://www.mywebsitename/wp-admin/post.php instead of the usual http://http://www.mywebsitename/wp-admin/post.php?post=19&action=edit&message=1 like on other pages.

    The above problem doesn’t happen on my local copy just the live site. What am I doing wrong?

    here’s the code.

    <?php

     

    include_once ‘MetaBox.php’;

    include_once ‘MediaAccess.php’;

     

     

     

    // custom constant (opposite of TEMPLATEPATH)

    define(‘_TEMPLATEURL’,WP_CONTENT_URL . ‘/themes/’ . basename(TEMPLATEPATH));

     

    // custom css for our meta boxes

    if (is_admin()) wp_enqueue_style(‘custom_meta_css’,_TEMPLATEURL . ‘/metaboxes/meta.css’);

     

     

    $wpalchemy_media_access = new WPAlchemy_MediaAccess();

    // create the meta box

     

    $custom_metabox = new WPAlchemy_MetaBox(array

    (

    ‘id’ => ‘_custom_metaGallery’,

    ‘title’ => ‘Gallery Panel’,

    ‘template’ => TEMPLATEPATH . ‘/metaboxes/meta-gallery.php’

    ));

     

     

    // important: note the priority of 99, the js needs to be placed after tinymce loads

    add_action(‘admin_print_footer_scripts’,’my_admin_print_footer_scripts’,99);

    function my_admin_print_footer_scripts()

    {

    ?><script type=”text/javascript”>/* <![CDATA[ */

    jQuery(function($)

    {

    var i=1;

    $('.customEditor textarea').each(function(e)

    {

    var id = $(this).attr('id');

     

    if (!id)

    {

    id = 'customEditor-' + i++;

    $(this).attr('id',id);

    }

     

    tinyMCE.execCommand('mceAddControl', false, id);

    });

    });

    /* ]]> */</script><?php

    }

    ?>

     

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.