Function Reference: geodir_meta_box_add

Summary

Adds meta boxes to the GD post types.

Global Values

$post
(object) (required) WordPress Post object.

Default: None

Package

GeoDirectory

Change Log

Since: 1.0.0

Source File

geodir_meta_box_add() is located in geodirectory-admin/admin_hooks_actions.php [Line: 228]

Source Code

function geodir_meta_box_add()
{
    global $post;

    $geodir_post_types = geodir_get_posttypes('array');
    $geodir_posttypes = array_keys($geodir_post_types);

    if (isset($post->post_type) && in_array($post->post_type, $geodir_posttypes)):

        $geodir_posttype = $post->post_type;
        $post_typename = __($geodir_post_types[$geodir_posttype]['labels']['singular_name'], 'geodirectory');
        $post_typename = geodir_ucwords($post_typename);

        // Filter-Payment-Manager

        add_meta_box('geodir_post_images', $post_typename . ' ' . __('Attachments', 'geodirectory'), 'geodir_post_attachments', $geodir_posttype, 'side');

        add_meta_box('geodir_post_info', $post_typename . ' ' . __('Information', 'geodirectory'), 'geodir_post_info_setting', $geodir_posttype, 'normal', 'high');

        // no need of this box as all fields moved to main information box
        //add_meta_box( 'geodir_post_addinfo', $post_typename. ' ' .__('Additional Information' , 'geodirectory'), 'geodir_post_addinfo_setting', $geodir_posttype,'normal', 'high' );

    endif;

}