Beispiel #1
0
/**
 * Add Beans post meta.
 *
 * @since 1.0.0
 */
function beans_do_register_post_meta()
{
    // Get layout option without default for the count.
    $options = beans_get_layouts_for_options();
    // Stop here if there is less than two layouts options.
    if (count($options) < 2) {
        return;
    }
    $fields = array(array('id' => 'beans_layout', 'label' => _x('Layout', 'post meta', 'tm-beans'), 'type' => 'radio', 'default' => 'default_fallback', 'options' => beans_get_layouts_for_options(true)));
    beans_register_post_meta($fields, array('post', 'page'), 'tm-beans', array('title' => __('Post Options', 'tm-beans')));
}
Beispiel #2
0
function dfh_portfolio_post_meta()
{
    $fields = array(array('id' => 'portfolio_url', 'label' => 'Website url', 'type' => 'text', 'default' => ''), array('id' => 'portfolio_status', 'label' => 'Status', 'type' => 'radio', 'default' => '', 'options' => array('0' => 'Offline', '1' => 'Online', '2' => 'Coming soon')), array('id' => 'portfolio_colophon', 'label' => 'Colophon', 'type' => 'textarea', 'default' => ''), array('id' => 'portfolio_gallery', 'label' => 'Gallery', 'type' => 'image', 'multiple' => true));
    beans_register_post_meta($fields, array('portfolio'), 'beans', array('title' => 'Project Info'));
}
function tbr_theme_post_meta()
{
    $fields = array(array('id' => 'version', 'label' => 'Version', 'type' => 'text', 'default' => ''), array('id' => 'release_date', 'label' => 'Release date', 'type' => 'text', 'default' => ''), array('id' => 'theme_screenshots', 'label' => 'Screenshots', 'type' => 'image', 'default' => '', 'multiple' => true));
    beans_register_post_meta($fields, array('themes'), 'beans', array('title' => 'Theme Info'));
}