PluginProbe
Hostinger Tools / 3.0.78
Hostinger Tools v3.0.78
3.0.78 3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 All 109 releases
hostinger / includes / LlmsTxtGenerator / LlmsTxtHeadLink.php

LlmsTxtHeadLink.php in Hostinger Tools 3.0.78, at includes/LlmsTxtGenerator/LlmsTxtHeadLink.php

33 lines 863 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Hostinger\LlmsTxtGenerator;
4
5 use Hostinger\Admin\PluginSettings;
6
7 defined( 'ABSPATH' ) || exit;
8
9 class LlmsTxtHeadLink {
10
11 protected PluginSettings $plugin_settings;
12 protected LlmsTxtFileHelper $file_helper;
13
14 public function __construct( PluginSettings $plugin_settings, LlmsTxtFileHelper $llmstxt_file_helper ) {
15 $this->plugin_settings = $plugin_settings;
16 $this->file_helper = $llmstxt_file_helper;
17 }
18
19 public function render(): void {
20 $settings = $this->plugin_settings->get_plugin_settings();
21
22 if ( ! $settings->get_enable_llms_txt() ) {
23 return;
24 }
25
26 if ( ! $this->file_helper->llmstxt_file_exists() ) {
27 return;
28 }
29
30 printf( '<link rel="describedby" href="%s" />' . "\n", esc_url( $this->file_helper->get_llmstxt_file_url() ) );
31 }
32 }
33