Skip to content

Commit

Permalink
use postAuthorEmail (#41290)
Browse files Browse the repository at this point in the history
  • Loading branch information
lezama authored and matticbot committed Jan 24, 2025
1 parent 3e1f6bb commit 3549695
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 116 deletions.
1 change: 1 addition & 0 deletions jetpack_vendor/automattic/jetpack-forms/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This is an alpha version! The changes listed here are not final.
- Adds missing deprecation for checkboxes and radio fields
- Form: fix the default checkstate for admins
- Forms: Add unique ids to each form
- Forms: fix send to settings for multiple authors
- Updates the icon colours to the new standard

## [0.35.0] - 2025-01-20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ public static function gutenblock_render_form( $atts, $content ) {
* Loads scripts
*/
public static function load_editor_scripts() {
global $post;

$handle = 'jp-forms-blocks';

Expand All @@ -171,10 +170,14 @@ public static function load_editor_scripts() {
)
);

// Create a Contact_Form instance to get the default values
$contact_form = new Contact_Form( array() );
$defaults = $contact_form->defaults;

$data = array(
'defaults' => array(
'to' => wp_get_current_user()->user_email,
'subject' => '[' . get_bloginfo( 'name' ) . ']' . ( isset( $post ) ? ' ' . esc_html( $post->post_title ) : '' ),
'to' => $defaults['to'],
'subject' => $defaults['subject'],
),
);

Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
),
'jetpack-forms' => array(
'path' => 'jetpack_vendor/automattic/jetpack-forms',
'ver' => '0.35.1-alpha1737711466',
'ver' => '0.35.1-alpha1737742928',
),
'jetpack-image-cdn' => array(
'path' => 'jetpack_vendor/automattic/jetpack-image-cdn',
Expand Down
Loading

0 comments on commit 3549695

Please sign in to comment.