X-Git-Url: https://git.danix.xyz/?p=danixland-contact-form.git;a=blobdiff_plain;f=include%2Fdnxcf_helper.php;h=50c37398a083423cd479153f62f55051ec699df4;hp=d6b4aa0ea7f6893d796a48d0b525b42756352bf0;hb=244ec72c6d7d554518ff89598cb999d39614af0d;hpb=8c3e9b00bbeb0a3493d5b0e9b6cc4c68d413a4b0 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 @@ parent_base == 'edit' ) { - echo ''; - } -} -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; - } ?> - - '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' );