-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcredentials_validation_script.php
More file actions
47 lines (43 loc) · 1.33 KB
/
credentials_validation_script.php
File metadata and controls
47 lines (43 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* SMO Social API Credentials Validation Script
* Run this to validate all API credentials are configured
*/
function smo_validate_credentials() {
$results = [];
$required_options = [
'smo_canva_client_id',
'smo_canva_client_secret',
'smo_unsplash_access_token',
'smo_pixabay_api_key',
'smo_dropbox_app_key',
'smo_dropbox_app_secret',
'smo_google_client_id',
'smo_google_client_secret',
'smo_google_client_id',
'smo_google_client_secret',
'smo_onedrive_client_id',
'smo_onedrive_client_secret',
'smo_zapier_webhook_secret',
'smo_ifttt_webhook_secret',
'smo_feedly_client_id',
'smo_feedly_client_secret',
'smo_pocket_consumer_key',
];
foreach ($required_options as $option) {
$value = get_option($option);
$results[$option] = [
'configured' => !empty($value),
'value' => $value ? 'Set' : 'Not Set'
];
}
return $results;
}
// Run validation
$validation = smo_validate_credentials();
echo "SMO Social API Credentials Validation Results:\n";
echo "=========================================\n";
foreach ($validation as $option => $status) {
$icon = $status['configured'] ? '✅' : '❌';
echo "$icon $option: {$status['value']}\n";
}