diff options
| author | danix <danix@danix.xyz> | 2020-11-04 15:35:56 +0100 |
|---|---|---|
| committer | danix <danix@danix.xyz> | 2020-11-04 15:35:56 +0100 |
| commit | 244ec72c6d7d554518ff89598cb999d39614af0d (patch) | |
| tree | 6c3a6a49b539563a97e678cc4c962f184990ded7 /include/dnxcf_helper.php | |
| parent | 8c3e9b00bbeb0a3493d5b0e9b6cc4c68d413a4b0 (diff) | |
| download | danixland-contact-form-244ec72c6d7d554518ff89598cb999d39614af0d.tar.gz danixland-contact-form-244ec72c6d7d554518ff89598cb999d39614af0d.zip | |
Removed Genericons. Added dnxcf-font which is a subset of fontawesome.
Removed every reference to gmaps. Added honeypot field. NEEDS TESTING!!
modificato: danixland-contact-form.php
modificato: include/dnxcf_helper.php
modificato: include/dnxcf_mail_template_danixland.php
modificato: include/dnxcf_options-display.php
modificato: include/dnxcf_options-register.php
modificato: include/dnxcf_settings.php
nuovo file: style/dnxcf-font.css
modificato: style/dnxcf_style.css
nuovo file: style/font/dnxcf.eot
nuovo file: style/font/dnxcf.svg
nuovo file: style/font/dnxcf.ttf
nuovo file: style/font/dnxcf.woff
nuovo file: style/font/dnxcf.woff2
eliminato: style/genericons/Genericons.eot
eliminato: style/genericons/Genericons.svg
eliminato: style/genericons/Genericons.ttf
eliminato: style/genericons/Genericons.woff
eliminato: style/genericons/genericons.css
Diffstat (limited to 'include/dnxcf_helper.php')
| -rw-r--r-- | include/dnxcf_helper.php | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/include/dnxcf_helper.php b/include/dnxcf_helper.php index d6b4aa0..50c3739 100644 --- a/include/dnxcf_helper.php +++ b/include/dnxcf_helper.php @@ -1,5 +1,5 @@ <?php -defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); +defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); // generate a unique code, allows for lenght parameter if ( ! function_exists( 'dnxcf_get_unique_code' ) ) { @@ -15,32 +15,6 @@ if ( ! function_exists( 'dnxcf_get_unique_code' ) ) { } } -// add button in edit pages to help include our form -function dnxcf_show_form_button() { - $currentScreen = get_current_screen(); - if ( $currentScreen->parent_base == 'edit' ) { - echo '<button type="button" id="dnxcf-contact-form" class="button" onclick="dnxcf_send_code()"><span class="dashicons dashicons-testimonial"></span> ' . __( 'Add Contact Form', 'dnxcf' ) . '</button>'; - } -} -add_action( 'media_buttons', 'dnxcf_show_form_button', 11 ); - -// the actual function that outputs our shortcode once the button is pressed -function dnxcf_insert_shortcode() { - $currentScreen = get_current_screen(); - if ( $currentScreen->parent_base != 'edit' ) { - return; - } ?> -<script> - function dnxcf_send_code() { - //Send the shortcode to the editor - window.send_to_editor("[dnx_contactform]"); - } -</script> - <?php -} -add_action( 'admin_footer', 'dnxcf_insert_shortcode' ); - - // set default options for the plugin function dnxcf_set_options() { $defaults = array( @@ -60,10 +34,6 @@ function dnxcf_set_options() { // 2 = text/html 'dnxcf_content_type' => '1', 'dnxcf_privacy' => '', - 'dnxcf_latitude' => '38.2704', - 'dnxcf_longitude' => '16.2971', - 'dnxcf_apikey' => '', - 'dnxcf_gmap_message' => '', 'dnxcf_DB_VERSION' => '2', ); return $defaults; @@ -106,10 +76,13 @@ function dnxcf_db_check() { } // helper function that sets the current DB Version for comparison +/* + * Latest DB version: 5 +*/ function dnxcf_set_db_version() { // Define plugin database version. This should only change when new settings are added. if ( ! defined( 'DNXCF_CURRENT_DB_VERSION' ) ) { - define( 'DNXCF_CURRENT_DB_VERSION', 4 ); + define( 'DNXCF_CURRENT_DB_VERSION', 5 ); } } @@ -144,6 +117,9 @@ if ( dnxcf_update_from_email() ) { add_filter( 'wp_mail_from', 'dnxcf_update_from_email' ); } +/* + * Set the content type for the email +*/ function dnxcf_update_content_type() { global $dnxcf_options; $dnxcf_options = get_option( 'dnxcf_options' ); |
