Version Description
- New feature: HTML anchor on form block.
- Bugfix: Dropdown item font size doesn't match form style setting.
- Bugfix: Form width preview not updating.
Download this release
Release Info
Developer | happyforms |
Plugin | Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms |
Version | 1.13.1 |
Comparing to | |
See all releases |
Code changes from version 1.13.0 to 1.13.1
- core/assets/css/color.css +2 -0
- core/assets/js/admin/block.js +1 -0
- core/classes/class-block.php +10 -0
- core/classes/parts/class-part-checkbox.php +1 -1
- core/classes/parts/class-part-radio.php +1 -1
- core/classes/parts/class-part-select.php +1 -1
- happyforms.php +11 -2
- inc/assets/css/admin.css +20 -0
- inc/assets/js/customize.js +1 -1
- inc/classes/class-happyforms.php +15 -0
- inc/classes/class-message-admin.php +101 -0
- inc/classes/class-message-controller.php +46 -69
- inc/templates/admin/modal-dummy-activity.php +21 -0
- languages/happyforms.pot +68 -22
- readme.txt +9 -1
core/assets/css/color.css
CHANGED
@@ -780,6 +780,8 @@
|
|
780 |
color: var(--happyforms-color-dropdown-item-text);
|
781 |
background-color: #fff;
|
782 |
background-color: var(--happyforms-color-dropdown-item-bg);
|
|
|
|
|
783 |
}
|
784 |
.happyforms-styles .happyforms-custom-select-dropdown li.happyforms-custom-select-dropdown__placeholder {
|
785 |
color: #888888;
|
780 |
color: var(--happyforms-color-dropdown-item-text);
|
781 |
background-color: #fff;
|
782 |
background-color: var(--happyforms-color-dropdown-item-bg);
|
783 |
+
font-size: 16px;
|
784 |
+
font-size: var(--happyforms-part-value-font-size);
|
785 |
}
|
786 |
.happyforms-styles .happyforms-custom-select-dropdown li.happyforms-custom-select-dropdown__placeholder {
|
787 |
color: #888888;
|
core/assets/js/admin/block.js
CHANGED
@@ -77,6 +77,7 @@
|
|
77 |
icon: settings.block.icon,
|
78 |
keywords: settings.block.keywords,
|
79 |
supports: {
|
|
|
80 |
html: false
|
81 |
},
|
82 |
|
77 |
icon: settings.block.icon,
|
78 |
keywords: settings.block.keywords,
|
79 |
supports: {
|
80 |
+
anchor: true,
|
81 |
html: false
|
82 |
},
|
83 |
|
core/classes/class-block.php
CHANGED
@@ -38,6 +38,9 @@ class HappyForms_Block {
|
|
38 |
$attributes = array(
|
39 |
'id' => array(
|
40 |
'type' => 'string',
|
|
|
|
|
|
|
41 |
)
|
42 |
);
|
43 |
|
@@ -68,6 +71,7 @@ class HappyForms_Block {
|
|
68 |
|
69 |
public function render( $attrs ) {
|
70 |
$block_classes = isset( $attrs['className'] ) ? trim( $attrs['className'] ) : '';
|
|
|
71 |
|
72 |
if ( '' !== $block_classes ) {
|
73 |
$block_classes = explode( ' ', $block_classes );
|
@@ -78,6 +82,12 @@ class HappyForms_Block {
|
|
78 |
}, 10, 2 );
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
return HappyForms()->handle_shortcode( $attrs );
|
82 |
}
|
83 |
|
38 |
$attributes = array(
|
39 |
'id' => array(
|
40 |
'type' => 'string',
|
41 |
+
),
|
42 |
+
'anchor' => array(
|
43 |
+
'type' => 'string',
|
44 |
)
|
45 |
);
|
46 |
|
71 |
|
72 |
public function render( $attrs ) {
|
73 |
$block_classes = isset( $attrs['className'] ) ? trim( $attrs['className'] ) : '';
|
74 |
+
$html_id = isset( $attrs['anchor'] ) ? trim( $attrs['anchor'] ) : '';
|
75 |
|
76 |
if ( '' !== $block_classes ) {
|
77 |
$block_classes = explode( ' ', $block_classes );
|
82 |
}, 10, 2 );
|
83 |
}
|
84 |
|
85 |
+
if ( '' !== $html_id ) {
|
86 |
+
add_filter( 'happyforms_form_id', function( $id ) use ( $html_id ) {
|
87 |
+
return $html_id;
|
88 |
+
}, 10, 2 );
|
89 |
+
}
|
90 |
+
|
91 |
return HappyForms()->handle_shortcode( $attrs );
|
92 |
}
|
93 |
|
core/classes/parts/class-part-checkbox.php
CHANGED
@@ -436,7 +436,7 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
436 |
foreach( $part['options'] as $o => $option ) {
|
437 |
$option = wp_parse_args( $option, happyforms_upgrade_get_option_limiter()->get_option_fields() );
|
438 |
|
439 |
-
if ( ! $option['limit_submissions'] || $o !== intval( $value ) ) {
|
440 |
continue;
|
441 |
}
|
442 |
|
436 |
foreach( $part['options'] as $o => $option ) {
|
437 |
$option = wp_parse_args( $option, happyforms_upgrade_get_option_limiter()->get_option_fields() );
|
438 |
|
439 |
+
if ( ! $option['limit_submissions'] || $o !== intval( $value ) || $value !== $o ) {
|
440 |
continue;
|
441 |
}
|
442 |
|
core/classes/parts/class-part-radio.php
CHANGED
@@ -259,7 +259,7 @@ class HappyForms_Part_Radio extends HappyForms_Form_Part {
|
|
259 |
foreach( $part['options'] as $o => $option ) {
|
260 |
$option = wp_parse_args( $option, happyforms_upgrade_get_option_limiter()->get_option_fields() );
|
261 |
|
262 |
-
if ( ! $option['limit_submissions'] || $o !== intval( $value ) ) {
|
263 |
continue;
|
264 |
}
|
265 |
|
259 |
foreach( $part['options'] as $o => $option ) {
|
260 |
$option = wp_parse_args( $option, happyforms_upgrade_get_option_limiter()->get_option_fields() );
|
261 |
|
262 |
+
if ( ! $option['limit_submissions'] || $o !== intval( $value ) || $value !== $o ) {
|
263 |
continue;
|
264 |
}
|
265 |
|
core/classes/parts/class-part-select.php
CHANGED
@@ -264,7 +264,7 @@ class HappyForms_Part_Select extends HappyForms_Form_Part {
|
|
264 |
foreach( $part['options'] as $o => $option ) {
|
265 |
$option = wp_parse_args( $option, happyforms_upgrade_get_option_limiter()->get_option_fields() );
|
266 |
|
267 |
-
if ( ! $option['limit_submissions'] || $o !== intval( $value ) ) {
|
268 |
continue;
|
269 |
}
|
270 |
|
264 |
foreach( $part['options'] as $o => $option ) {
|
265 |
$option = wp_parse_args( $option, happyforms_upgrade_get_option_limiter()->get_option_fields() );
|
266 |
|
267 |
+
if ( ! $option['limit_submissions'] || $o !== intval( $value ) || $value !== $o ) {
|
268 |
continue;
|
269 |
}
|
270 |
|
happyforms.php
CHANGED
@@ -5,15 +5,24 @@
|
|
5 |
* Plugin URI: https://happyforms.io
|
6 |
* Description: We're changin' WordPress forms.
|
7 |
* Author: Happyforms
|
8 |
-
* Version: 1.13.
|
9 |
* Author URI: https://happyforms.io
|
10 |
* Upgrade URI: https://happyforms.io/upgrade
|
11 |
*/
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* The current version of the plugin.
|
15 |
*/
|
16 |
-
define( 'HAPPYFORMS_VERSION', '1.13.
|
17 |
|
18 |
if ( ! function_exists( 'happyforms_plugin_file' ) ):
|
19 |
/**
|
5 |
* Plugin URI: https://happyforms.io
|
6 |
* Description: We're changin' WordPress forms.
|
7 |
* Author: Happyforms
|
8 |
+
* Version: 1.13.1
|
9 |
* Author URI: https://happyforms.io
|
10 |
* Upgrade URI: https://happyforms.io/upgrade
|
11 |
*/
|
12 |
|
13 |
+
if ( defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) {
|
14 |
+
if ( is_plugin_active( 'happyforms-upgrade/happyforms-upgrade.php' ) ) {
|
15 |
+
deactivate_plugins( 'happyforms-upgrade/happyforms-upgrade.php' );
|
16 |
+
}
|
17 |
+
|
18 |
+
wp_redirect( $_SERVER['REQUEST_URI'] );
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
|
22 |
/**
|
23 |
* The current version of the plugin.
|
24 |
*/
|
25 |
+
define( 'HAPPYFORMS_VERSION', '1.13.1' );
|
26 |
|
27 |
if ( ! function_exists( 'happyforms_plugin_file' ) ):
|
28 |
/**
|
inc/assets/css/admin.css
CHANGED
@@ -47,6 +47,10 @@
|
|
47 |
* Upgrade modal
|
48 |
*
|
49 |
*/
|
|
|
|
|
|
|
|
|
50 |
.happyforms-modal__frame--upgrade .happyforms-modal__header h1 {
|
51 |
margin-bottom: 30px;
|
52 |
}
|
@@ -134,3 +138,19 @@
|
|
134 |
.happyforms-form__part[data-happyforms-required] .happyforms-part__label .happyforms-required {
|
135 |
display: inline-block;
|
136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
* Upgrade modal
|
48 |
*
|
49 |
*/
|
50 |
+
a.happyforms-modal__dismiss {
|
51 |
+
box-sizing: border-box;
|
52 |
+
}
|
53 |
+
|
54 |
.happyforms-modal__frame--upgrade .happyforms-modal__header h1 {
|
55 |
margin-bottom: 30px;
|
56 |
}
|
138 |
.happyforms-form__part[data-happyforms-required] .happyforms-part__label .happyforms-required {
|
139 |
display: inline-block;
|
140 |
}
|
141 |
+
|
142 |
+
.post-type-happyforms-activity .page-title-action {
|
143 |
+
display: none;
|
144 |
+
}
|
145 |
+
|
146 |
+
body.post-type-happyforms-activity .fixed .column-contact {
|
147 |
+
width: 20%;
|
148 |
+
}
|
149 |
+
|
150 |
+
.fixed .column-form {
|
151 |
+
width: 15%;
|
152 |
+
}
|
153 |
+
|
154 |
+
.fixed .column-datetime {
|
155 |
+
width: 14%;
|
156 |
+
}
|
inc/assets/js/customize.js
CHANGED
@@ -2248,7 +2248,7 @@
|
|
2248 |
|
2249 |
initUISliders: function() {
|
2250 |
var self = this;
|
2251 |
-
var $container = this.$el.find( '.happyforms-range-control' );
|
2252 |
|
2253 |
$container.each( function( index, el ) {
|
2254 |
var $this = $(this);
|
2248 |
|
2249 |
initUISliders: function() {
|
2250 |
var self = this;
|
2251 |
+
var $container = this.$el.find( '.happyforms-range-control, .happyforms-form-width-range-control' );
|
2252 |
|
2253 |
$container.each( function( index, el ) {
|
2254 |
var $this = $(this);
|
inc/classes/class-happyforms.php
CHANGED
@@ -461,4 +461,19 @@ class HappyForms extends HappyForms_Core {
|
|
461 |
); ?></p>
|
462 |
<?php
|
463 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
}
|
461 |
); ?></p>
|
462 |
<?php
|
463 |
}
|
464 |
+
|
465 |
+
public function admin_screens() {
|
466 |
+
parent::admin_screens();
|
467 |
+
|
468 |
+
global $pagenow;
|
469 |
+
|
470 |
+
$message_post_type = happyforms_get_message_controller()->dummy_type;
|
471 |
+
$current_post_type = get_current_screen()->post_type;
|
472 |
+
|
473 |
+
if ( in_array( $pagenow, array( 'edit.php', 'post.php' ) )
|
474 |
+
&& ( $current_post_type === $message_post_type ) ) {
|
475 |
+
|
476 |
+
require_once( happyforms_get_include_folder() . '/classes/class-message-admin.php' );
|
477 |
+
}
|
478 |
+
}
|
479 |
}
|
inc/classes/class-message-admin.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class HappyForms_Message_Admin {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* The singleton instance.
|
7 |
+
*
|
8 |
+
* @since 1.13.0
|
9 |
+
*
|
10 |
+
* @var HappyForms_Message_Admin
|
11 |
+
*/
|
12 |
+
private static $instance;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The dummy post type for activity screen.
|
16 |
+
*
|
17 |
+
* @since 1.13.0
|
18 |
+
*
|
19 |
+
* @var array
|
20 |
+
*/
|
21 |
+
private $post_type;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The singleton constructor.
|
25 |
+
*
|
26 |
+
* @since 1.13.0
|
27 |
+
*
|
28 |
+
* @return HappyForms_Message_Admin
|
29 |
+
*/
|
30 |
+
public static function instance() {
|
31 |
+
if ( is_null( self::$instance ) ) {
|
32 |
+
self::$instance = new self();
|
33 |
+
}
|
34 |
+
|
35 |
+
self::$instance->hook();
|
36 |
+
|
37 |
+
return self::$instance;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Register hooks.
|
42 |
+
*
|
43 |
+
* @since 1.13.0
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
public function hook() {
|
48 |
+
$this->post_type = happyforms_get_message_controller()->dummy_type;
|
49 |
+
|
50 |
+
add_filter( "manage_{$this->post_type}_posts_columns", array( $this, 'column_headers' ), PHP_INT_MAX );
|
51 |
+
add_filter( "manage_edit-{$this->post_type}_sortable_columns", array( $this, 'sortable_columns' ), PHP_INT_MAX );
|
52 |
+
add_filter( "views_edit-{$this->post_type}", array( $this, 'table_views' ) );
|
53 |
+
add_action( 'admin_footer-edit.php', array( $this, 'print_upgade_modal' ) );
|
54 |
+
}
|
55 |
+
|
56 |
+
public function column_headers( $columns ) {
|
57 |
+
$cb_column = $columns['cb'];
|
58 |
+
$columns = array( 'cb' => $cb_column );
|
59 |
+
|
60 |
+
$columns['contact'] = __( 'Contact', 'happyforms' );
|
61 |
+
$columns['submission'] = __( 'Submission', 'happyforms' );
|
62 |
+
$columns['form'] = __( 'In Response To', 'happyforms' );
|
63 |
+
$columns['datetime'] = __( 'Submitted On', 'happyforms' );
|
64 |
+
|
65 |
+
return $columns;
|
66 |
+
}
|
67 |
+
|
68 |
+
public function sortable_columns( $columns ) {
|
69 |
+
$columns['contact'] = 'contact';
|
70 |
+
$columns['form'] = 'form';
|
71 |
+
$columns['datetime'] = 'datetime';
|
72 |
+
|
73 |
+
return $columns;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function table_views( $default_views ) {
|
77 |
+
$link = '<a href="#" class="%s">%s <span class="count">(0)</span></a>';
|
78 |
+
|
79 |
+
$views = array(
|
80 |
+
'all' => sprintf( $link, 'current', __( 'All', 'happyforms' ) ),
|
81 |
+
'unread' => sprintf( $link, '', __( 'Unread', 'happyforms' ) ),
|
82 |
+
'read' => sprintf( $link, '', __( 'Read', 'happyforms' ) ),
|
83 |
+
'spam' => sprintf( $link, '', __( 'Spam', 'happyforms' ) ),
|
84 |
+
'trash' => sprintf( $link, '', __( 'Trash', 'happyforms' ) ),
|
85 |
+
);
|
86 |
+
|
87 |
+
return $views;
|
88 |
+
}
|
89 |
+
|
90 |
+
public function print_upgade_modal() {
|
91 |
+
if ( $this->post_type === get_current_screen()->post_type ) {
|
92 |
+
require( happyforms_get_include_folder() . '/templates/admin/modal-dummy-activity.php' );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Initialize the HappyForms_Message_Admin class immediately.
|
100 |
+
*/
|
101 |
+
HappyForms_Message_Admin::instance();
|
inc/classes/class-message-controller.php
CHANGED
@@ -20,6 +20,15 @@ class HappyForms_Message_Controller {
|
|
20 |
*/
|
21 |
public $post_type = 'happyforms-message';
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* The parameter name used to identify a
|
25 |
* submission form
|
@@ -203,15 +212,15 @@ class HappyForms_Message_Controller {
|
|
203 |
* @return void
|
204 |
*/
|
205 |
public function hook() {
|
|
|
|
|
|
|
206 |
add_action( 'parse_request', array( $this, 'admin_post' ) );
|
207 |
add_action( 'admin_init', array( $this, 'admin_post' ) );
|
208 |
add_filter( 'happyforms_email_part_visible', array( $this, 'email_part_visible' ), 10, 4 );
|
209 |
|
210 |
// Core multi-step hooks
|
211 |
add_action( 'happyforms_step', array( $this, 'default_submission_step' ) );
|
212 |
-
// Submission preview and review
|
213 |
-
add_action( 'happyforms_step', array( $this, 'preview_submission_step' ) );
|
214 |
-
add_action( 'happyforms_step', array( $this, 'review_submission_step' ) );
|
215 |
}
|
216 |
|
217 |
public function get_meta_fields() {
|
@@ -386,72 +395,6 @@ class HappyForms_Message_Controller {
|
|
386 |
}
|
387 |
}
|
388 |
|
389 |
-
public function preview_submission_step( $form ) {
|
390 |
-
if ( 'preview' !== happyforms_get_current_step( $form ) ) {
|
391 |
-
return;
|
392 |
-
}
|
393 |
-
|
394 |
-
$form_id = $form['ID'];
|
395 |
-
$form_controller = happyforms_get_form_controller();
|
396 |
-
$session = happyforms_get_session();
|
397 |
-
$submission = $this->validate_submission( $form, $_REQUEST );
|
398 |
-
$response = array();
|
399 |
-
|
400 |
-
if ( false === $submission ) {
|
401 |
-
// Add a general error notice at the top
|
402 |
-
$session->add_error( $form_id, html_entity_decode( $form['error_message'] ) );
|
403 |
-
|
404 |
-
// Reset to start step
|
405 |
-
$session->reset_step();
|
406 |
-
|
407 |
-
// Render the form
|
408 |
-
$response['html'] = $form_controller->render( $form );
|
409 |
-
|
410 |
-
// Send error response
|
411 |
-
wp_send_json_error( $response );
|
412 |
-
} else {
|
413 |
-
// Advance step
|
414 |
-
$session->next_step();
|
415 |
-
|
416 |
-
// Render the form
|
417 |
-
$response['html'] = $form_controller->render( $form );
|
418 |
-
|
419 |
-
// Send success response
|
420 |
-
$this->send_json_success( $response, $submission, $form );
|
421 |
-
}
|
422 |
-
}
|
423 |
-
|
424 |
-
public function review_submission_step( $form ) {
|
425 |
-
if ( 'review' !== happyforms_get_current_step( $form ) ) {
|
426 |
-
return;
|
427 |
-
}
|
428 |
-
|
429 |
-
$form_id = $form['ID'];
|
430 |
-
$form_controller = happyforms_get_form_controller();
|
431 |
-
$session = happyforms_get_session();
|
432 |
-
$submission = $this->validate_submission( $form, $_REQUEST );
|
433 |
-
$response = array();
|
434 |
-
|
435 |
-
if ( false === $submission ) {
|
436 |
-
// Add a general error notice at the top
|
437 |
-
$session->add_error( $form_id, html_entity_decode( $form['error_message'] ) );
|
438 |
-
}
|
439 |
-
|
440 |
-
// Reset to start step
|
441 |
-
$session->reset_step();
|
442 |
-
|
443 |
-
// Render the form
|
444 |
-
$response['html'] = $form_controller->render( $form );
|
445 |
-
|
446 |
-
if ( false === $submission ) {
|
447 |
-
// Send error response
|
448 |
-
wp_send_json_error( $response );
|
449 |
-
}
|
450 |
-
|
451 |
-
// Send success response
|
452 |
-
$this->send_json_success( $response, $submission, $form );
|
453 |
-
}
|
454 |
-
|
455 |
public function send_json_success( $response = array(), $submission = array(), $form = array() ) {
|
456 |
$response = apply_filters( 'happyforms_json_response', $response, $submission, $form );
|
457 |
|
@@ -752,6 +695,40 @@ class HappyForms_Message_Controller {
|
|
752 |
exit();
|
753 |
}
|
754 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
}
|
756 |
|
757 |
if ( ! function_exists( 'happyforms_get_message_controller' ) ):
|
20 |
*/
|
21 |
public $post_type = 'happyforms-message';
|
22 |
|
23 |
+
/**
|
24 |
+
* The dummy post type slug.
|
25 |
+
*
|
26 |
+
* @since 1.13.0
|
27 |
+
*
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
public $dummy_type = 'happyforms-activity';
|
31 |
+
|
32 |
/**
|
33 |
* The parameter name used to identify a
|
34 |
* submission form
|
212 |
* @return void
|
213 |
*/
|
214 |
public function hook() {
|
215 |
+
add_action( 'init', array( $this, 'register_dummy_post_type' ) );
|
216 |
+
add_filter( 'happyforms_responses_page_url', array( $this, 'dummy_page_url' ) );
|
217 |
+
|
218 |
add_action( 'parse_request', array( $this, 'admin_post' ) );
|
219 |
add_action( 'admin_init', array( $this, 'admin_post' ) );
|
220 |
add_filter( 'happyforms_email_part_visible', array( $this, 'email_part_visible' ), 10, 4 );
|
221 |
|
222 |
// Core multi-step hooks
|
223 |
add_action( 'happyforms_step', array( $this, 'default_submission_step' ) );
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
public function get_meta_fields() {
|
395 |
}
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
public function send_json_success( $response = array(), $submission = array(), $form = array() ) {
|
399 |
$response = apply_filters( 'happyforms_json_response', $response, $submission, $form );
|
400 |
|
695 |
exit();
|
696 |
}
|
697 |
|
698 |
+
public function register_dummy_post_type() {
|
699 |
+
$labels = array(
|
700 |
+
'name' => __( 'Activity', 'happyforms' ),
|
701 |
+
'singular_name' => __( 'Activity', 'happyforms' ),
|
702 |
+
'all_items' => __( 'All Activity', 'happyforms' ),
|
703 |
+
'menu_name' => __( 'All Activity', 'happyforms' ),
|
704 |
+
'not_found' => __( 'No activity found.', 'happyforms' ),
|
705 |
+
);
|
706 |
+
|
707 |
+
$args = array(
|
708 |
+
'labels' => $labels,
|
709 |
+
'public' => false,
|
710 |
+
'publicly_queryable' => false,
|
711 |
+
'exclude_from_search' => true,
|
712 |
+
'show_ui' => true,
|
713 |
+
'show_in_menu' => false,
|
714 |
+
'show_in_admin_bar' => false,
|
715 |
+
'query_var' => true,
|
716 |
+
'capability_type' => 'page',
|
717 |
+
'has_archive' => false,
|
718 |
+
'hierarchical' => false,
|
719 |
+
'can_export' => false,
|
720 |
+
'supports' => array( '' ),
|
721 |
+
);
|
722 |
+
|
723 |
+
register_post_type( $this->dummy_type, $args );
|
724 |
+
}
|
725 |
+
|
726 |
+
public function dummy_page_url( $url ) {
|
727 |
+
$url = "edit.php?post_type={$this->dummy_type}";
|
728 |
+
|
729 |
+
return $url;
|
730 |
+
}
|
731 |
+
|
732 |
}
|
733 |
|
734 |
if ( ! function_exists( 'happyforms_get_message_controller' ) ):
|
inc/templates/admin/modal-dummy-activity.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $return_url = get_admin_url() . 'edit.php?post_type=happyform'; ?>
|
2 |
+
<div class="happyforms-modal__overlay">
|
3 |
+
<div class="happyforms-modal__frame happyforms-modal__frame--upgrade">
|
4 |
+
<div class="happyforms-modal__header">
|
5 |
+
<a href="<?php echo $return_url; ?>" class="happyforms-modal__dismiss">
|
6 |
+
|
7 |
+
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
8 |
+
</a>
|
9 |
+
</div>
|
10 |
+
<div class="happyforms-modal__body">
|
11 |
+
<div class="happyforms-modal__heading">
|
12 |
+
<h1><?php _e( 'You’ll need to upgrade<br> to access this', 'happyforms' ); ?></h1>
|
13 |
+
<p><?php _e( 'We offer several, affordable paid plans that include our best features. Upgrade today and increase your customer interactions.', 'happyforms' ); ?></p>
|
14 |
+
</div>
|
15 |
+
<div class="happyforms-modal__content">
|
16 |
+
<a href="https://happyforms.io/upgrade" target="_blank" class="button button-primary button-hero"><?php _e( 'Start Your Risk-Free 14-Day Trial', 'happyforms' ); ?></a>
|
17 |
+
<p>Or <a href="<?php echo $return_url; ?>" class="happyforms-continue-link">continue with free version</a></p>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
+
</div>
|
languages/happyforms.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Happyforms (free) package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Happyforms (free) 1.13.
|
6 |
"Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
|
7 |
-
"POT-Creation-Date: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,26 +13,26 @@ msgstr ""
|
|
13 |
"Language-Team: The Theme Foundry\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
15 |
|
16 |
-
#: core/classes/class-block.php:
|
17 |
#: core/classes/class-happyforms-core.php:173
|
18 |
#: core/classes/class-happyforms-core.php:174
|
19 |
#: core/classes/class-happyforms-widget.php:13 core/helpers/helper-misc.php:997
|
20 |
msgid "Forms"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: core/classes/class-block.php:
|
24 |
msgid "Displays a form."
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: core/classes/class-block.php:
|
28 |
msgid "Choose"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: core/classes/class-block.php:
|
32 |
msgid "Which form would you like to add here?"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: core/classes/class-block.php:
|
36 |
msgid "HappyForms Settings"
|
37 |
msgstr ""
|
38 |
|
@@ -162,7 +162,7 @@ msgstr ""
|
|
162 |
msgid "Duplicate"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: core/classes/class-form-admin.php:423
|
166 |
msgid "Trash"
|
167 |
msgstr ""
|
168 |
|
@@ -952,6 +952,8 @@ msgstr ""
|
|
952 |
|
953 |
#: core/classes/class-happyforms-core.php:197
|
954 |
#: core/classes/class-happyforms-core.php:198
|
|
|
|
|
955 |
msgid "Activity"
|
956 |
msgstr ""
|
957 |
|
@@ -3373,6 +3375,47 @@ msgstr ""
|
|
3373 |
msgid "Build your own WordPress form with Happyforms"
|
3374 |
msgstr ""
|
3375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3376 |
#: inc/classes/parts/class-part-address-dummy.php:8
|
3377 |
msgid "Address"
|
3378 |
msgstr ""
|
@@ -3549,6 +3592,23 @@ msgstr ""
|
|
3549 |
msgid "For formatted site URLs."
|
3550 |
msgstr ""
|
3551 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3552 |
#: inc/templates/admin/modal-onboarding.php:4
|
3553 |
msgid "Welcome to Happyforms"
|
3554 |
msgstr ""
|
@@ -3584,20 +3644,6 @@ msgstr ""
|
|
3584 |
msgid "Complete"
|
3585 |
msgstr ""
|
3586 |
|
3587 |
-
#: inc/templates/admin/modal-upgrade.php:2
|
3588 |
-
msgid "You’ll need to upgrade<br> to access this"
|
3589 |
-
msgstr ""
|
3590 |
-
|
3591 |
-
#: inc/templates/admin/modal-upgrade.php:3
|
3592 |
-
msgid ""
|
3593 |
-
"We offer several, affordable paid plans that include our best features. "
|
3594 |
-
"Upgrade today and increase your customer interactions."
|
3595 |
-
msgstr ""
|
3596 |
-
|
3597 |
-
#: inc/templates/admin/modal-upgrade.php:6
|
3598 |
-
msgid "Start Your Risk-Free 14-Day Trial"
|
3599 |
-
msgstr ""
|
3600 |
-
|
3601 |
#: inc/templates/customize-controls/email-parts-list-dummy.php:8
|
3602 |
msgid "field"
|
3603 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Happyforms (free) package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Happyforms (free) 1.13.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
|
7 |
+
"POT-Creation-Date: 2021-09-07 07:47:23+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Language-Team: The Theme Foundry\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
15 |
|
16 |
+
#: core/classes/class-block.php:52 core/classes/class-form-controller.php:72
|
17 |
#: core/classes/class-happyforms-core.php:173
|
18 |
#: core/classes/class-happyforms-core.php:174
|
19 |
#: core/classes/class-happyforms-widget.php:13 core/helpers/helper-misc.php:997
|
20 |
msgid "Forms"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: core/classes/class-block.php:53 core/classes/class-happyforms-widget.php:15
|
24 |
msgid "Displays a form."
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: core/classes/class-block.php:115 core/classes/parts/class-part-select.php:56
|
28 |
msgid "Choose"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: core/classes/class-block.php:116
|
32 |
msgid "Which form would you like to add here?"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: core/classes/class-block.php:117
|
36 |
msgid "HappyForms Settings"
|
37 |
msgstr ""
|
38 |
|
162 |
msgid "Duplicate"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: core/classes/class-form-admin.php:423 inc/classes/class-message-admin.php:84
|
166 |
msgid "Trash"
|
167 |
msgstr ""
|
168 |
|
952 |
|
953 |
#: core/classes/class-happyforms-core.php:197
|
954 |
#: core/classes/class-happyforms-core.php:198
|
955 |
+
#: inc/classes/class-message-controller.php:700
|
956 |
+
#: inc/classes/class-message-controller.php:701
|
957 |
msgid "Activity"
|
958 |
msgstr ""
|
959 |
|
3375 |
msgid "Build your own WordPress form with Happyforms"
|
3376 |
msgstr ""
|
3377 |
|
3378 |
+
#: inc/classes/class-message-admin.php:60
|
3379 |
+
msgid "Contact"
|
3380 |
+
msgstr ""
|
3381 |
+
|
3382 |
+
#: inc/classes/class-message-admin.php:61
|
3383 |
+
msgid "Submission"
|
3384 |
+
msgstr ""
|
3385 |
+
|
3386 |
+
#: inc/classes/class-message-admin.php:62
|
3387 |
+
msgid "In Response To"
|
3388 |
+
msgstr ""
|
3389 |
+
|
3390 |
+
#: inc/classes/class-message-admin.php:63
|
3391 |
+
msgid "Submitted On"
|
3392 |
+
msgstr ""
|
3393 |
+
|
3394 |
+
#: inc/classes/class-message-admin.php:80
|
3395 |
+
msgid "All"
|
3396 |
+
msgstr ""
|
3397 |
+
|
3398 |
+
#: inc/classes/class-message-admin.php:81
|
3399 |
+
msgid "Unread"
|
3400 |
+
msgstr ""
|
3401 |
+
|
3402 |
+
#: inc/classes/class-message-admin.php:82
|
3403 |
+
msgid "Read"
|
3404 |
+
msgstr ""
|
3405 |
+
|
3406 |
+
#: inc/classes/class-message-admin.php:83
|
3407 |
+
msgid "Spam"
|
3408 |
+
msgstr ""
|
3409 |
+
|
3410 |
+
#: inc/classes/class-message-controller.php:702
|
3411 |
+
#: inc/classes/class-message-controller.php:703
|
3412 |
+
msgid "All Activity"
|
3413 |
+
msgstr ""
|
3414 |
+
|
3415 |
+
#: inc/classes/class-message-controller.php:704
|
3416 |
+
msgid "No activity found."
|
3417 |
+
msgstr ""
|
3418 |
+
|
3419 |
#: inc/classes/parts/class-part-address-dummy.php:8
|
3420 |
msgid "Address"
|
3421 |
msgstr ""
|
3592 |
msgid "For formatted site URLs."
|
3593 |
msgstr ""
|
3594 |
|
3595 |
+
#: inc/templates/admin/modal-dummy-activity.php:12
|
3596 |
+
#: inc/templates/admin/modal-upgrade.php:2
|
3597 |
+
msgid "You’ll need to upgrade<br> to access this"
|
3598 |
+
msgstr ""
|
3599 |
+
|
3600 |
+
#: inc/templates/admin/modal-dummy-activity.php:13
|
3601 |
+
#: inc/templates/admin/modal-upgrade.php:3
|
3602 |
+
msgid ""
|
3603 |
+
"We offer several, affordable paid plans that include our best features. "
|
3604 |
+
"Upgrade today and increase your customer interactions."
|
3605 |
+
msgstr ""
|
3606 |
+
|
3607 |
+
#: inc/templates/admin/modal-dummy-activity.php:16
|
3608 |
+
#: inc/templates/admin/modal-upgrade.php:6
|
3609 |
+
msgid "Start Your Risk-Free 14-Day Trial"
|
3610 |
+
msgstr ""
|
3611 |
+
|
3612 |
#: inc/templates/admin/modal-onboarding.php:4
|
3613 |
msgid "Welcome to Happyforms"
|
3614 |
msgstr ""
|
3644 |
msgid "Complete"
|
3645 |
msgstr ""
|
3646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3647 |
#: inc/templates/customize-controls/email-parts-list-dummy.php:8
|
3648 |
msgid "field"
|
3649 |
msgstr ""
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: contact form, contact form plugin, forms, form builder, custom form, intak
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 1.13.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -151,6 +151,11 @@ Aw, honestly, the thought that you're writing about our contact form builder is
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
= 1.13.0 =
|
155 |
* New feature: Long Answer field now supports rich-text editing.
|
156 |
* New feature: Alphabetical choices, "other" choice, randomization, submission limiting support for Single Choice field.
|
@@ -843,6 +848,9 @@ Aw, honestly, the thought that you're writing about our contact form builder is
|
|
843 |
|
844 |
== Upgrade Notice ==
|
845 |
|
|
|
|
|
|
|
846 |
= 1.13.0 =
|
847 |
* Advanced controls for Single Choice, Multiple Choice and Dropdown fields, bugfixes.
|
848 |
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.13.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 1.13.1 =
|
155 |
+
* New feature: HTML anchor on form block.
|
156 |
+
* Bugfix: Dropdown item font size doesn't match form style setting.
|
157 |
+
* Bugfix: Form width preview not updating.
|
158 |
+
|
159 |
= 1.13.0 =
|
160 |
* New feature: Long Answer field now supports rich-text editing.
|
161 |
* New feature: Alphabetical choices, "other" choice, randomization, submission limiting support for Single Choice field.
|
848 |
|
849 |
== Upgrade Notice ==
|
850 |
|
851 |
+
= 1.13.1 =
|
852 |
+
* HTML anchor on form block, bugfixes.
|
853 |
+
|
854 |
= 1.13.0 =
|
855 |
* Advanced controls for Single Choice, Multiple Choice and Dropdown fields, bugfixes.
|
856 |
|