| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly |
| 4 |
if (! defined('ABSPATH')) exit; |
| 5 |
|
| 6 |
/** |
| 7 |
* @package Admin |
| 8 |
* @sub-package Admin Webmaster Display |
| 9 |
*/ |
| 10 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template partial included within class method scope; variables are local, not global. |
| 11 |
?> |
| 12 |
|
| 13 |
<?php include('header.php'); ?> |
| 14 |
<div id="webmaster"> |
| 15 |
<div class="content-wrapper"> |
| 16 |
<div class="header"> |
| 17 |
<h3><?php esc_html_e('Webmaster Tools', 'catch-web-tools'); ?></h3> |
| 18 |
</div> <!-- .header --> |
| 19 |
<div class="content"> |
| 20 |
<form method="post" action="options.php"> |
| 21 |
<?php settings_fields('webmaster-tools-group'); ?> |
| 22 |
|
| 23 |
<?php $settings = catchwebtools_get_options('catchwebtools_webmaster'); ?> |
| 24 |
|
| 25 |
<div class="option-container"> |
| 26 |
<h3 class="option-toggle option-active"><a href="#"><?php esc_html_e('Enable Webmaster Module', 'catch-web-tools'); ?></a></h3> |
| 27 |
|
| 28 |
<div class="option-content inside open"> |
| 29 |
<table class="form-table"> |
| 30 |
<tbody> |
| 31 |
<tr> |
| 32 |
<th scope="row"><?php esc_html_e('Enable Webmaster Module', 'catch-web-tools'); ?></th> |
| 33 |
<td> |
| 34 |
<?php |
| 35 |
$text = (! empty($settings['status']) && $settings['status']) ? 'checked' : ''; |
| 36 |
echo '<input type="checkbox" ' . esc_attr($text) . ' name="catchwebtools_webmaster[status]" value="1"/> ' . esc_html__('Check to Enable', 'catch-web-tools'); |
| 37 |
?> |
| 38 |
</td> |
| 39 |
</tr> |
| 40 |
</tbody> |
| 41 |
</table> |
| 42 |
|
| 43 |
<?php submit_button(esc_html__('Save Changes', 'catch-web-tools')); ?> |
| 44 |
</div> |
| 45 |
|
| 46 |
<h3 class="option-toggle"><a href="#"><?php esc_html_e('Feed Redirect / Custom Feeds', 'catch-web-tools'); ?></a></h3> |
| 47 |
|
| 48 |
<div class="option-content inside"> |
| 49 |
<table class="form-table"> |
| 50 |
<tbody> |
| 51 |
<tr> |
| 52 |
<th scope="row"><?php esc_html_e('Enter your custom feed URL:', 'catch-web-tools'); ?></th> |
| 53 |
<td> |
| 54 |
<?php |
| 55 |
$text = (! empty($settings['feed_uri'])) ? $settings['feed_uri'] : ''; |
| 56 |
?> |
| 57 |
|
| 58 |
<input type="text" name="catchwebtools_webmaster[feed_uri]" id="catchwebtools_webmaster[feed_uri]" value="<?php echo esc_attr($text); ?>" size="80" /> |
| 59 |
|
| 60 |
</td> |
| 61 |
</tr> |
| 62 |
|
| 63 |
<tr> |
| 64 |
<th scope="row"><?php esc_html_e('Enter your custom comments feed URL:', 'catch-web-tools'); ?></th> |
| 65 |
<td> |
| 66 |
<?php |
| 67 |
$text = (! empty($settings['comments_feed_uri'])) ? $settings['comments_feed_uri'] : ''; |
| 68 |
?> |
| 69 |
|
| 70 |
<input type="text" name="catchwebtools_webmaster[comments_feed_uri]" id="catchwebtools_webmaster[comments_feed_uri]" value="<?php echo esc_attr($text); ?>" size="80" /> |
| 71 |
</td> |
| 72 |
</tr> |
| 73 |
<tr> |
| 74 |
<td colspan="2"> |
| 75 |
<p class="description"><?php printf(esc_html__('If your custom feed(s) are not handled by Feedblitz or Feedburner, do not use the redirect options.', 'catch-web-tools')); ?></p> |
| 76 |
</td> |
| 77 |
</tr> |
| 78 |
</tbody> |
| 79 |
</table> |
| 80 |
|
| 81 |
<?php submit_button(esc_html__('Save Changes', 'catch-web-tools')); ?> |
| 82 |
</div> |
| 83 |
|
| 84 |
<h3 class="option-toggle"><a href="#"><?php esc_html_e('Header and Footer Scripts', 'catch-web-tools'); ?></a></h3> |
| 85 |
|
| 86 |
<div class="option-content inside"> |
| 87 |
<table class="form-table"> |
| 88 |
<tbody> |
| 89 |
<tr> |
| 90 |
<th scope="row"> |
| 91 |
<?php echo esc_html__('Enter scripts or code you would like output to', 'catch-web-tools') . '<code>wp_head()</code>:' ?> |
| 92 |
</th> |
| 93 |
<td> |
| 94 |
<?php |
| 95 |
$text = (! empty($settings['header'])) ? $settings['header'] : ''; |
| 96 |
echo '<textarea cols="80" rows="7" name="catchwebtools_webmaster[header]">' . esc_textarea($text) . '</textarea>'; |
| 97 |
echo '<p class="description">' . esc_html__('The', 'catch-web-tools') . '<code>wp_head()</code>' . esc_html__('hook executes immediately before the closing </head> tag in the document source.', 'catch-web-tools') . '</p>'; |
| 98 |
?> |
| 99 |
</td> |
| 100 |
</tr> |
| 101 |
|
| 102 |
<tr> |
| 103 |
<th scope="row"> |
| 104 |
<?php echo esc_html__('Enter scripts or code you would like output to', 'catch-web-tools') . '<code>wp_footer()</code>:' ?> |
| 105 |
</th> |
| 106 |
<td> |
| 107 |
<?php |
| 108 |
$text = (! empty($settings['footer'])) ? $settings['footer'] : ''; |
| 109 |
echo '<textarea cols="80" rows="7" name="catchwebtools_webmaster[footer]">' . esc_textarea($text) . '</textarea>'; |
| 110 |
echo '<p class="description">' . esc_html__('The', 'catch-web-tools') . '<code>wp_footer()</code>' . esc_html__('hook executes immediately before the closing </body> tag in the document source.', 'catch-web-tools') . '</p>'; |
| 111 |
?> |
| 112 |
</td> |
| 113 |
</tr> |
| 114 |
</tbody> |
| 115 |
</table> |
| 116 |
<?php submit_button(esc_html__('Save Changes', 'catch-web-tools')); ?> |
| 117 |
</div> |
| 118 |
|
| 119 |
<h3 class="option-toggle"><a href="#"><?php esc_html_e('Site Verification', 'catch-web-tools'); ?></a></h3> |
| 120 |
|
| 121 |
<div class="option-content inside"> |
| 122 |
<?php echo '<p class="description">' . esc_html__('You can use the boxes below to verify with different Webmaster Tools. If your site is already verified, you can skip this section. Enter the verify meta values for', 'catch-web-tools') . ':</p>'; ?> |
| 123 |
|
| 124 |
<table class="form-table"> |
| 125 |
<tbody> |
| 126 |
<tr> |
| 127 |
<th scope="row"> |
| 128 |
<a target="_blank" href="https://www.google.com/webmasters/tools/dashboard?hl=en&siteUrl='<?php echo urlencode(get_bloginfo('url')) ?>%2F"> <?php esc_html_e('Google Webmaster Tools', 'catch-web-tools') ?> </a> |
| 129 |
</th> |
| 130 |
<td> |
| 131 |
<?php |
| 132 |
$text = (! empty($settings['google-site-verification'])) ? $settings['google-site-verification'] : ''; |
| 133 |
echo '<input type="text" size="80" name="catchwebtools_webmaster[google-site-verification]" value="' . esc_attr($text) . '" /><span>' . esc_html__('Enter your Google ID only', 'catch-web-tools') . '</span>'; |
| 134 |
?> |
| 135 |
</td> |
| 136 |
</tr> |
| 137 |
|
| 138 |
<tr> |
| 139 |
<th scope="row"> |
| 140 |
<a target="_blank" href="https://www.bing.com/webmaster/?rfp=1#/Dashboard/?url='<?php echo esc_html(str_replace('http://', '', get_bloginfo('url'))) ?>"><?php esc_html_e('Bing Webmaster Tools', 'catch-web-tools') ?></a> |
| 141 |
</th> |
| 142 |
<td> |
| 143 |
<?php |
| 144 |
$text = (! empty($settings['msvalidate.01'])) ? $settings['msvalidate.01'] : ''; |
| 145 |
echo '<input type="text" size="80" name="catchwebtools_webmaster[msvalidate.01]" value="' . esc_attr($text) . '" /><span>' . esc_html__('Enter your Bing ID only', 'catch-web-tools') . '</span>'; |
| 146 |
?> |
| 147 |
</td> |
| 148 |
</tr> |
| 149 |
|
| 150 |
<tr> |
| 151 |
<th scope="row"> |
| 152 |
<a target="_blank" href="https://www.alexa.com/pro/subscription"><?php esc_html_e('Alexa Verification ID', 'catch-web-tools') ?></a> |
| 153 |
</th> |
| 154 |
<td> |
| 155 |
<?php |
| 156 |
$text = (! empty($settings['alexaVerifyID'])) ? $settings['alexaVerifyID'] : ''; |
| 157 |
echo '<input type="text" size="80" name="catchwebtools_webmaster[alexaVerifyID]" value="' . esc_attr($text) . '" /><span>' . esc_html__('Enter your Alexa ID only', 'catch-web-tools') . '</span>'; |
| 158 |
?> |
| 159 |
</td> |
| 160 |
</tr> |
| 161 |
|
| 162 |
<tr> |
| 163 |
<th scope="row"> |
| 164 |
<a target="_blank" href="https://help.pinterest.com/en/articles/confirm-your-website"><?php esc_html_e('Pinterest Site Verification', 'catch-web-tools') ?></a> |
| 165 |
</th> |
| 166 |
<td> |
| 167 |
<?php |
| 168 |
$text = (! empty($settings['p:domain_verify'])) ? $settings['p:domain_verify'] : ''; |
| 169 |
echo '<input type="text" size="80" name="catchwebtools_webmaster[p:domain_verify]" value="' . esc_attr($text) . '" /><span>' . esc_html__('Enter your Pinterest Site Verification ID only', 'catch-web-tools') . '</span>'; |
| 170 |
?> |
| 171 |
</td> |
| 172 |
</tr> |
| 173 |
|
| 174 |
<tr> |
| 175 |
<th scope="row"> |
| 176 |
<a target="_blank" href="https://help.yandex.com/webmaster/service/rights.xml#how-to"><?php esc_html_e('Yandex Webmaster Tools', 'catch-web-tools') ?></a> |
| 177 |
</th> |
| 178 |
<td> |
| 179 |
<?php |
| 180 |
$text = (! empty($settings['yandexverify'])) ? $settings['yandexverify'] : ''; |
| 181 |
echo '<input type="text" size="80" name="catchwebtools_webmaster[yandexverify]" value="' . esc_attr($text) . '" /><span>' . esc_html__('Enter your Yandex Verification ID only', 'catch-web-tools') . '</span>'; |
| 182 |
?> |
| 183 |
</td> |
| 184 |
</tr> |
| 185 |
</tbody> |
| 186 |
</table> |
| 187 |
|
| 188 |
<?php submit_button(esc_html__('Save Changes', 'catch-web-tools')); ?> |
| 189 |
</div> |
| 190 |
</div> |
| 191 |
</form> |
| 192 |
</div><!-- .content --> |
| 193 |
</div><!-- .content-wrapper --> |
| 194 |
</div><!-- #customcss --> |
| 195 |
|
| 196 |
<?php include('main-footer.php'); ?> |