• Resolved seanpaulfx

    (@seanpaulfx)


    I use this code to add some things, all is good but when I test with Query Monitor plugin I get error message

    function demo_mt() {
        $html = '...';
        return $html;
    }
    
    array(
        'name'  => __( 'demo', 'meta-box' ),
        'type' => 'custom_html',
        'callback' => demo_mt,
    ),
        

    Use of undefined constant demo_mt – assumed ‘demo_mt’ (this will throw an Error in a future version of PHP)

    Wordpress: 5.9.1
    php: 7.4.25

Viewing 1 replies (of 1 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi, you should put the function name inside quotes, like this:

    ‘callback’ => ‘demo_mt’

Viewing 1 replies (of 1 total)
  • The topic ‘Using Custom HTML To Output Anything’ is closed to new replies.