function wpai_api_metabox($post_type) { if (!$this->is_active_addon($post_type)) { return; } echo $this->helper_metabox_top($this->name); $current_values = $this->helper_current_field_values(); $visible_fields = 0; foreach ($this->fields as $field_slug => $field_params) { if ($field_params['is_sub_field']) { continue; } $visible_fields++; } $counter = 0; foreach ($this->fields as $field_slug => $field_params) { // do not render sub fields if ($field_params['is_sub_field']) { continue; } $counter++; $this->render_field($field_params, $field_slug, $current_values, $visible_fields == $counter); //if ( $field_params['type'] != 'accordion' ) echo "<br />"; } echo $this->helper_metabox_bottom(); if (!empty($this->image_sections)) { $is_images_section_enabled = apply_filters('wp_all_import_is_images_section_enabled', true, $post_type); foreach ($this->image_sections as $k => $section) { $section_options = array(); foreach ($this->image_options as $slug => $value) { $section_options[$section['slug'] . $slug] = $value; } if (!$is_images_section_enabled and !$k) { $section_options[$section['slug'] . 'is_featured'] = 1; } PMXI_API::add_additional_images_section($section['title'], $section['slug'], $this->helper_current_field_values($section_options), '', true, false, $section['type']); } } }
echo $post['custom_type']; ?> "/> <input type="hidden" name="type" value="<?php echo $post['custom_type'] == 'page' ? 'page' : 'post'; ?> "/> <?php if (in_array('main', $visible_sections)) { do_action('pmxi_extend_options_main', $post_type, $post); } if (in_array('featured', $visible_sections)) { $is_images_section_enabled = apply_filters('wp_all_import_is_images_section_enabled', true, $post_type); if ($is_images_section_enabled) { PMXI_API::add_additional_images_section(__('Images', 'wp_all_import_plugin'), '', $post, $post_type, true, true); } do_action('pmxi_extend_options_featured', $post_type, $post); } if (in_array('cf', $visible_sections)) { include 'template/_custom_fields_template.php'; do_action('pmxi_extend_options_custom_fields', $post_type, $post); } if (in_array('taxonomies', $visible_sections)) { include 'template/_taxonomies_template.php'; do_action('pmxi_extend_options_taxonomies', $post_type, $post); } if (in_array('other', $visible_sections)) { include 'template/_other_template.php'; do_action('pmxi_extend_options_other', $post_type, $post); }