} $post->add_meta_box(__('Custom Thumbnails', kopa_get_domain()), 'kopa-metabox-post-custom-thumbnail', $second_metaboxes); } } /** * Add metaboxes "SEO" for Post */ if ('true' == KopaOptions::get_option('seo_status', 'false')) { $metaboxes['fields'] = array(array('type' => 'textarea', 'id' => KOPA_OPT_PREFIX . 'seo_keywords', 'name' => KOPA_OPT_PREFIX . 'seo_keywords', 'label' => __('Keywords', kopa_get_domain()), 'help' => __('Enter keyword(s) of current post, separated by comma.', kopa_get_domain()), 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 4), 'default' => ''), array('type' => 'textarea', 'id' => KOPA_OPT_PREFIX . 'seo_descriptions', 'name' => KOPA_OPT_PREFIX . 'seo_descriptions', 'label' => __('Description', kopa_get_domain()), 'help' => __('Enter description of current post', kopa_get_domain()), 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 4), 'default' => '')); $post->add_meta_box(__('SEO - Search engine optimization', kopa_get_domain()), 'kopa-metabox-post-seo', $metaboxes); } /** * Add metaboxes for post's taxonomies */ $limis = array(); $limis['inherit'] = __('-- Inherit setting from Reading Settings --', kopa_get_domain()); $limis['-1'] = __('Display all posts on a page', kopa_get_domain()); for ($i = 1; $i <= 100; $i++) { $limis[$i] = $i; } $taxonomy_fields = array(); $taxonomy_fields[] = array('type' => 'select', 'id' => KOPA_OPT_PREFIX . 'posts_per_page', 'name' => KOPA_OPT_PREFIX . 'posts_per_page', 'label' => __('Posts per page', kopa_get_domain()), 'default' => 'inherit', 'classes' => array('percent30'), 'options' => $limis); $taxonomy_fields[] = array('type' => 'select', 'id' => KOPA_OPT_PREFIX . 'is_display_content_formatted', 'name' => KOPA_OPT_PREFIX . 'is_display_content_formatted', 'default' => 'inherit', 'label' => __('Is display content formatted', kopa_get_domain()), 'classes' => array('percent30'), 'options' => array('inherit' => __('-- Inherit setting from Theme Options --', kopa_get_domain()), 'true' => __('Yes', kopa_get_domain()), 'false' => __('No', kopa_get_domain()))); $taxonomy_fields[] = array('type' => 'checkbox', 'id' => KOPA_OPT_PREFIX . 'is_use_custom_layout', 'name' => KOPA_OPT_PREFIX . 'is_use_custom_layout', 'default' => 'false', 'classes' => array('ckb_is_use_custom_layout_toggle'), 'label' => __('Is use custom layout for this post', kopa_get_domain()), 'is_append_label_before_control' => false, 'help' => NULL, 'attributes' => array('onchange' => 'KopaLayout.isUseCustomLayoutToggle(event, jQuery(this));')); $taxonomy_fields[] = array('type' => 'layout', 'id' => KOPA_OPT_PREFIX . 'layout', 'name' => KOPA_OPT_PREFIX . 'layout', 'label' => NULL, 'default' => $tmp_kopaSettings['taxonomy'], 'template_hierarchy' => 'taxonomy'); if ('true' == KopaOptions::get_option('seo_status', 'false')) { $taxonomy_fields[] = array('type' => 'textarea', 'id' => KOPA_OPT_PREFIX . 'seo_keywords', 'name' => KOPA_OPT_PREFIX . 'seo_keywords', 'label' => __('Keywords', kopa_get_domain()), 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 4), 'default' => ''); $taxonomy_fields[] = array('type' => 'textarea', 'id' => KOPA_OPT_PREFIX . 'seo_descriptions', 'name' => KOPA_OPT_PREFIX . 'seo_descriptions', 'label' => __('Description', kopa_get_domain()), 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 4), 'default' => ''); } $post->add_taxonomy_fields($taxonomy_fields, 'category'); $post->add_taxonomy_fields($taxonomy_fields, 'post_tag');