Exemplo n.º 1
0
function mfn_template_show_box()
{
    global $MFN_Options, $mfn_template_meta_box, $post;
    $MFN_Options->_enqueue();
    // Use nonce for verification
    echo '<div id="mfn-wrapper">';
    echo '<input type="hidden" name="mfn_template_meta_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
    mfn_builder_show();
    echo '</div>';
}
Exemplo n.º 2
0
function mfn_post_show_box()
{
    global $MFN_Options, $mfn_post_meta_box, $post;
    $MFN_Options->_enqueue();
    // Use nonce for verification
    echo '<div id="mfn-wrapper">';
    echo '<input type="hidden" name="mfn_post_meta_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />';
    mfn_builder_show();
    echo '<table class="form-table">';
    echo '<tbody>';
    foreach ($mfn_post_meta_box['fields'] as $field) {
        $meta = get_post_meta($post->ID, $field['id'], true);
        if (!key_exists('std', $field)) {
            $field['std'] = false;
        }
        $meta = $meta || $meta === '0' ? $meta : stripslashes(htmlspecialchars($field['std'], ENT_QUOTES));
        mfn_meta_field_input($field, $meta);
    }
    echo '</tbody>';
    echo '</table>';
    echo '</div>';
}