Visual Form Builder - Version 2.8.6

Version Description

Update to allow translations to use the WP_LANG_DIR folder for language packs

Download this release

Release Info

Developer mmuro
Plugin Icon 128x128 Visual Form Builder
Version 2.8.6
Comparing to
See all releases

Code changes from version 2.8.5 to 2.8.6

Files changed (2) hide show
  1. readme.txt +8 -1
  2. visual-form-builder.php +24 -7
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9
4
  Tags: form, forms, contact form, contact forms, form, forms, form to email, email form, email, input, validation, jquery, shortcode, form builder, contact form builder, form manager, form creator
5
  Requires at least: 3.5
6
  Tested up to: 4.3
7
- Stable tag: 2.8.5
8
  License: GPLv2 or later
9
 
10
  Build beautiful, fully functional contact forms in only a few minutes without writing PHP, CSS, or HTML.
@@ -237,6 +237,10 @@ function my_scripts_method() {
237
 
238
  == Changelog ==
239
 
 
 
 
 
240
  **Version 2.8.5 - Sep 09, 2015**
241
 
242
  * Better secure entry detail page against XSS vulnerability
@@ -669,6 +673,9 @@ function my_scripts_method() {
669
 
670
  == Upgrade Notice ==
671
 
 
 
 
672
  = 2.8.5 =
673
  Better secure entry detail page against XSS vulnerability
674
 
4
  Tags: form, forms, contact form, contact forms, form, forms, form to email, email form, email, input, validation, jquery, shortcode, form builder, contact form builder, form manager, form creator
5
  Requires at least: 3.5
6
  Tested up to: 4.3
7
+ Stable tag: 2.8.6
8
  License: GPLv2 or later
9
 
10
  Build beautiful, fully functional contact forms in only a few minutes without writing PHP, CSS, or HTML.
237
 
238
  == Changelog ==
239
 
240
+ **Version 2.8.6 - Sep 21, 2015**
241
+
242
+ * Update to allow translations to use the WP_LANG_DIR folder for language packs
243
+
244
  **Version 2.8.5 - Sep 09, 2015**
245
 
246
  * Better secure entry detail page against XSS vulnerability
673
 
674
  == Upgrade Notice ==
675
 
676
+ = 2.8.6 =
677
+ Update to allow translations to use the WP_LANG_DIR folder for language packs
678
+
679
  = 2.8.5 =
680
  Better secure entry detail page against XSS vulnerability
681
 
visual-form-builder.php CHANGED
@@ -1,14 +1,17 @@
1
  <?php
2
  /*
3
- Plugin Name: Visual Form Builder
4
- Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
5
- Author: Matthew Muro
6
- Author URI: http://matthewmuro.com
7
- Version: 2.8.5
 
 
 
8
  */
9
 
10
  // Version number to output as meta tag
11
- define( 'VFB_VERSION', '2.8.5' );
12
 
13
  /*
14
  This program is free software; you can redistribute it and/or modify
@@ -224,7 +227,21 @@ class Visual_Form_Builder{
224
  * @since 2.7
225
  */
226
  public function languages() {
227
- load_plugin_textdomain( 'visual-form-builder', false , 'visual-form-builder/languages' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  }
229
 
230
  /**
1
  <?php
2
  /*
3
+ Plugin Name: Visual Form Builder
4
+ Plugin URI: https://wordpress.org/plugins/visual-form-builder/
5
+ Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
6
+ Version: 2.8.6
7
+ Author: Matthew Muro
8
+ Author URI: http://matthewmuro.com
9
+ Text Domain: visual-form-builder
10
+ Domain Path: /languages/
11
  */
12
 
13
  // Version number to output as meta tag
14
+ define( 'VFB_VERSION', '2.8.6' );
15
 
16
  /*
17
  This program is free software; you can redistribute it and/or modify
227
  * @since 2.7
228
  */
229
  public function languages() {
230
+ $domain = 'visual-form-builder';
231
+
232
+ // The "plugin_locale" filter is also used in load_plugin_textdomain()
233
+ $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
234
+
235
+ $wp_lang_dir = WP_LANG_DIR . '/' . $domain . '/' . $locale . '.mo';
236
+
237
+ // Load translated strings from WP_LANG_DIR
238
+ load_textdomain( $domain, $wp_lang_dir );
239
+
240
+ // Lang folder path
241
+ $lang_dir = dirname( plugin_basename( __FILE__ ) ) . '/languages/';
242
+
243
+ // Load translated strings, if no WP_LANG_DIR found
244
+ load_plugin_textdomain( $domain, false, $lang_dir );
245
  }
246
 
247
  /**