Version Description
( June 20th, 2019 ) = * Issue with form input placeholders
Download this release
Release Info
Developer | FancyThemes |
Plugin | Optin Forms |
Version | 1.2.9.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.9.4 to 1.2.9.5
- js/placeholder.js +0 -104
- optin-forms.php +3 -3
- readme.txt +4 -1
js/placeholder.js
CHANGED
@@ -1,107 +1,3 @@
|
|
1 |
-
// Stick Placeholders jQuery Plugin
|
2 |
-
(function($) {
|
3 |
-
var alterParent = function(options, event) {
|
4 |
-
var label = $(this).data('label');
|
5 |
-
|
6 |
-
if (event && event.type === 'focusin') {
|
7 |
-
label.css('opacity', options.placeholderFocusOpacity);
|
8 |
-
} else if (event && event.type === 'focusout') {
|
9 |
-
label.css('opacity', options.placeholderOpacity);
|
10 |
-
}
|
11 |
-
|
12 |
-
if (event && event.type !== 'keydown') {
|
13 |
-
toggleLabel(this, label);
|
14 |
-
} else {
|
15 |
-
// Use timeout to catch val() just after the key is pressed
|
16 |
-
// Using keyup is too slow.
|
17 |
-
(function(input) {
|
18 |
-
setTimeout(function() {
|
19 |
-
toggleLabel(input, label);
|
20 |
-
}, 0);
|
21 |
-
})(this);
|
22 |
-
}
|
23 |
-
};
|
24 |
-
|
25 |
-
var toggleLabel = function(input, label) {
|
26 |
-
if ($(input).val()) {
|
27 |
-
label.hide();
|
28 |
-
} else {
|
29 |
-
label.show();
|
30 |
-
}
|
31 |
-
};
|
32 |
-
|
33 |
-
$.fn.stickyPlaceholders = function(options) {
|
34 |
-
var defaults = {
|
35 |
-
wrapperClass: 'sticky-placeholder-wrapper',
|
36 |
-
wrapperDisplay: 'block',
|
37 |
-
labelClass: 'sticky-placeholder-label',
|
38 |
-
placeholderAttr: 'placeholder',
|
39 |
-
dataAttr: 'data-sticky-placeholder',
|
40 |
-
placeholderColor: '#000',
|
41 |
-
placeholderOpacity: 0.5,
|
42 |
-
placeholderFocusOpacity: 0.25
|
43 |
-
};
|
44 |
-
options = $.extend(defaults, options);
|
45 |
-
|
46 |
-
return this.each(function() {
|
47 |
-
var input = $(this),
|
48 |
-
placeholder = input.attr(options.placeholderAttr),
|
49 |
-
wrapper = $(this).wrap('<span class="' + options.wrapperClass + '" />').parent().css({'position':'relative', 'display':options.wrapperDisplay}),
|
50 |
-
label = $('<label class="' + options.labelClass + '" for="' + input.attr('id') + '">' + placeholder + '</label>').appendTo(wrapper),
|
51 |
-
labelStyle;
|
52 |
-
|
53 |
-
// store a reference to each input's label
|
54 |
-
input.data('label', label);
|
55 |
-
|
56 |
-
// remove the placeholder attribute to avoid conflcits
|
57 |
-
input.removeAttr('placeholder');
|
58 |
-
|
59 |
-
// If the dataAttr is set and it's not equal to the placeholderAttr
|
60 |
-
if ( options.dataAttr && options.placeholderAttr !== options.dataAttr ) {
|
61 |
-
input.attr('data-sticky-placeholder', placeholder);
|
62 |
-
}
|
63 |
-
|
64 |
-
labelStyle = {
|
65 |
-
'color': options.placeholderColor,
|
66 |
-
'cursor': 'text',
|
67 |
-
'font-family': input.css('font-family'),
|
68 |
-
'font-weight': input.css('font-weight'),
|
69 |
-
'font-size': input.css('font-size'),
|
70 |
-
'left': parseInt(input.css('border-left-width'), 10) + parseInt(input.css('margin-left'), 10),
|
71 |
-
'line-height': this.currentStyle ? this.currentStyle.lineHeight : input.css('line-height'),
|
72 |
-
// fix for an IE/jQuery bug returning 1px when the line-height doesn't have a unit: http://bugs.jquery.com/ticket/2671
|
73 |
-
'opacity': options.placeholderOpacity,
|
74 |
-
'padding-left': input.css('padding-left'),
|
75 |
-
'padding-top': input.css('padding-top'),
|
76 |
-
'position': 'absolute',
|
77 |
-
'text-transform': input.css('text-transform'),
|
78 |
-
'top': parseInt(input.css('border-top-width'), 10) + parseInt(input.css('margin-top'), 10)
|
79 |
-
};
|
80 |
-
label.css(labelStyle);
|
81 |
-
|
82 |
-
// hide the placeholder if the input already has a value
|
83 |
-
if (input.val()) {
|
84 |
-
label.hide();
|
85 |
-
}
|
86 |
-
|
87 |
-
$(this).bind('keydown input focusin focusout', function(event) {
|
88 |
-
alterParent.call(this, options, event);
|
89 |
-
});
|
90 |
-
|
91 |
-
// prevent click/dblclick from selecting the label text
|
92 |
-
label.bind('mousedown', function(e) {
|
93 |
-
e.preventDefault();
|
94 |
-
});
|
95 |
-
|
96 |
-
// call alterParent initially without an event to set up the wrapper elements
|
97 |
-
alterParent.call(this, options);
|
98 |
-
});
|
99 |
-
};
|
100 |
-
})(jQuery);
|
101 |
-
|
102 |
-
// call the plugin
|
103 |
-
jQuery("[placeholder]").stickyPlaceholders();
|
104 |
-
|
105 |
jQuery(document).ready(function($){
|
106 |
|
107 |
$('input[name="OF_NAME"][id*="optinforms"]').each(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
$('input[name="OF_NAME"][id*="optinforms"]').each(function(){
|
optin-forms.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Optin Forms
|
|
4 |
Plugin URI: http://fancythemes.com/plugins/optin-forms/
|
5 |
Description: Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
|
6 |
Author: FancyThemes
|
7 |
-
Version: 1.2.9.
|
8 |
Author URI: http://www.fancythemes.com
|
9 |
Text Domain: optin-forms
|
10 |
Domain Path: /languages/
|
@@ -116,8 +116,8 @@ class Optin_Forms {
|
|
116 |
*/
|
117 |
public function optinforms_scripts() {
|
118 |
wp_enqueue_script('jquery');
|
119 |
-
wp_enqueue_style('optinforms-stylesheet', plugins_url('/css/optinforms.css', __FILE__ ), array(), '1.2.9.
|
120 |
-
wp_enqueue_script('placeholder', plugins_url('/js/placeholder.js', __FILE__ ), array(), '1.2.9.
|
121 |
if ( optinforms_used_fonts() !== '//fonts.googleapis.com/css?family=' ) {
|
122 |
wp_enqueue_style('optinforms-googleFont', optinforms_used_fonts());
|
123 |
}
|
4 |
Plugin URI: http://fancythemes.com/plugins/optin-forms/
|
5 |
Description: Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
|
6 |
Author: FancyThemes
|
7 |
+
Version: 1.2.9.5
|
8 |
Author URI: http://www.fancythemes.com
|
9 |
Text Domain: optin-forms
|
10 |
Domain Path: /languages/
|
116 |
*/
|
117 |
public function optinforms_scripts() {
|
118 |
wp_enqueue_script('jquery');
|
119 |
+
wp_enqueue_style('optinforms-stylesheet', plugins_url('/css/optinforms.css', __FILE__ ), array(), '1.2.9.5' );
|
120 |
+
wp_enqueue_script('placeholder', plugins_url('/js/placeholder.js', __FILE__ ), array(), '1.2.9.5');
|
121 |
if ( optinforms_used_fonts() !== '//fonts.googleapis.com/css?family=' ) {
|
122 |
wp_enqueue_style('optinforms-googleFont', optinforms_used_fonts());
|
123 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wpkube, FancyThemes
|
|
3 |
Tags: optin, form, forms, aweber, email subscriber, icontact, mailchimp, getresponse, mad mimi, newsletter, mailchimp forms, mailchimp integrations, mailchimp plugin, getresponse forms, subscribe, aweber forms, after post optin form, after post optin form plugin, lead generation, mobile optin forms, mobile optins, sidebar form, sidebar optin form, wordpress after post optin form, wordpress lead generation, wordpress popups, optin locker, social locker, enter email to download, interspire, email marketer, email marketing, email, e-mail, list, list building, opt-in, newsletter, email list, autoresponder, popup, pop-up, mailing, mailing list, mail, webform, newsletter plugin, optin plugin, opt-in plugin, conversion, design, convertkit, convert, kit
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 1.2.9.
|
7 |
|
8 |
Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
|
9 |
|
@@ -59,6 +59,9 @@ Having trouble with the plugin? Simply post your question to the [support forum]
|
|
59 |
3. Add your form to your website with a simple mouse-click.
|
60 |
|
61 |
== Changelog ==
|
|
|
|
|
|
|
62 |
= 1.2.9.4 ( May 29th, 2019 ) =
|
63 |
* Fix for MailerLite forms when name field is disabled
|
64 |
|
3 |
Tags: optin, form, forms, aweber, email subscriber, icontact, mailchimp, getresponse, mad mimi, newsletter, mailchimp forms, mailchimp integrations, mailchimp plugin, getresponse forms, subscribe, aweber forms, after post optin form, after post optin form plugin, lead generation, mobile optin forms, mobile optins, sidebar form, sidebar optin form, wordpress after post optin form, wordpress lead generation, wordpress popups, optin locker, social locker, enter email to download, interspire, email marketer, email marketing, email, e-mail, list, list building, opt-in, newsletter, email list, autoresponder, popup, pop-up, mailing, mailing list, mail, webform, newsletter plugin, optin plugin, opt-in plugin, conversion, design, convertkit, convert, kit
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 1.2.9.5
|
7 |
|
8 |
Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.
|
9 |
|
59 |
3. Add your form to your website with a simple mouse-click.
|
60 |
|
61 |
== Changelog ==
|
62 |
+
= 1.2.9.5 ( June 20th, 2019 ) =
|
63 |
+
* Issue with form input placeholders
|
64 |
+
|
65 |
= 1.2.9.4 ( May 29th, 2019 ) =
|
66 |
* Fix for MailerLite forms when name field is disabled
|
67 |
|