config = $config;
}
public function render(): void
{
$settings = $this->getCurrentSettings();
?>
renderCheckbox('enabled', $settings['enabled'],
__('Enable Internal Links', '1platform-content-ai'),
__('Automatically add internal links between posts based on keywords.', '1platform-content-ai')
);
$this->renderCheckbox('same_category_only', $settings['same_category_only'],
__('Link Same Category Posts Only', '1platform-content-ai'),
__('Only create links between posts in the same category for semantic relevance.', '1platform-content-ai')
);
$this->renderCheckbox('distribute_links', $settings['distribute_links'],
__('Distribute Links Evenly', '1platform-content-ai'),
__('Prevent link clustering by distributing links throughout content.', '1platform-content-ai')
);
$this->renderNumberInput('batch_size', $settings['batch_size'], 1, 50,
__('Batch Size', '1platform-content-ai'),
__('Number of posts to process in each batch job.', '1platform-content-ai')
);
?>
renderNumberInput('max_links_per_post', $settings['max_links_per_post'], 1, 50,
__('Max Links Per Post', '1platform-content-ai'),
__('Maximum number of internal links to add to a single post.', '1platform-content-ai')
);
$this->renderNumberInput('max_links_per_keyword', $settings['max_links_per_keyword'], 1, 20,
__('Max Links Per ContaiKeyword', '1platform-content-ai'),
__('Maximum number of times a keyword can be linked across all posts.', '1platform-content-ai')
);
$this->renderNumberInput('max_links_per_target', $settings['max_links_per_target'], 1, 20,
__('Max Links To Target Post', '1platform-content-ai'),
__('Maximum number of links pointing to a single target post.', '1platform-content-ai')
);
?>
renderCheckbox('case_insensitive', $settings['case_insensitive'],
__('Case Insensitive Matching', '1platform-content-ai'),
__('Match keywords regardless of capitalization.', '1platform-content-ai')
);
$this->renderCheckbox('word_boundaries', $settings['word_boundaries'],
__('Use Word Boundaries', '1platform-content-ai'),
__('Only match complete words, not partial matches within other words.', '1platform-content-ai')
);
$this->renderNumberInput('min_keyword_length', $settings['min_keyword_length'], 1, 10,
__('Minimum ContaiKeyword Length', '1platform-content-ai'),
__('Minimum character length for keywords to be matched.', '1platform-content-ai')
);
?>
$this->config->isInternalLinksEnabled(),
'max_links_per_post' => $this->config->getMaxLinksPerPost(),
'max_links_per_keyword' => $this->config->getMaxLinksPerKeyword(),
'max_links_per_target' => $this->config->getMaxLinksPerTarget(),
'batch_size' => $this->config->getInternalLinksBatchSize(),
'excluded_tags' => $this->config->getExcludedTags(),
'case_insensitive' => $this->config->isCaseInsensitiveMatching(),
'word_boundaries' => $this->config->useWordBoundaries(),
'same_category_only' => $this->config->isSameCategoryOnly(),
'min_keyword_length' => $this->config->getMinKeywordLength(),
'distribute_links' => $this->config->shouldDistributeLinks(),
];
}
}