email working - remove clients - preview polish
This commit is contained in:
1 parent
2b1424d127
commit
da83beaec3
19 files changed
+1342
-1060
No files matched your search
@@ -90,7 +90,6 @@ class HSSM_Admin {
|
||||
register_setting( 'hssm_settings', 'hssm_plugin_mode' );
|
||||
register_setting( 'hssm_settings', 'hssm_api_url' );
|
||||
register_setting( 'hssm_settings', 'hssm_client_site_slug' );
|
||||
register_setting( 'hssm_settings', 'hssm_notification_emails' );
|
||||
register_setting( 'hssm_settings', 'hssm_cache_duration' );
|
||||
register_setting( 'hssm_settings', 'hssm_api_keys' );
|
||||
register_setting( 'hssm_settings', 'hssm_client_api_key' );
|
||||
@@ -158,14 +157,6 @@ class HSSM_Admin {
|
||||
'hssm_general'
|
||||
);
|
||||
|
||||
add_settings_field(
|
||||
'hssm_notification_emails',
|
||||
__( 'Notification Recipients', 'hi-school-slide-manager' ),
|
||||
array( $this, 'notification_emails_field' ),
|
||||
'hssm-settings',
|
||||
'hssm_notifications'
|
||||
);
|
||||
|
||||
add_settings_field(
|
||||
'hssm_api_keys',
|
||||
__( 'API Keys', 'hi-school-slide-manager' ),
|
||||
@@ -312,10 +303,6 @@ Headers: X-HSSM-API-Key: your-api-key</code></pre>
|
||||
"name": "Hi-School Pharmacy"
|
||||
}
|
||||
],
|
||||
"client": {
|
||||
"slug": "client-name",
|
||||
"name": "Client Name"
|
||||
},
|
||||
"status": "publish",
|
||||
"created": "2025-01-01 12:00:00",
|
||||
"modified": "2025-01-01 12:00:00"
|
||||
@@ -415,12 +402,6 @@ Headers: X-HSSM-API-Key: your-api-key</code></pre>
|
||||
if ( isset( $_POST['hssm_cache_duration'] ) ) {
|
||||
update_option( 'hssm_cache_duration', absint( $_POST['hssm_cache_duration'] ) );
|
||||
}
|
||||
if ( isset( $_POST['hssm_notification_emails'] ) ) {
|
||||
$emails = explode( "\n", str_replace( "\r", "", $_POST['hssm_notification_emails'] ) );
|
||||
$emails = array_map( 'sanitize_email', $emails );
|
||||
$emails = array_filter( $emails );
|
||||
update_option( 'hssm_notification_emails', $emails );
|
||||
}
|
||||
add_settings_error( 'hssm_settings', 'settings_saved', __( 'Settings saved successfully.', 'hi-school-slide-manager' ), 'success' );
|
||||
}
|
||||
|
||||
@@ -456,7 +437,11 @@ Headers: X-HSSM-API-Key: your-api-key</code></pre>
|
||||
* Notifications section callback
|
||||
*/
|
||||
public function notifications_section_callback() {
|
||||
echo '<p>' . __( 'Configure email notifications for new slides.', 'hi-school-slide-manager' ) . '</p>';
|
||||
$dashboard_url = hssm_get_page_url_by_template( 'page-slide-dashboard.php', '/slide-dashboard/' );
|
||||
echo '<p>' . esc_html__( 'Email recipients are managed on the Slide Dashboard Notifications tab.', 'hi-school-slide-manager' ) . '</p>';
|
||||
if ( $dashboard_url ) {
|
||||
echo '<p><a href="' . esc_url( $dashboard_url ) . '">' . esc_html__( 'Open Slide Dashboard', 'hi-school-slide-manager' ) . '</a></p>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -526,15 +511,6 @@ Headers: X-HSSM-API-Key: your-api-key</code></pre>
|
||||
echo '<span class="description">' . __( 'Recommended cache duration for API responses (seconds)', 'hi-school-slide-manager' ) . '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification emails field
|
||||
*/
|
||||
public function notification_emails_field() {
|
||||
$emails = get_option( 'hssm_notification_emails', array() );
|
||||
echo '<textarea name="hssm_notification_emails" rows="5" class="regular-text">' . esc_textarea( implode( "\n", $emails ) ) . '</textarea><br>';
|
||||
echo '<span class="description">' . __( 'Enter email addresses (one per line) to receive notifications when new slides are published.', 'hi-school-slide-manager' ) . '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* API keys field
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user