Recent

Link_RewriterclassPro only

Link Rewriter class.

Namespace: WebberZone\Knowledge_Base\Pro\GitHub
Since: 3.1.0
Source: includes/pro/github/class-link-rewriter.php line 21

Methods

__construct()

Constructor.

Since: 3.1.0
Line: 49

public function __construct( string $repo_owner, string $repo_name );
Type Name Description
string $repo_owner Repository owner.
string $repo_name Repository name.

rebuild_path_map()

Build and cache a map of repo path → post ID.

Queries all posts with _wzkb_github_repo matching this repo and stores a transient keyed ‘owner/repo:path’ => post_id for 24 hours.

Since: 3.1.0
Line: 73

public function rebuild_path_map(  ): void;

Returns: void

rewrite()

Rewrite relative .md links in HTML to WordPress post permalinks.

Since: 3.1.0
Line: 112

public function rewrite( string $html, string $current_file_path ): string;
Type Name Description
string $html Converted HTML content.
string $current_file_path Repo-relative path of the file being imported.

Returns: string — HTML with links rewritten where possible.