PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.6.19
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.6.19
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
metasync / views / metasync-google-index-api-settings.php

metasync-google-index-api-settings.php in Search Atlas SEO – OTTO AI SEO Automation for WordPress 2.6.19, at views/metasync-google-index-api-settings.php

144 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * MetaSync - Google Index API Settings
5 *
6 * This view integrates Google Index API settings into MetaSync's general settings
7 *
8 * @package MetaSync
9 * @subpackage GoogleIndexDirect
10 * @version 1.0.0
11 */
12
13 // Prevent direct access
14 if (!defined('ABSPATH')) {
15 exit;
16 }
17
18 ?>
19
20 <div style="padding: 20px;">
21 <!-- Requirements (Collapsible) -->
22 <details style="margin-top: 20px; padding-top: 15px;">
23 <summary style="cursor: pointer; font-weight: 600; margin-bottom: 10px;">Requirements</summary>
24 <div style="margin-top: 10px;">
25 <ul style="margin-left: 20px;">
26 <li>Google Cloud Project with Indexing API enabled</li>
27 <li>Service Account with appropriate permissions</li>
28 <li>Domain verified in Google Search Console</li>
29 <li>Service account added as user in Search Console</li>
30 </ul>
31 </div>
32 </details>
33
34 <!-- Configuration Status -->
35 <div style="margin-bottom: 20px;">
36 <?php if ($is_configured): ?>
37 <div class="notice notice-success inline" style="margin: 0 0 15px 0; padding: 10px;">
38 <p style="margin: 0;">
39 <strong>Service Account Configured: </strong><br>
40 <strong>Email:</strong> <?php echo esc_html($service_info['client_email']); ?><br>
41 <strong>Project ID:</strong> <?php echo esc_html($service_info['project_id']); ?>
42 </p>
43 </div>
44 <?php else: ?>
45 <div class="notice notice-warning inline" style="margin: 0 0 15px 0; padding: 10px;">
46 <p style="margin: 0;">
47 <strong>Service Account Not Configured</strong><br>
48 Please provide your Google service account JSON below.
49 </p>
50 </div>
51 <?php endif; ?>
52 </div>
53
54 <!-- Settings Fields -->
55 <table class="form-table" style="margin-top: 0;">
56 <tr>
57 <th scope="row" style="width: 200px;">
58 <label for="google_index_service_account_json">Service Account JSON</label>
59 <?php Metasync::render_tooltip_icon('google_index_service_account_json', 'Paste the private key file from a Google Cloud service account added to your Search Console property. This lets the plugin ask Google to crawl your pages. Treat it like a password — it\'s stored on your server and never shared.'); ?>
60 </th>
61 <td>
62 <textarea name="google_index_service_account_json"
63 id="google_index_service_account_json"
64 class="large-text code"
65 rows="8"
66 placeholder="Paste your Google service account JSON here..."><?php
67 if ($is_configured && !empty($saved_json_display)) {
68 echo esc_textarea($saved_json_display);
69 }
70 ?></textarea>
71 <p class="description">
72 <strong>How to get this:</strong><br>
73 1. Go to <a href="https://console.cloud.google.com/apis/credentials" target="_blank">Google Cloud Console → Credentials</a><br>
74 2. Create or select a Service Account → Generate JSON key<br>
75 3. Paste the JSON content above or upload the file below
76 </p>
77 </td>
78 </tr>
79
80 <tr>
81 <th scope="row">
82 <label for="google_index_service_account_file">Upload JSON File</label>
83 </th>
84 <td>
85 <input type="file"
86 name="google_index_service_account_file"
87 id="google_index_service_account_file"
88 accept=".json"
89 class="regular-text" />
90 <p class="description">
91 Upload your service account JSON file. This will auto-populate the textarea above.
92 </p>
93 </td>
94 </tr>
95 </table>
96
97 <!-- Action Buttons and Test Results -->
98 <?php if ($is_configured): ?>
99 <div style="margin-top: 20px; padding-top: 15px; border-top: 1px solid #ddd;">
100 <button type="button"
101 id="google-index-test-connection"
102 class="button button-secondary">
103 <span class="dashicons dashicons-yes" style="margin-top:3px;font-size:15px;width:15px;height:15px;"></span> Test Connection
104 </button>
105
106 <button type="button"
107 id="google-index-clear-config"
108 class="button button-link-delete"
109 style="margin-left: 10px;">
110 <span class="dashicons dashicons-trash" style="margin-top:3px;font-size:15px;width:15px;height:15px;"></span> Clear Configuration
111 </button>
112
113 <div id="google-index-test-results" style="margin-top: 15px;"></div>
114 </div>
115 <?php endif; ?>
116
117 </div>
118
119 <style>
120 /* Additional styles for Google Index API section */
121 #google-index-test-results .notice {
122 margin-top: 10px;
123 }
124
125 #google-index-test-results ul {
126 margin-left: 20px;
127 }
128
129 .metasync-accordion-section details[open] summary {
130 margin-bottom: 15px;
131 }
132
133 .metasync-accordion-section pre {
134 font-size: 12px;
135 line-height: 1.4;
136 }
137
138 .metasync-accordion-section .notice.inline {
139 display: block;
140 }
141 </style>
142
143 <!-- File upload handling and unsaved changes integration is now handled by the admin JavaScript -->
144