From 1273f89d59edaeee2c89baa8cbc3ef8a8afe9256 Mon Sep 17 00:00:00 2001 From: Harald Milz Date: Mon, 1 Apr 2019 15:59:09 +0200 Subject: [PATCH] version 0.2.0 redactions and cleanups --- gcal-import-admin.php | 103 ++---------------------------------------- 1 file changed, 3 insertions(+), 100 deletions(-) diff --git a/gcal-import-admin.php b/gcal-import-admin.php index 1ea9292..5866328 100644 --- a/gcal-import-admin.php +++ b/gcal-import-admin.php @@ -145,8 +145,7 @@ function gcal_geocoding_setting_string() { } echo '
' ; - } - + } } @@ -154,6 +153,8 @@ function gcal_geocoding_setting_string() { function gcal_options_validate($input) { return $input; +// TODO + /* $newinput['text_string'] = trim($input['text_string']); if(!preg_match('/^[a-z0-9]{32}$/i', $newinput['text_string'])) { @@ -163,103 +164,5 @@ function gcal_options_validate($input) { */ } -/* -
-

- -

Terminkategorien und ICS-Feeds

-

Bitte hier die zu den Terminkategorien gehörigen Feeds eintragen (copy & paste!).

-

Wenn zu einer Kategorie kein Feed gehört, einfach leer lassen.

-

Feeds lassen sich jederzeit aktivieren oder deaktivieren, ohne andere Einstellungen zu ändern.

-
- - - - get_results( "SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'termine_type'" ); - foreach ( $term_ids as $tax ) { - $names = $wpdb->get_results( "SELECT name FROM wp_terms WHERE term_id = $tax->term_id ORDER BY name ASC" ); - foreach ( $names as $term ) { - $table = $wpdb->prefix.GCAL_TABLE; - $r = $wpdb->get_results( "SELECT gcal_link, gcal_active FROM $table WHERE gcal_category = '$term->name'", ARRAY_A ); - $link = $r[0]['gcal_link']; - $checked = ( $r[0]['gcal_active'] == '1' ? 'checked' : '' ); - $active = "$term->name" . '_active'; - echo " "; - echo " "; - echo " "; - echo " "; - echo "" . PHP_EOL; - } - } - ?> - -
Terminkategorie ICS-Feed https://... Aktiv
$term->name
- -

Timing und Geocoding

- - - - "; - $geocoding = get_option( '_gcal_geocoding' ); - $apikey = get_option( '_gcal_apikey' ); - // TODO: die Eingabe Api Key bei Geocoding Google official muss validiert werden! -> Empfängerseite. - echo "" . PHP_EOL; - echo "
Zeitintervall Minuten
Geocoding "; - $options = array( - array( - 'option' => 'off', - 'name' => 'deaktiviert', - ), - array( - 'option' => 'official', - 'name' => 'Google official', - ), - array( - 'option' => 'inofficial', - 'name' => 'Google inofficial', - ), - array( - 'option' => 'osm', - 'name' => 'OpenStreetMap (in Entwicklung)', - ), - ); - - foreach ( $options as $option ) { - $checked = ( $geocoding == $option['option'] ? 'checked' : '' ); - $opt = $option['option']; - $name = $option['name']; - echo "
" . PHP_EOL; - echo ""; - echo ""; - // apikey text area - if ( 'official' == $opt ) { - echo " "; - } - echo "
" . PHP_EOL; - } - echo "
" . PHP_EOL; - wp_nonce_field( 'gcal_import_opts', 'gcal_import_nonce' ); - echo "" . PHP_EOL; - ?> - - -
-
- -