Skip to content

Commit

Permalink
Contact Form: Removing code and renaming relevant references to ensur…
Browse files Browse the repository at this point in the history
…e we use the package version (#37157)

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/8972300995

Upstream-Ref: Automattic/jetpack@9bf534c
  • Loading branch information
coder-karen authored and matticbot committed May 6, 2024
1 parent 262fc5d commit bcda1d6
Show file tree
Hide file tree
Showing 70 changed files with 511 additions and 9,222 deletions.
2 changes: 1 addition & 1 deletion 3rd-party/class-salesforce-lead-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function initialize() {
* Process Salesforce Lead forms
*
* @param int $post_id - the post_id for the CPT that is created.
* @param array $fields - Grunion_Contact_Form_Field array.
* @param array $fields - Contact_Form_Field array.
* @param bool $is_spam - marked as spam by Akismet(?).
* @param array $entry_values - extra fields added to from the contact form.
*
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This is an alpha version! The changes listed here are not final.
- AI Featured Image: allow users to write prompts for the image generation.
- AI Featured Image: change upgrade prompt layout and fix UI issues.
- AI Featured Image: start tracking error messages.
- Contact Form: Removing code and renaming relevant references to ensure we use the package version of the contact form.
- Janitorial: deprecate methods in Jetpack class in favor of methods from the Connection package.
- Jetpack Sync: Add Woocommerce event remove_order_items to Jetpack Sync
- SSO: deprecate in-plugin methods in favor of methods from the Connection package.
Expand Down
1 change: 0 additions & 1 deletion _inc/build/contact-form/js/dropdown.min.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/dropdown.min.js

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/editor-view.min.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/editor-view.min.js

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/grunion-admin.min.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/grunion-admin.min.js

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/grunion-frontend.min.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/grunion-frontend.min.js

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/grunion.min.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion _inc/build/contact-form/js/grunion.min.js

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 7 additions & 0 deletions _inc/lib/class-jetpack-google-drive-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Google Drive helper.
*
* @deprecated 13.4-a.10 Use automattic/jetpack-forms
* @package automattic/jetpack
*/

Expand All @@ -11,15 +12,19 @@

/**
* Class Jetpack_Google_Drive_Helper
*
* @deprecated 13.4-a.10 Use Automattic\Jetpack\Forms\Service\Google_Drive_Helper
*/
class Jetpack_Google_Drive_Helper {
/**
* Checks if the user has a valid connection to Google Drive
*
* @deprecated 13.4-a.10 Use Automattic\Jetpack\Forms\Service\Google_Drive_Helper->has_valid_connection
* @param int $user_id The user ID.
* @return array Array with single 'valid' (bool) entry.
*/
public static function has_valid_connection( $user_id ) {
_deprecated_function( __METHOD__, 'jetpack-13.4-a.10', 'Automattic\Jetpack\Forms\Service\Google_Drive_Helper->has_valid_connection' );
$site_id = Manager::get_site_id();
if ( is_wp_error( $site_id ) ) {
return false;
Expand Down Expand Up @@ -63,12 +68,14 @@ public static function has_valid_connection( $user_id ) {
/**
* Creates a Google Spreadsheet and returns some of its meta
*
* @deprecated 13.4-a.10 Use Automattic\Jetpack\Forms\Service\Google_Drive_Helper->create_sheet
* @param int $user_id The user ID.
* @param string $title The spreadsheet title.
* @param array $rows Array of arrays with values.
* @return array|WP_Error
*/
public static function create_sheet( $user_id, $title, $rows = array() ) {
_deprecated_function( __METHOD__, 'jetpack-13.4-a.10', 'Automattic\Jetpack\Forms\Service\Google_Drive_Helper->create_sheet' );
$site_id = Manager::get_site_id();
if ( is_wp_error( $site_id ) ) {
return false;
Expand Down
5 changes: 0 additions & 5 deletions class.jetpack-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,11 +725,6 @@ public static function enqueue_block_editor_assets() {
* @param bool true Enable the RePublicize UI in the block editor context. Defaults to true.
*/
'republicize_enabled' => apply_filters( 'jetpack_block_editor_republicize_feature', true ),
/**
* Prevent the registration of the blocks from extensions/blocks/contact-form
* if the Forms package is enabled.
*/
'is_form_package_enabled' => apply_filters( 'jetpack_contact_form_use_package', true ),
),
'siteFragment' => $status->get_site_suffix(),
'adminUrl' => esc_url( admin_url() ),
Expand Down
4 changes: 4 additions & 0 deletions class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -5600,6 +5600,10 @@ public function deprecated_hooks() {
'replacement' => null,
'version' => 'jetpack-13.2.0',
),
'jetpack_contact_form_use_package' => array(
'replacement' => null,
'version' => 'jetpack-13.4.0',
),
);

foreach ( $filter_deprecated_list as $tag => $args ) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"automattic/jetpack-constants": "^2.0.2",
"automattic/jetpack-device-detection": "^2.1.3",
"automattic/jetpack-error": "^2.0.2",
"automattic/jetpack-forms": "^0.30.19-alpha",
"automattic/jetpack-forms": "^0.31.0-alpha",
"automattic/jetpack-google-fonts-provider": "^0.7.2",
"automattic/jetpack-identity-crisis": "^0.18.6-alpha",
"automattic/jetpack-image-cdn": "^0.4.0-alpha",
Expand Down
7 changes: 5 additions & 2 deletions jetpack_vendor/automattic/jetpack-forms/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.30.19-alpha] - unreleased
## [0.31.0-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

Expand All @@ -15,6 +15,9 @@ This is an alpha version! The changes listed here are not final.
### Changed
- Updated package dependencies.

### Removed
- Contact Form: Removing code and renaming relevant references to ensure we use the package version of the contact form.

### Fixed
- Fix reference to `Jetpack_Options` class in `Contact_Form_Plugin::record_tracks_event()`.

Expand Down Expand Up @@ -564,7 +567,7 @@ This is an alpha version! The changes listed here are not final.
- Added a new jetpack/forms package [#28409]
- Added a public load_contact_form method for initializing the contact form module. [#28416]

[0.30.19-alpha]: https://github.com/automattic/jetpack-forms/compare/v0.30.18...v0.30.19-alpha
[0.31.0-alpha]: https://github.com/automattic/jetpack-forms/compare/v0.30.18...v0.31.0-alpha
[0.30.18]: https://github.com/automattic/jetpack-forms/compare/v0.30.17...v0.30.18
[0.30.17]: https://github.com/automattic/jetpack-forms/compare/v0.30.16...v0.30.17
[0.30.16]: https://github.com/automattic/jetpack-forms/compare/v0.30.15...v0.30.16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
class Jetpack_Forms {

const PACKAGE_VERSION = '0.30.19-alpha';
const PACKAGE_VERSION = '0.31.0-alpha';

/**
* Load the contact form module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function print_export_modal() {
* Ajax handler for wp_ajax_grunion_export_to_gdrive.
* Exports data to Google Drive, based on POST data.
*
* @see Grunion_Contact_Form_Plugin::get_feedback_entries_from_post
* @see Contact_Form_Plugin::get_feedback_entries_from_post
*/
public function export_to_gdrive() {
$post_data = wp_unslash( $_POST );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public static function grunion_media_button() {
*/
public static function mce_external_plugins( $plugin_array ) {
$plugin_array['grunion_form'] = Assets::get_file_url_for_environment(
'_inc/build/contact-form/js/tinymce-plugin-form-button.min.js',
'modules/contact-form/js/tinymce-plugin-form-button.js'
'jetpack_vendor/automattic/jetpack-forms/dist/contact-form/js/tinymce-plugin-form-button.min.js',
'jetpack_vendor/automattic/jetpack-forms/dist/contact-form/js/tinymce-plugin-form-button.js'
);
return $plugin_array;
}
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 @@ -42,7 +42,7 @@
),
'jetpack-forms' => array(
'path' => 'jetpack_vendor/automattic/jetpack-forms',
'ver' => '0.30.19-alpha1714750277',
'ver' => '0.31.0-alpha1715012262',
),
'jetpack-google-fonts-provider' => array(
'path' => 'jetpack_vendor/automattic/jetpack-google-fonts-provider',
Expand Down
Loading

0 comments on commit bcda1d6

Please sign in to comment.