Recent

Echo_KB_Importerclass

Echo_KB_Importer

Imports content from the Echo Knowledge Base plugin.

CPT: epkb_post_type_{id} (dynamic per KB instance) Taxonomies: epkb_post_type_{id}category → wzkb_category epkb_post_type{id}tag → wzkb_tag Each KB instance → one wzkb_product term Article views: epkb-article-views → wzkb_views Article order: epkb_articles_sequence{id} option → menu_order Category order: epkb_categories_sequence{id} option → wzkb_position

Namespace: WebberZone\Knowledge_Base\Admin\Importers
Since: 3.1.0
Source: includes/admin/importers/class-echo-kb-importer.php line 28 Extends: Base_Importer

Methods

get_label()

{@inheritDoc}

Line: 82

public function get_label(  ): string;

Returns: string

get_slug()

{@inheritDoc}

Line: 89

public function get_slug(  ): string;

Returns: string

get_source_settings()

{@inheritDoc}

Reports settings for the first (or only) KB instance.

Line: 106

public function get_source_settings(  ): array;

Returns: array

get_post_count()

{@inheritDoc}

Line: 132

public function get_post_count(  ): int;

Returns: int

get_term_count()

{@inheritDoc}

Line: 139

public function get_term_count(  ): int;

Returns: int

import_terms()

{@inheritDoc}

For each KB instance:

  1. Create one wzkb_product term
  2. Import categories as wzkb_category with product_id meta
  3. Import tags as wzkb_tag

Line: 167

public function import_terms(  ): array;

Returns: array

import_posts_batch()

{@inheritDoc}

Loops all KB instances and processes posts across them in a single offset sequence. Also migrates article view counts and derives menu_order from Echo KB sequences.

Line: 216

public function import_posts_batch( int $offset, int $batch_size ): array;
Type Name Description
int $offset Pagination offset.
int $batch_size Number of posts to process.

Returns: array

finalize_import()

{@inheritDoc}

  • Optionally sets kb_slug to match the Echo KB common path.
  • Optionally replaces the first KB main page content with [knowledgebase] so it continues to display the KB at its original URL.
  • Enables multi-product mode automatically when two or more KB instances exist.
  • Sets article_permalink (Pro only) to preserve article URLs after deactivation.

Since: 3.1.0
Line: 319

public function finalize_import( bool $update_slug = ... ): void;
Type Name Description
bool $update_slug Whether the user opted to update the KB slug and main page.

Returns: void

get_before_import_notices()

{@inheritDoc}

Line: 389

public function get_before_import_notices(  ): array;

Returns: array

get_preview_data()

{@inheritDoc}

Extends the base preview with products, categories, tags, view counts, main page detail, and structured taxonomy/meta/settings mapping sections.

Since: 3.1.0
Line: 403

public function get_preview_data(  ): array;

Returns: array