Plugin Directory

Changeset 1149870


Ignore:
Timestamp:
04/30/2015 07:01:10 AM (11 years ago)
Author:
frankenstein-uk
Message:

1.1.3 release

Location:
nm-contact-forms
Files:
17 added
3 edited

Legend:

Unmodified
Added
Removed
  • nm-contact-forms/trunk/admin/settings.php

    r1141054 r1149870  
    88    <h2>NM contact forms - Settings</h2>
    99   
    10     <?php if($_GET['settings-updated'] == 'true'){?>
     10    <?php if(isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true'){?>
    1111    <div class="updated">
    1212        <p>All forms has been saved.</p>
     
    117117                    <fieldset>
    118118                    <legend class="screen-reader-text"><span>Enabled</span></legend><label for="users_can_register">
    119                     <input name="nm_f_s[hide_donation]" type="checkbox" <?php if($nm_form_s['hide_donation'] == 'on'){?>checked<?php }?>>
     119                    <input name="nm_f_s[hide_donation]" type="checkbox" <?php if(isset($nm_form_s['hide_donation'])){?>checked<?php }?>>
    120120                    Hide (Thanks if you have donated)</label>
    121121                    </fieldset>
  • nm-contact-forms/trunk/index.php

    r1141054 r1149870  
    44 * Plugin URI: http://nutmedia.co.uk/nm-contact-forms
    55 * Description: This plugin has built in honeyPot and reChaptcha anti spam solutions. Supports GET variables (allows to pass GET variable info to the form). Option to turn off default CSS, add extra classes. User friendly UI, drag and drop sorting.
    6  * Version: 1.1.2
     6 * Version: 1.1.3
    77 * Author: Aidas Keburys @ Nutmedia
    88 * Author URI: http://nutmedia.co.uk
     
    3939        }
    4040       
    41         add_action('init', array($this,'front_head'));
    4241        add_action( 'admin_init', array($this,'nm_forms_init') );
    4342        add_shortcode( 'nm_forms', array($this,'nm_forms_shortcode') );
     
    138137       
    139138    function nm_forms_shortcode( $atts ) {
     139       
     140        $nm_form_s = get_option( 'nm_f_s' );
     141       
     142        if(empty($nm_form_s['recaptcha_lang'])) $nm_form_s['recaptcha_lang'] = 'en';
     143        wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl='.$nm_form_s['recaptcha_lang'], array(), null, true );
     144   
     145        if($nm_form_s['default_css'] == 'on'){
     146            wp_enqueue_style( 'nm_forms-css', plugins_url('nm-contact-forms/css/front.css') );
     147        }
     148       
    140149        $params = shortcode_atts( array(
    141150            'id' => '',
     
    156165    function nm_donate(){
    157166    $nm_form_s = get_option( 'nm_f_s' );
    158     if($nm_form_s['hide_donation'] != 'on'){
     167    if(!isset($nm_form_s['hide_donation'])){
    159168    ?>
    160169   
     
    389398        foreach($nm_form['fields'] as $field){
    390399   
    391             if(!empty($field['get'])) $get_value = $this->xss_clean($_GET[$field['get']]);
     400   
     401            if(!empty($_GET[$field['get']])) $get_value = $this->xss_clean($_GET[$field['get']]);
    392402            else  $get_value = '';
    393403           
     
    554564    }
    555565   
    556     function front_head()
    557     {
    558                
    559         $nm_form_s = get_option( 'nm_f_s' );
    560        
    561         wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl='.$nm_form_s['recaptcha_lang'], array(), null, true );
    562    
    563         if($nm_form_s['default_css'] == 'on'){
    564             wp_enqueue_style( 'nm_forms-css', plugins_url('nm-contact-forms/css/front.css') );
    565         }
    566        
    567     }
    568    
    569566    function admin_head()
    570567    {
  • nm-contact-forms/trunk/readme.txt

    r1147812 r1149870  
    55Requires at least: 3.0.1
    66Tested up to: 4.2.1
    7 Stable tag: 1.1.2
     7Stable tag: 1.1.3
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    134134
    135135== Changelog ==
     136= 1.1.3 =
     137* Fixed php notices if debug mode enabled. Loading CSS and JS only when shortcode is used.
    136138= 1.1.2 =
    137139* Added setting for Google reCaptcha language
Note: See TracChangeset for help on using the changeset viewer.