From 77c6df9721097ff0757f5e2e8eea7ba1a501a008 Mon Sep 17 00:00:00 2001 From: Karen Attfield Date: Wed, 1 May 2024 09:53:40 +0100 Subject: [PATCH 01/21] Removing contact form module files --- .../jetpack/modules/contact-form/admin.php | 531 ---- .../class-grunion-contact-form-endpoint.php | 47 - .../css/editor-inline-editing-style.css | 751 ------ .../modules/contact-form/css/editor-style.css | 543 ---- .../modules/contact-form/css/editor-ui.css | 18 - .../contact-form/css/grunion-admin.css | 245 -- .../modules/contact-form/css/grunion.css | 602 ----- .../contact-form/css/jquery-ui-datepicker.css | 160 -- .../contact-form/css/jquery-ui-selectmenu.css | 40 - .../contact-form/grunion-contact-form.php | 2247 ----------------- .../contact-form/grunion-editor-view.php | 102 - .../contact-form/grunion-form-view.php | 274 -- .../grunion-response-email-template.php | 30 - .../images/blank-screen-akismet.png | Bin 2270 -> 0 bytes .../images/blank-screen-button.png | Bin 1823 -> 0 bytes .../contact-form/images/grunion-form-2x.png | Bin 153 -> 0 bytes .../contact-form/images/grunion-form.png | Bin 188 -> 0 bytes .../images/grunion-remove-field-2x.png | Bin 201 -> 0 bytes .../images/grunion-remove-field-hover-2x.png | Bin 207 -> 0 bytes .../images/grunion-remove-field-hover.gif | Bin 144 -> 0 bytes .../images/grunion-remove-field.gif | Bin 139 -> 0 bytes .../images/grunion-remove-option-2x.png | Bin 99 -> 0 bytes .../images/grunion-remove-option-hover-2x.png | Bin 94 -> 0 bytes .../images/grunion-remove-option-hover.gif | Bin 73 -> 0 bytes .../images/grunion-remove-option.gif | Bin 73 -> 0 bytes .../contact-form/images/twitter-dark.png | Bin 985 -> 0 bytes .../modules/contact-form/js/dropdown.js | 26 - .../modules/contact-form/js/editor-view.js | 248 -- .../modules/contact-form/js/grunion-admin.js | 313 --- .../contact-form/js/grunion-frontend.js | 3 - .../modules/contact-form/js/grunion.js | 1169 --------- .../js/tinymce-plugin-form-button.js | 37 - 32 files changed, 7386 deletions(-) delete mode 100644 projects/plugins/jetpack/modules/contact-form/admin.php delete mode 100644 projects/plugins/jetpack/modules/contact-form/class-grunion-contact-form-endpoint.php delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/editor-style.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/editor-ui.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/grunion-admin.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/grunion.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/jquery-ui-datepicker.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/css/jquery-ui-selectmenu.css delete mode 100644 projects/plugins/jetpack/modules/contact-form/grunion-contact-form.php delete mode 100644 projects/plugins/jetpack/modules/contact-form/grunion-editor-view.php delete mode 100644 projects/plugins/jetpack/modules/contact-form/grunion-form-view.php delete mode 100644 projects/plugins/jetpack/modules/contact-form/grunion-response-email-template.php delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/blank-screen-akismet.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/blank-screen-button.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-form-2x.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-form.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-2x.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-hover-2x.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-hover.gif delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field.gif delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-2x.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-hover-2x.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-hover.gif delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option.gif delete mode 100644 projects/plugins/jetpack/modules/contact-form/images/twitter-dark.png delete mode 100644 projects/plugins/jetpack/modules/contact-form/js/dropdown.js delete mode 100644 projects/plugins/jetpack/modules/contact-form/js/editor-view.js delete mode 100644 projects/plugins/jetpack/modules/contact-form/js/grunion-admin.js delete mode 100644 projects/plugins/jetpack/modules/contact-form/js/grunion-frontend.js delete mode 100644 projects/plugins/jetpack/modules/contact-form/js/grunion.js delete mode 100644 projects/plugins/jetpack/modules/contact-form/js/tinymce-plugin-form-button.js diff --git a/projects/plugins/jetpack/modules/contact-form/admin.php b/projects/plugins/jetpack/modules/contact-form/admin.php deleted file mode 100644 index 3d13e39b5f2a9..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/admin.php +++ /dev/null @@ -1,531 +0,0 @@ -grunion_media_button - * @return void - */ -function grunion_media_button() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_media_button' ); - - Grunion_Admin::$instance->grunion_media_button(); -} - -/** - * Display edit form view. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_display_form_view - * @return void - */ -function grunion_display_form_view() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_display_form_view' ); - - Grunion_Admin::$instance->grunion_display_form_view(); -} - -/** - * Enqueue styles. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_css - * @return void - */ -function grunion_admin_css() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_css' ); - - Grunion_Admin::$instance->grunion_admin_css(); -} - -/** - * Enqueue scripts. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_js - * @return void - */ -function grunion_admin_js() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_js' ); - - Grunion_Admin::$instance->grunion_admin_js(); -} - -/** - * Hack a 'Bulk Spam' option for bulk edit in other than spam view - * Hack a 'Bulk Delete' option for bulk edit in spam view - * - * There isn't a better way to do this until - * https://core.trac.wordpress.org/changeset/17297 is resolved - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_add_bulk_edit_option - */ -function grunion_add_bulk_edit_option() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_add_bulk_edit_option' ); - - return Grunion_Admin::$instance->grunion_add_bulk_edit_option(); -} - -/** - * Handle a bulk spam report - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_handle_bulk_spam - */ -function grunion_handle_bulk_spam() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_handle_bulk_spam' ); - - return Grunion_Admin::$instance->grunion_handle_bulk_spam(); -} - -/** - * Display spam message. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_message_bulk_spam - * @return void - */ -function grunion_message_bulk_spam() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_message_bulk_spam' ); - - Grunion_Admin::$instance->grunion_message_bulk_spam(); -} - -/** - * Unset edit option when bulk editing. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_bulk_actions - * @param array $actions List of actions available. - * @return array $actions - */ -function grunion_admin_bulk_actions( $actions ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_bulk_actions' ); - - return Grunion_Admin::$instance->grunion_admin_bulk_actions( $actions ); -} - -/** - * Unset publish button when editing feedback. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_view_tabs - * @param array $views List of post views. - * @return array $views - */ -function grunion_admin_view_tabs( $views ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_admin_view_tabs' ); - - return Grunion_Admin::$instance->grunion_admin_view_tabs( $views ); -} - -/** - * Build Feedback admin page columns. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_post_type_columns_filter - * @param array $cols List of available columns. - * @return array - */ -function grunion_post_type_columns_filter( $cols ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_post_type_columns_filter' ); - - return Grunion_Admin::$instance->grunion_post_type_columns_filter( $cols ); -} - -/** - * Displays the value for the source column. (This function runs within the loop.) - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_date - * @return void - */ -function grunion_manage_post_column_date() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_date' ); - - Grunion_Admin::$instance->grunion_manage_post_column_date(); -} - -/** - * Displays the value for the from column. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_from - * @param \WP_Post $post Current post. - * @return void - */ -function grunion_manage_post_column_from( $post ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_from' ); - - Grunion_Admin::$instance->grunion_manage_post_column_from( $post ); -} - -/** - * Displays the value for the response column. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_response - * @param \WP_Post $post Current post. - * @return void - */ -function grunion_manage_post_column_response( $post ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_response' ); - - Grunion_Admin::$instance->grunion_manage_post_column_response( $post ); -} - -/** - * Displays the value for the source column. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_source - * @param \WP_Post $post Current post. - * @return void - */ -function grunion_manage_post_column_source( $post ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_column_source' ); - - Grunion_Admin::$instance->grunion_manage_post_column_source( $post ); -} - -/** - * Parse message content and display in appropriate columns. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_columns - * @param array $col List of columns available on admin page. - * @param int $post_id The current post ID. - * @return void - */ -function grunion_manage_post_columns( $col, $post_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_columns' ); - - Grunion_Admin::$instance->grunion_manage_post_columns( $col, $post_id ); -} - -/** - * Add a post filter dropdown at the top of the admin page. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_source_filter - * @return void - */ -function grunion_source_filter() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_source_filter' ); - - Grunion_Admin::$instance->grunion_source_filter(); -} - -/** - * Filter feedback posts by parent_id if present. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_source_filter_results - * @param WP_Query $query Current query. - * @return void - */ -function grunion_source_filter_results( $query ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_source_filter_results' ); - - Grunion_Admin::$instance->grunion_source_filter_results( $query ); -} - -/** - * Add actions to feedback response rows in WP Admin. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_row_actions - * @param string[] $actions Default actions. - * @return string[] - */ -function grunion_manage_post_row_actions( $actions ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_manage_post_row_actions' ); - - return Grunion_Admin::$instance->grunion_manage_post_row_actions( $actions ); -} - -/** - * Escape grunion attributes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_esc_attr - * @param string $attr - the attribute we're escaping. - * @return string - */ -function grunion_esc_attr( $attr ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_esc_attr' ); - - return Grunion_Admin::$instance->grunion_esc_attr( $attr ); -} - -/** - * Sort grunion items. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_sort_objects - * @param array $a - the first item we're sorting. - * @param array $b - the second item we're sorting. - * @return string - */ -function grunion_sort_objects( $a, $b ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_sort_objects' ); - - return Grunion_Admin::$instance->grunion_sort_objects( $a, $b ); -} - -/** - * Take an array of field types from the form builder, and construct a shortcode form. - * returns both the shortcode form, and HTML markup representing a preview of the form - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_ajax_shortcode - * @return never - */ -function grunion_ajax_shortcode() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_ajax_shortcode' ); - - Grunion_Admin::$instance->grunion_ajax_shortcode(); -} - -/** - * Takes a post_id, extracts the contact-form shortcode from that post (if there is one), parses it, - * and constructs a json object representing its contents and attributes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_ajax_shortcode_to_json - * @return never - */ -function grunion_ajax_shortcode_to_json() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_ajax_shortcode_to_json' ); - - Grunion_Admin::$instance->grunion_ajax_shortcode_to_json(); -} - -/** - * Handle marking feedback as spam. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_ajax_spam - */ -function grunion_ajax_spam() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_ajax_spam' ); - - return Grunion_Admin::$instance->grunion_ajax_spam(); -} - -/** - * Add the scripts that will add the "Check for Spam" button to the Feedbacks dashboard page. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_enable_spam_recheck - */ -function grunion_enable_spam_recheck() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_enable_spam_recheck' ); - - return Grunion_Admin::$instance->grunion_enable_spam_recheck(); -} - -/** - * Add the JS and CSS necessary for the Feedback admin page to function. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_add_admin_scripts - */ -function grunion_add_admin_scripts() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_add_admin_scripts' ); - - return Grunion_Admin::$instance->grunion_add_admin_scripts(); -} - -/** - * Adds the 'Export' button to the feedback dashboard page. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_export_button - * @return void - */ -function grunion_export_button() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_export_button' ); - - Grunion_Admin::$instance->grunion_export_button(); -} - -/** - * Add the "Check for Spam" button to the Feedbacks dashboard page. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_check_for_spam_button - */ -function grunion_check_for_spam_button() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_check_for_spam_button' ); - - return Grunion_Admin::$instance->grunion_check_for_spam_button(); -} - -/** - * Recheck all approved feedbacks for spam. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_recheck_queue - */ -function grunion_recheck_queue() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_recheck_queue' ); - - return Grunion_Admin::$instance->grunion_recheck_queue(); -} - -/** - * Delete a number of spam feedbacks via an AJAX request. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_delete_spam_feedbacks - */ -function grunion_delete_spam_feedbacks() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_delete_spam_feedbacks' ); - - return Grunion_Admin::$instance->grunion_delete_spam_feedbacks(); -} - -/** - * Show an admin notice if the "Empty Spam" or "Check Spam" process was unable to complete, probably due to a permissions error. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->grunion_feedback_admin_notice - */ -function grunion_feedback_admin_notice() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->grunion_feedback_admin_notice' ); - - return Grunion_Admin::$instance->grunion_feedback_admin_notice(); -} - -/** - * Class Grunion_Admin - * - * Singleton for Grunion admin area support. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin - */ -class Grunion_Admin { - /** - * CSV export nonce field name - * - * @var string The nonce field name for CSV export. - */ - private $export_nonce_field_csv = 'feedback_export_nonce_csv'; - - /** - * GDrive export nonce field name - * - * @var string The nonce field name for GDrive export. - */ - private $export_nonce_field_gdrive = 'feedback_export_nonce_gdrive'; - - /** - * Singleton class instance - * - * @var Admin Class instance. - */ - public static $instance; - - /** - * Instantiates this singleton class - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin::init - * @return Admin The Grunion Admin class instance. - */ - public static function init() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin::init' ); - - if ( ! isset( self::$instance ) ) { - self::$instance = new Admin(); - } - - return self::$instance; - } - - /** - * Grunion_Admin constructor - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->__construct - */ - public function __construct() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->__construct' ); - } - - /** - * Hook handler for admin_enqueue_scripts hook - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->admin_enqueue_scripts - */ - public function admin_enqueue_scripts() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->admin_enqueue_scripts' ); - - return self::$instance->admin_enqueue_scripts(); - } - - /** - * Prints the modal markup with export buttons/content. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->print_export_modal - */ - public function print_export_modal() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->print_export_modal' ); - - return self::$instance->print_export_modal(); - } - - /** - * Ajax handler for wp_ajax_grunion_export_to_gdrive. - * Exports data to Google Drive, based on POST data. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->export_to_gdrive - * @see Grunion_Contact_Form_Plugin::get_feedback_entries_from_post - */ - public function export_to_gdrive() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->export_to_gdrive' ); - - return self::$instance->export_to_gdrive(); - } - - /** - * Return HTML markup for the CSV download button. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->get_csv_export_section - */ - public function get_csv_export_section() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->get_csv_export_section' ); - - return self::$instance->get_csv_export_section(); - } - - /** - * Render/output HTML markup for the export to gdrive section. - * If the user doesn't hold a Google Drive connection a button to connect will render (See grunion-admin.js). - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->get_gdrive_export_section - */ - public function get_gdrive_export_section() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->get_gdrive_export_section' ); - - return self::$instance->get_gdrive_export_section(); - } - - /** - * Ajax handler. Sends a payload with connection status and html to replace - * the Connect button with the Export button using get_gdrive_export_button - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->test_gdrive_connection - */ - public function test_gdrive_connection() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->test_gdrive_connection' ); - - return self::$instance->test_gdrive_connection(); - } - - /** - * Markup helper so we DRY, returns the button markup for the export to GDrive feature. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->get_gdrive_export_button_markup - * @return string The HTML button markup - */ - public function get_gdrive_export_button_markup() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->get_gdrive_export_button_markup' ); - - return self::$instance->get_gdrive_export_button_markup(); - } - - /** - * Get a filename for export tasks - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Admin->get_export_filename - * @param string $source The filtered source for exported data. - * @return string The filename without source nor date suffix. - */ - public function get_export_filename( $source = '' ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Admin->get_export_filename' ); - - return self::$instance->get_export_filename( $source ); - } -} diff --git a/projects/plugins/jetpack/modules/contact-form/class-grunion-contact-form-endpoint.php b/projects/plugins/jetpack/modules/contact-form/class-grunion-contact-form-endpoint.php deleted file mode 100644 index 6b25be680d7bf..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/class-grunion-contact-form-endpoint.php +++ /dev/null @@ -1,47 +0,0 @@ -get_items_permissions_check - * @param WP_REST_Request $request Full details about the request. - * @return WP_Error|boolean - */ - public function get_items_permissions_check( $request ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Endpoint->get_items_permissions_check' ); - - return ( new Contact_Form_Endpoint( $this->post_type ) )->get_items_permissions_check( $request ); - } - - /** - * Check whether a given request has proper authorization to view feedback item. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Endpoint->get_item_permissions_check - * @param WP_REST_Request $request Full details about the request. - * @return WP_Error|boolean - */ - public function get_item_permissions_check( $request ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Endpoint->get_item_permissions_check' ); - - return ( new Contact_Form_Endpoint( $this->post_type ) )->get_item_permissions_check( $request ); - } - } - -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css b/projects/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css deleted file mode 100644 index e15b98efe9bd0..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css +++ /dev/null @@ -1,751 +0,0 @@ -/* ========================================================================== -** Normalize -** ======================================================================== */ - -html { - direction: ltr; -} - -/* Links */ -a, -a:visited { - color: #0087be; - text-decoration: none; -} - -/* ========================================================================== -** Card -** ======================================================================= */ - -.card, -body { - display: block; - position: relative; - margin: 0 auto 10px auto; - padding: 16px; - box-sizing: border-box; - background: white; - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; -} - -body { - margin: 0; - background: #f6f7f7; -} - -.card:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} - -.card:hover, -.card:focus { - box-shadow: 0 0 0 1px #999, 0 1px 2px #e9eff3; -} - -.card .delete-field { - display: block; - float: right; -} - -@media ( min-width: 481px ) { - .card { - margin-bottom: 16px; - padding: 24px; - } - body { - padding: 24px; - } -} - -.card.is-compact { - margin-bottom: 1px; -} - -@media ( min-width: 481px ) { - .card.is-compact { - margin-bottom: 1px; - padding: 16px 24px; - } -} - -.card > div { - margin-top: 24px; -} - -.card > div:first-child { - margin-top: 0; -} - - -/* ========================================================================== -** Labels -** ======================================================================= */ - -label { - display: block; - font-size: 14px; - font-weight: 600; - margin-bottom: 5px; - margin-top: 8px; -} - -label:first-of-type { - margin-top: 4px; -} - - -/* ========================================================================== -** Text Inputs -** ======================================================================= */ - -input[type="text"], -input[type="tel"], -input[type="email"], -input[type="url"] { - border-radius: 0; - appearance: none; - box-sizing: border-box; - margin: 0; - padding: 7px 14px; - width: 100%; - color: #2e4453; - font-size: 16px; - line-height: 1.5; - border: 1px solid #c8d7e1; - background-color: #fff; - transition: all .15s ease-in-out; - box-shadow: none; -} - -input[type="text"]::placeholder, -input[type="tel"]::placeholder, -input[type="email"]::placeholder, -input[type="url"]::placeholder { - color: #87a6bc; -} - -input[type="text"]:hover, -input[type="tel"]:hover, -input[type="email"]:hover, -input[type="url"]:hover { - border-color: #a8bece; -} - -input[type="text"]:focus, -input[type="tel"]:focus, -input[type="email"]:focus, -input[type="url"]:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -input[type="text"]:focus::-ms-clear, -input[type="tel"]:focus::-ms-clear, -input[type="email"]:focus::-ms-clear, -input[type="url"]:focus::-ms-clear { - display: none; -} - -input[type="text"]:disabled, -input[type="tel"]:disabled, -input[type="email"]:disabled, -input[type="url"]:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - -webkit-text-fill-color: #a8bece; -} - -input[type="text"]:disabled:hover, -input[type="tel"]:disabled:hover, -input[type="email"]:disabled:hover, -input[type="url"]:disabled:hover { - cursor: default; -} - -input[type="text"]:disabled::placeholder, -input[type="tel"]:disabled::placeholder, -input[type="email"]:disabled::placeholder, -input[type="url"]:disabled::placeholder { - color: #a8bece; -} - - -/* ========================================================================== -** Textareas -** ======================================================================= */ - -textarea { - border-radius: 0; - appearance: none; - box-sizing: border-box; - margin: 0; - padding: 7px 14px; - height: 92px; - width: 100%; - color: #2e4453; - font-size: 16px; - line-height: 1.5; - border: 1px solid #c8d7e1; - background-color: #fff; - transition: all .15s ease-in-out; - box-shadow: none; -} - -textarea::placeholder { - color: #87a6bc; -} - -textarea:hover { - border-color: #a8bece; -} - -textarea:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -textarea:focus::-ms-clear { - display: none; -} - -textarea:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - -webkit-text-fill-color: #a8bece; -} - -textarea:disabled:hover { - cursor: default; -} - -textarea:disabled::placeholder { - color: #a8bece; -} - - -/* ========================================================================== -** Checkboxes -** ======================================================================= */ - -.checkbox, -input[type="checkbox"] { - -webkit-appearance: none; - display: inline-block; - box-sizing: border-box; - margin: 2px 0 0; - padding: 7px 14px; - width: 16px; - height: 16px; - float: left; - outline: 0; - padding: 0; - box-shadow: none; - background-color: #fff; - border: 1px solid #c8d7e1; - color: #2e4453; - font-size: 16px; - line-height: 0; - text-align: center; - vertical-align: middle; - appearance: none; - transition: all .15s ease-in-out; - clear: none; - cursor: pointer; -} - -.checkbox:checked:before, -input[type="checkbox"]:checked:before { - content: '\f147'; - font-family: Dashicons; - margin: -3px 0 0 -4px; - float: left; - display: inline-block; - vertical-align: middle; - width: 16px; - font-size: 20px; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - speak: none; - color: #00aadc; -} - -.checkbox:disabled:checked:before, -input[type="checkbox"]:disabled:checked:before { - color: #a8bece; -} - -.checkbox:hover, -input[type="checkbox"]:hover { - border-color: #a8bece; -} - -.checkbox:focus, -input[type="checkbox"]:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -.checkbox:disabled, -input[type="checkbox"]:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - opacity: 1; -} - -.checkbox:disabled:hover, -input[type="checkbox"]:disabled:hover { - cursor: default; -} - -.checkbox + span, -input[type="checkbox"] + span { - display: block; - font-weight: normal; - margin-left: 24px; -} - - -/* ========================================================================== -** Radio buttons -** ======================================================================== */ - -.radio-button, -input[type=radio] { - color: #2e4453; - font-size: 16px; - border: 1px solid #c8d7e1; - background-color: #fff; - transition: all .15s ease-in-out; - box-sizing: border-box; - -webkit-appearance: none; - clear: none; - cursor: pointer; - display: inline-block; - line-height: 0; - height: 16px; - margin: 2px 4px 0 0; - float: left; - outline: 0; - padding: 0; - text-align: center; - vertical-align: middle; - width: 16px; - min-width: 16px; - appearance: none; - border-radius: 50%; - line-height: 10px; -} - -.radio-button:hover, -input[type="radio"]:hover { - border-color: #a8bece; -} - -.radio-button:focus, -input[type="radio"]:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -.radio-button:focus::-ms-clear, -input[type="radio"]:focus::-ms-clear { - display: none; -} - -.radio-button:checked:before, -input[type="radio"]:checked:before { - float: left; - display: inline-block; - content: '\2022'; - margin: 3px; - width: 8px; - height: 8px; - text-indent: -9999px; - background: #00aadc; - vertical-align: middle; - border-radius: 50%; - animation: grow .2s ease-in-out; -} - -.radio-button:disabled, -input[type="radio"]:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - opacity: 1; - -webkit-text-fill-color: #a8bece; -} - -.radio-button:disabled:hover, -input[type="radio"]:disabled:hover { - cursor: default; -} - -.radio-button:disabled::placeholder, -input[type="radio"]:disabled::placeholder { - color: #a8bece; -} - -.radio-button:disabled:checked::before, -input[type="radio"]:disabled:checked:before { - background: #e9eff3; -} - -.radio-button + span, -input[type="radio"] + span { - display: block; - font-weight: normal; - margin-left: 24px; -} - -@keyframes grow { - 0% { - transform: scale(0.3); - } - - 60% { - transform: scale(1.15); - } - - 100% { - transform: scale(1); - } -} - -@keyframes grow { - 0% { - transform: scale(0.3); - } - - 60% { - transform: scale(1.15); - } - - 100% { - transform: scale(1); - } -} - - -/* ========================================================================== -** Selects -** ======================================================================== */ - -select { - background: #fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center; - border-color: #c8d7e1; - border-style: solid; - border-radius: 4px; - border-width: 1px 1px 2px; - color: #2e4453; - cursor: pointer; - display: inline-block; - margin: 0; - outline: 0; - overflow: hidden; - font-size: 14px; - line-height: 21px; - font-weight: 600; - text-overflow: ellipsis; - text-decoration: none; - vertical-align: top; - white-space: nowrap; - box-sizing: border-box; - /* Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow. */ - padding: 7px 32px 9px 14px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -select:hover { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==); -} - -select:focus { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=); - border-color: #00aadc; - box-shadow: 0 0 0 2px #78dcfa; - outline: 0; - -moz-outline:none; - -moz-user-focus:ignore; -} - -select:disabled, -select:hover:disabled { - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center;; -} - -select.is-compact { - min-width: 0; - padding: 0 20px 2px 6px; - margin: 0 4px; - background-position: right 5px center; - background-size: 12px 12px; -} - -/* Make it display:block when it follows a label */ -label select, -label + select { - display: block; - min-width: 200px; -} - -label select.is-compact, -label + select.is-compact { - display: inline-block; - min-width: 0; -} - -/* IE: Remove the default arrow */ -select::-ms-expand { - display: none; -} - -/* IE: Remove default background and color styles on focus */ -select::-ms-value { - background: none; - color: #2e4453; -} - -/* Firefox: Remove the focus outline, see http://stackoverflow.com/questions/3773430/remove-outline-from-select-box-in-ff/18853002#18853002 */ -select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 #2e4453; -} - - -/* ========================================================================== -** Buttons -** ======================================================================== */ - -input[type="submit"] { - padding: 0; - font-size: 14px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - vertical-align: baseline; - background: white; - border-color: #c8d7e1; - border-style: solid; - border-width: 1px 1px 2px; - color: #2e4453; - cursor: pointer; - display: inline-block; - margin: 24px 0 0; - outline: 0; - overflow: hidden; - font-weight: 500; - text-overflow: ellipsis; - text-decoration: none; - vertical-align: top; - box-sizing: border-box; - font-size: 14px; - line-height: 21px; - border-radius: 4px; - padding: 7px 14px 9px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -input[type="submit"]:hover { - border-color: #a8bece; - color: #2e4453; -} - -input[type="submit"]:active { - border-width: 2px 1px 1px; -} - -input[type="submit"]:visited { - color: #2e4453; -} - -input[type="submit"][disabled], -input[type="submit"]:disabled { - color: #e9eff3; - background: white; - border-color: #e9eff3; - cursor: default; -} - -input[type="submit"][disabled]:active, -input[type="submit"]:disabled:active { - border-width: 1px 1px 2px; -} - -input[type="submit"]:focus { - border-color: #00aadc; - box-shadow: 0 0 0 2px #78dcfa; -} - -input[type="submit"].hidden { - display: none; -} - -input[type="submit"] .gridicon { - position: relative; - top: 4px; - margin-top: -2px; - width: 18px; - height: 18px; -} - -input[type="submit"].button-primary { - background: #00aadc; - border-color: #008ab3; - color: white; -} - -input[type="submit"].button-primary:hover, -input[type="submit"].button-primary:focus { - border-color: #005082; - color: white; -} - -input[type="submit"].button-primary[disabled], -input[type="submit"].button-primary:disabled { - background: #bceefd; - border-color: #8cc9e2; - color: white; -} - -input[type="submit"].button-primary { - color: white; -} - - -/* ========================================================================== -** Inline editor styles -** ======================================================================== */ - - -.ui-sortable-handle { - cursor: move; -} - -.grunion-section-header { - font-size: 21px; - margin-top: 32px; - font-weight: 600; -} - -.grunion-form-settings:hover { - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; -} - -.grunion-section-header:first-child { - margin-top: 0; -} - -.grunion-type-options { - display: flex; - flex-wrap: wrap; -} - -.grunion-type { - flex-grow: 0; - flex-shrink: 0; -} - -.grunion-type select { - -webkit-appearance: none; - width: 100%; -} - -.grunion-required { - padding: 27px 0 0 16px; - flex-grow: 0; - flex-shrink: 0; -} - -.grunion-options { - padding-top: 16px; -} - -.grunion-options ol { - list-style: none; - padding: 0; - margin: 8px 0 0; -} - -.grunion-options li { - display: flex; - margin-bottom: 16px; -} - -.grunion-field-edit .grunion-options { - display: none; -} - -.delete-option, -.delete-field { - color: #0087be; - text-decoration: none; - width: 40px; - line-height: 40px; - font-size: 21px; - text-align: center; - font-weight: 600; -} - -.delete-field { - position: absolute; - top: 0; - right: 0; -} - -.grunion-controls { - display: flex; - flex-wrap: wrap; -} - -.grunion-update-controls { - text-align: right; - flex-grow: 1; -} - -#add-field { - flex-grow: 0; -} - -.delete-option:before, -.delete-field:before { - font-family: Dashicons; -/* content: "\f158"; /* This is the bolder X */ - content: "\f335"; /* This is the thinner X */ - display: inline-block; - speak: none; -} - -.grunion-field-edit.grunion-field-checkbox-multiple .grunion-options, -.grunion-field-edit.grunion-field-radio .grunion-options, -.grunion-field-edit.grunion-field-select .grunion-options { - display: block; -} - -.screen-reader-text { - position: absolute; - margin: -1px; - padding: 0; - height: 1px; - width: 1px; - overflow: hidden; - clip: rect(0 0 0 0); - border: 0; - word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */ -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/editor-style.css b/projects/plugins/jetpack/modules/contact-form/css/editor-style.css deleted file mode 100644 index d831a045ec87e..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/editor-style.css +++ /dev/null @@ -1,543 +0,0 @@ -/* ========================================================================== -** Card -** ======================================================================= */ - -.card { - display: block; - position: relative; - margin: 0 auto; - padding: 16px; - box-sizing: border-box; - background: white; - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; -} - -.card:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} - -@media ( min-width: 481px ) { - .card { - padding: 24px; - } -} - -.card > div { - margin-top: 24px; -} - -.card > div:first-child { - margin-top: 0; -} - - -/* ========================================================================== -** Labels -** ======================================================================= */ - -label { - display: block; - font-size: 14px; - font-weight: 600; - margin-bottom: 5px; -} - - -/* ========================================================================== -** Text Inputs -** ======================================================================= */ - -input[type="text"], -input[type="tel"], -input[type="email"], -input[type="url"] { - border-radius: 0; - appearance: none; - box-sizing: border-box; - margin: 0; - padding: 7px 14px; - width: 100%; - color: #2e4453; - font-size: 16px; - line-height: 1.5; - border: 1px solid #c8d7e1; - background-color: #fff; - transition: all .15s ease-in-out; - box-shadow: none; -} - -input[type="text"]::placeholder, -input[type="tel"]::placeholder, -input[type="email"]::placeholder, -input[type="url"]::placeholder { - color: #87a6bc; -} - -input[type="text"]:hover, -input[type="tel"]:hover, -input[type="email"]:hover, -input[type="url"]:hover { - border-color: #a8bece; -} - -input[type="text"]:focus, -input[type="tel"]:focus, -input[type="email"]:focus, -input[type="url"]:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -input[type="text"]:focus::-ms-clear, -input[type="tel"]:focus::-ms-clear, -input[type="email"]:focus::-ms-clear, -input[type="url"]:focus::-ms-clear { - display: none; -} - -input[type="text"]:disabled, -input[type="tel"]:disabled, -input[type="email"]:disabled, -input[type="url"]:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - -webkit-text-fill-color: #a8bece; -} - -input[type="text"]:disabled:hover, -input[type="tel"]:disabled:hover, -input[type="email"]:disabled:hover, -input[type="url"]:disabled:hover { - cursor: default; -} - -input[type="text"]:disabled::placeholder, -input[type="tel"]:disabled::placeholder, -input[type="email"]:disabled::placeholder, -input[type="url"]:disabled::placeholder { - color: #a8bece; -} - - -/* ========================================================================== -** Textareas -** ======================================================================= */ - -textarea { - border-radius: 0; - appearance: none; - box-sizing: border-box; - margin: 0; - padding: 7px 14px; - height: 92px; - width: 100%; - color: #2e4453; - font-size: 16px; - line-height: 1.5; - border: 1px solid #c8d7e1; - background-color: #fff; - transition: all .15s ease-in-out; - box-shadow: none; -} - -textarea::placeholder { - color: #87a6bc; -} - -textarea:hover { - border-color: #a8bece; -} - -textarea:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -textarea:focus::-ms-clear { - display: none; -} - -textarea:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - -webkit-text-fill-color: #a8bece; -} - -textarea:disabled:hover { - cursor: default; -} - -textarea:disabled::placeholder { - color: #a8bece; -} - - -/* ========================================================================== -** Checkboxes -** ======================================================================= */ - -input[type="checkbox"] { - -webkit-appearance: none; - display: inline-block; - box-sizing: border-box; - margin: 2px 0 0; - padding: 7px 14px; - width: 16px; - height: 16px; - float: left; - outline: 0; - padding: 0; - box-shadow: none; - background-color: #fff; - border: 1px solid #c8d7e1; - color: #2e4453; - font-size: 16px; - line-height: 0; - text-align: center; - vertical-align: middle; - appearance: none; - transition: all .15s ease-in-out; - clear: none; - cursor: pointer; -} - -input[type="checkbox"]:checked:before { - content: '\f147'; - font-family: Dashicons; - margin: -3px 0 0 -4px; - float: left; - display: inline-block; - vertical-align: middle; - width: 16px; - font-size: 20px; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - speak: none; - color: #00aadc; -} - -input[type="checkbox"]:disabled:checked:before { - color: #a8bece; -} - -input[type="checkbox"]:hover { - border-color: #a8bece; -} - -input[type="checkbox"]:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -input[type="checkbox"]:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - opacity: 1; -} - -input[type="checkbox"]:disabled:hover { - cursor: default; -} - -input[type="checkbox"] + span { - display: block; - font-weight: normal; - margin-left: 24px; -} - - -/* ========================================================================== -** Radio buttons -** ======================================================================== */ - -input[type=radio] { - color: #2e4453; - font-size: 16px; - border: 1px solid #c8d7e1; - background-color: #fff; - transition: all .15s ease-in-out; - box-sizing: border-box; - -webkit-appearance: none; - clear: none; - cursor: pointer; - display: inline-block; - line-height: 0; - height: 16px; - margin: 2px 4px 0 0; - float: left; - outline: 0; - padding: 0; - text-align: center; - vertical-align: middle; - width: 16px; - min-width: 16px; - appearance: none; - border-radius: 50%; - line-height: 10px; -} - -input[type="radio"]:hover { - border-color: #a8bece; -} - -input[type="radio"]:focus { - border-color: #0087be; - outline: none; - box-shadow: 0 0 0 2px #78dcfa; -} - -input[type="radio"]:focus::-ms-clear { - display: none; -} - -input[type="radio"]:checked:before { - float: left; - display: inline-block; - content: '\2022'; - margin: 3px; - width: 8px; - height: 8px; - text-indent: -9999px; - background: #00aadc; - vertical-align: middle; - border-radius: 50%; - animation: grow .2s ease-in-out; -} - -input[type="radio"]:disabled { - background: #f3f6f8; - border-color: #e9eff3; - color: #a8bece; - opacity: 1; - -webkit-text-fill-color: #a8bece; -} - -input[type="radio"]:disabled:hover { - cursor: default; -} - -input[type="radio"]:disabled::placeholder { - color: #a8bece; -} - -input[type="radio"]:disabled:checked:before { - background: #e9eff3; -} - -input[type="radio"] + span { - display: block; - font-weight: normal; - margin-left: 24px; -} - -@keyframes grow { - 0% { - transform: scale(0.3); - } - - 60% { - transform: scale(1.15); - } - - 100% { - transform: scale(1); - } -} - -@keyframes grow { - 0% { - transform: scale(0.3); - } - - 60% { - transform: scale(1.15); - } - - 100% { - transform: scale(1); - } -} - - -/* ========================================================================== -** Selects -** ======================================================================== */ - -select { - background: #fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center; - border-color: #c8d7e1; - border-style: solid; - border-radius: 4px; - border-width: 1px 1px 2px; - color: #2e4453; - cursor: pointer; - display: inline-block; - margin: 0; - outline: 0; - overflow: hidden; - font-size: 14px; - line-height: 21px; - font-weight: 600; - text-overflow: ellipsis; - text-decoration: none; - vertical-align: top; - white-space: nowrap; - box-sizing: border-box; - /* Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow. */ - padding: 7px 32px 9px 14px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -select:hover { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==); -} - -select:focus { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=); - border-color: #00aadc; - box-shadow: 0 0 0 2px #78dcfa; - outline: 0; - -moz-outline:none; - -moz-user-focus:ignore; -} - -select:disabled, -select:hover:disabled { - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center;; -} - -select.is-compact { - min-width: 0; - padding: 0 20px 2px 6px; - margin: 0 4px; - background-position: right 5px center; - background-size: 12px 12px; -} - -/* Make it display:block when it follows a label */ -label select, -label + select { - display: block; - min-width: 200px; -} - -label select.is-compact, -label + select.is-compact { - display: inline-block; - min-width: 0; -} - -/* IE: Remove the default arrow */ -select::-ms-expand { - display: none; -} - -/* IE: Remove default background and color styles on focus */ -select::-ms-value { - background: none; - color: #2e4453; -} - -/* Firefox: Remove the focus outline, see http://stackoverflow.com/questions/3773430/remove-outline-from-select-box-in-ff/18853002#18853002 */ -select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 #2e4453; -} - - -/* ========================================================================== -** Buttons -** ======================================================================== */ - -input[type="submit"] { - padding: 0; - font-size: 14px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - vertical-align: baseline; - background: white; - border-color: #c8d7e1; - border-style: solid; - border-width: 1px 1px 2px; - color: #2e4453; - cursor: pointer; - display: inline-block; - margin: 24px 0 0; - outline: 0; - overflow: hidden; - font-weight: 500; - text-overflow: ellipsis; - text-decoration: none; - vertical-align: top; - box-sizing: border-box; - font-size: 14px; - line-height: 21px; - border-radius: 4px; - padding: 7px 14px 9px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -input[type="submit"]:hover { - border-color: #a8bece; - color: #2e4453; -} - -input[type="submit"]:active { - border-width: 2px 1px 1px; -} - -input[type="submit"]:visited { - color: #2e4453; -} - -input[type="submit"][disabled], -input[type="submit"]:disabled { - color: #e9eff3; - background: white; - border-color: #e9eff3; - cursor: default; -} - -input[type="submit"][disabled]:active, -input[type="submit"]:disabled:active { - border-width: 1px 1px 2px; -} - -input[type="submit"]:focus { - border-color: #00aadc; - box-shadow: 0 0 0 2px #78dcfa; -} - -/* ========================================================================== -** Preview styles -** ======================================================================== */ - -.wpview.wpview-wrap[data-wpview-type=contact-form] iframe.inline-edit-contact-form { - width: 100%; - min-height: 500px; - border: 0; - overflow: hidden; - margin-bottom: 0; - display: block; -} - -.contact-submit.contact-submit { - margin-top: 0; - margin-bottom: 0; -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/editor-ui.css b/projects/plugins/jetpack/modules/contact-form/css/editor-ui.css deleted file mode 100644 index 18989ff0a88c5..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/editor-ui.css +++ /dev/null @@ -1,18 +0,0 @@ -i.mce-i-grunion { - font-size: 20px; - font-family: dashicons; -} - -i.mce-i-grunion:before, -.jetpack-contact-form-icon:before { - content: '\f175'; - vertical-align: top; -} - -.jetpack-contact-form-icon { - opacity: 0.7; - vertical-align: text-top; - display: inline-block; - height: 18px; - font: 18px/1 dashicons; -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/grunion-admin.css b/projects/plugins/jetpack/modules/contact-form/css/grunion-admin.css deleted file mode 100644 index f68eaeebc8d12..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/grunion-admin.css +++ /dev/null @@ -1,245 +0,0 @@ -.add-new-h2, .view-switch, body.no-js .tablenav select[name^=action], body.no-js #doaction, body.no-js #doaction2 { - display: none -} - -.column-feedback_from img { - float:left; - margin-right:10px; - margin-top:3px; -} - -.widefat .column-feedback_from, -.widefat .column-feedback_date, -.widefat .column-feedback_source { - width: 17%; -} -.widefat .column-feedback_response { - width: 100%; -} - -.widefat .column-feedback_response::before { - display: none !important; -} - -@media screen and (max-width: 782px) { - .widefat .column-feedback_response { - padding-left: 8px !important; - } -} - -.column-feedback_response .feedback_response__item { - display: grid; - grid-template-columns: 35% 1fr; - grid-row-gap: 8px; -} -.column-feedback_response .feedback_response__item-key, -.column-feedback_response .feedback_response__item-value { - align-items: flex-start; - display: flex; - word-break: break-word; -} -.column-feedback_response .feedback_response__item-value { - font-weight: bold; -} - -.column-feedback_response .feedback_response__mobile-separator { - display: block; -} - -@media screen and (min-width: 783px) { - .column-feedback_response .feedback_response__mobile-separator { - display: none; - } -} - -.spam a { - color: #BC0B0B; -} - -.untrash a { - color: #D98500; -} - -.unspam a { - color: #D98500; -} - -.post-type-feedback #jetpack-check-feedback-spam { - margin-top: 0; -} - -/* Modal styles */ - -/* Override Thickbox defaults */ -#TB_overlay { - opacity: 0.5; -} - -#TB_title { - border: none; - background: none; -} - -#TB_ajaxWindowTitle { - display: none; -} - -#TB_ajaxContent { - display: flex; -} - -.feedback-export-modal__wrapper { - display: flex; - flex-direction: column; - /* These strange paddings to add 48px with TB defaults */ - padding: 0 33px 9px 33px; - width: 100%; -} - -.feedback-export-modal__header { - margin-bottom: 32px; -} - -.feedback-export-modal__header-title { - font-style: normal; - font-weight: 700; - font-size: 24px; - line-height: 32px; - margin-bottom: 8px; -} - -#TB_ajaxContent p.feedback-export-modal__header-subtitle { - font-style: normal; - font-weight: 400; - font-size: 16px; - line-height: 24px; - letter-spacing: -0.02em; - color: #000000; - padding: 0; - margin-top: 8px; -} - -.feedback-export-modal__content { - display: flex; - flex-grow: 1; - flex-direction: column; - padding: 0px; - gap: 32px; -} - -.feedback-export-modal__footer { - display: flex; - justify-content: space-between; - padding: 0 16px; -} - -.feedback-export-modal__footer-column { - display: flex; - align-items: center; -} - -/* override JP logo */ -.feedback-export-modal__footer #jetpack-logo__icon { - width: 16px; - height: 16px; -} - -.feedback-export-modal__footer #jetpack-logo__icon path { - fill: #000000; -} - -.feedback-export-modal__footer .feedback-export-modal__footer-link { - padding-left: 8px; - font-size: 12px; - font-weight: 600; - line-height: 0; - letter-spacing: -0.02em; - text-align: left; - color: #23282D; - text-decoration: none; -} - -.export-card { - border-radius: var(--jp-border-radius, 4px); - box-shadow: 0 0 0 1px var(--jp-gray-10, #c3c4c7) inset; - display: flex; - flex-direction: column; - padding: 24px; - isolation: isolate; -} - -.export-card__body, .export-card__header { - display: flex; -} - -.export-card__header { - align-items: center; - margin-bottom: 16px; - gap: 16px; -} - -.export-card__header-title { - font-style: normal; - font-weight: 700; - font-size: 20px; - line-height: 30px; -} - -.export-card__body { - gap: 32px; - align-items: center; - justify-content: space-between; -} - -.export-card__body-description { - flex-grow: 1; - font-style: normal; - font-weight: 400; - font-size: 14px; - line-height: 24px; - letter-spacing: -0.02em; - color: #000000; - max-width: 60%; -} - -.export-card__body-description a { - color: inherit; -} - -.export-card__body-description-footer { - font-style: normal; - font-weight: 400; - font-size: 12px; - line-height: 150%; - color: #757575; - margin-bottom: 0px; -} - -.export-card__body-cta { - align-self: flex-end; -} - -.export-card__body-cta .button-primary.export-button { - font-style: normal; - font-weight: 400; - letter-spacing: -0.01em; - color: #FFFFFF; - background: #000000; - border: 1px solid #FFFFFF; - border-radius: 4px; -} - -.export-card__beta-badge { - background: #2FB41F; - border-radius: 2px; - font-style: normal; - font-weight: 600; - font-size: 11px; - line-height: 150%; - /* identical to box height, or 16px */ - - text-align: right; - text-transform: uppercase; - padding: 4px 8px; - color: #FFFFFF; -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/grunion.css b/projects/plugins/jetpack/modules/contact-form/css/grunion.css deleted file mode 100644 index 0f6dadb6dc7d0..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/grunion.css +++ /dev/null @@ -1,602 +0,0 @@ -:root { - --jetpack--contact-form--border: 1px solid #8c8f94; - --jetpack--contact-form--border-color: #8c8f94; - --jetpack--contact-form--border-size: 1px; - --jetpack--contact-form--border-style: solid; - --jetpack--contact-form--border-radius: 0px; - --jetpack--contact-form--input-padding: 16px; - --jetpack--contact-form--font-size: 16px; -} - -.contact-form .clear-form { - clear: both; -} - -.contact-form input::placeholder { - transition: opacity 0.3s ease-out; -} -.contact-form input:hover::placeholder { - opacity: 0.5; -} -.contact-form input:focus::placeholder { - opacity: 0.3; -} - -/* - Using :where we will keep a lower CSS specificity, - allowing themes to easily override these styles - */ -:where( - .contact-form input[type='text'], - .contact-form input[type='email'], - .contact-form input[type='tel'], - .contact-form input[type='url'], - .contact-form textarea -) { - box-sizing: border-box; - width: 100%; - padding: 16px; - font: inherit; - border: 1px solid #8c8f94; - border-radius: 0; -} - -:where(.contact-form textarea) { - height: 200px; -} - -.contact-form :where(.grunion-field[type="text"], .grunion-field.textarea) { - padding-left: max(var(--jetpack--contact-form--input-padding-left, 16px), var(--jetpack--contact-form--border-radius)); - padding-right: max(var(--jetpack--contact-form--input-padding-left, 16px), var(--jetpack--contact-form--border-radius)); -} - -.contact-form .grunion-field-wrap input, -.contact-form .grunion-field-wrap textarea { - margin: 0; -} - -.contact-form select { - padding: 14px 7px; - min-width: 150px; -} - -/* - On Grunion Forms, the regular HTML select is replaced by a custom select by jQuery UI. - To keep the required validation working the select can't be 'display: none' - This solution will keep the select hidden without using 'display: none' - */ -.contact-form .contact-form-dropdown[aria-hidden="true"] { - position: absolute; - z-index: -1; - width: 100%; - display: block !important; - opacity: 0; - pointer-events: none; -} - -.contact-form :where(input[type='radio'], input[type='checkbox']) { - width: 1rem; - height: 1rem; - float: none; -} - -.contact-form input[type='radio'], -.contact-form input[type='checkbox'] { - margin: 0 0.75rem 0 0; -} - -.contact-form input[type='checkbox'] { - top: 0; - margin-left: 0; -} - -.contact-form label { - margin-bottom: 0.25em; - float: none; - font-weight: bold; - display: block; -} - -.contact-form label.consent { - font-size: 13px; - font-weight: normal; - text-transform: uppercase; - display: flex; - align-items: center; -} - -.contact-form label.consent-implicit input { - display: none; -} - -.contact-form label.checkbox, -.contact-form label.checkbox-multiple, -.contact-form label.radio { - margin-bottom: 0; - float: none; - font-weight: normal; - display: inline-flex; - align-items: center; - line-height: 1; -} - -.contact-form .grunion-checkbox-multiple-options, -.contact-form .grunion-radio-options { - display: flex; - flex-direction: column; - gap: 12px; -} - -.contact-form label span.grunion-label-required { - font-size: 85%; - margin-left: 0.25em; - font-weight: normal; - opacity: 0.45; -} - -.contact-form-submission { - margin-bottom: 4em; - padding: 1.5em 1em; - width: 100%; - border-top: 1px solid #000; - border-bottom: 1px solid #000; -} - -.contact-form-submission p { - margin: 0 auto; - word-wrap: break-word; -} - -.contact-form-submission h4 { - margin-top: 32px; - margin-bottom: 32px; - font-weight: 200; -} - -.contact-form-submission .go-back-message { - margin-top: 20px; - margin-bottom: 32px; - text-align: left; -} - -.contact-form-submission .go-back-message .link { - font-weight: 200; - color: #000; -} - -.contact-form-submission .field-name { - font-weight: 200; -} - -.contact-form-submission .field-value { - margin-bottom: 20px; - font-weight: 600; -} - -.form-errors .form-error-message { - color: red; -} - -.textwidget .contact-form input[type='text'], -.textwidget .contact-form input[type='email'], -.textwidget .contact-form input[type='tel'], -.textwidget .contact-form input[type='url'], -.textwidget .contact-form textarea, -.wp-block-column .contact-form input[type='text'], -.wp-block-column .contact-form input[type='email'], -.wp-block-column .contact-form input[type='tel'], -.wp-block-column .contact-form input[type='url'], -.wp-block-column .contact-form textarea { - width: 100%; -} - -#jetpack-check-feedback-spam { - margin: 1px 8px 0px 0px; -} - -.jetpack-check-feedback-spam-spinner { - display: inline-block; - margin-top: 7px; -} - -.wp-block-jetpack-contact-form { - display: flex; - flex-wrap: wrap; - justify-content: flex-start; - flex-direction: row; - flex-grow: 1; - gap: var(--wp--style--block-gap, 1.5rem); -} - -.wp-block-jetpack-contact-form > * { - flex: 0 0 100%; - box-sizing: border-box; -} - -/* Added circa Nov 2022: container class assigned to topmost block div */ -.wp-block-jetpack-contact-form-container.alignfull .wp-block-jetpack-contact-form { - padding-right: 0; - padding-left: 0; -} - -.wp-block-jetpack-button.alignright button { - float: right; -} - -.wp-block-jetpack-contact-form .grunion-field-wrap { - box-sizing: border-box; - position: relative; -} - -.wp-block-jetpack-contact-form .grunion-field-width-25-wrap { - flex: 1 1 calc( 25% - calc(var(--wp--style--block-gap, 1.5rem) * 1) ); - max-width: 25%; -} - -.wp-block-jetpack-contact-form .grunion-field-width-50-wrap { - flex: 1 1 calc( 50% - calc(var(--wp--style--block-gap, 1.5rem) * 1) ); - max-width: 50%; -} - -.wp-block-jetpack-contact-form .grunion-field-width-75-wrap { - flex: 1 1 calc( 75% - calc(var(--wp--style--block-gap, 1.5rem) * 1) ); - max-width: 75%; -} - -.grunion-field-checkbox-wrap, -.grunion-field-consent-wrap { - align-self: center; -} - -@media only screen and ( min-width: 600px ) { - .contact-form input[type='text'], - .contact-form input[type='email'], - .contact-form input[type='tel'], - .contact-form input[type='url'] { - width: 50%; - } - - /**** - * Older users keep the 50% width to avoid breaking - * designs, but newer users using the contact - * form block get 100% width. - */ - .wp-block-jetpack-contact-form input[type='text'], - .wp-block-jetpack-contact-form input[type='email'], - .wp-block-jetpack-contact-form input[type='tel'], - .wp-block-jetpack-contact-form input[type='url'] { - width: 100%; - } -} - -/** For the "Empty Spam" button on /wp-admin/edit.php?post_status=spam&post_type=feedback **/ -.jetpack-empty-spam-container { - display: inline-block; -} -.jetpack-empty-spam { - display: inline-block; -} -.jetpack-empty-spam-spinner { - display: inline-block; - margin-top: 7px; -} - -/* Make sure the set height of the Spacer block nested inside the Contact Form block is respected */ -.wp-block-jetpack-contact-form .wp-block-spacer { - width: 100%; -} - -.contact-form .contact-form-dropdown__button.ui-button { - width: 100%; - box-sizing: border-box; - display: flex; - align-items: center; - flex-direction: row-reverse; - justify-content: space-between; - border: var(--jetpack--contact-form--border); - border-color: var(--jetpack--contact-form--border-color); - border-style: var(--jetpack--contact-form--border-style); - border-width: var(--jetpack--contact-form--border-size); - border-radius: var(--jetpack--contact-form--border-radius); - background-color: var(--jetpack--contact-form--input-background); - color: var(--jetpack--contact-form--text-color); - font-size: var(--jetpack--contact-form--font-size); - font-family: var(--jetpack--contact-form--font-family); - line-height: var(--jetpack--contact-form--line-height); - padding: var(--jetpack--contact-form--input-padding); -} - -.contact-form .contact-form-dropdown__button.ui-button .ui-selectmenu-icon.ui-icon { - background: none; -} - -.contact-form .contact-form-dropdown__button .ui-selectmenu-icon, -.contact-form .contact-form-dropdown__button.ui-selectmenu-button-open .ui-selectmenu-icon { - width: 0.8em; - height: 0.8em; - position: relative; - display: flex; - align-items: center; - justify-content: center; - box-sizing: border-box; - border: 2px solid transparent; - overflow: visible; - margin-right: 4px; -} - -.contact-form .contact-form-dropdown__button .ui-selectmenu-icon::after { - content: ""; - display: block; - box-sizing: border-box; - width: 100%; - height: 100%; - border-bottom: 2px solid; - border-right: 2px solid; - transform: rotate(45deg); - margin-top: -5px; - transition: all 0.2s ease-in-out; -} - -.contact-form .contact-form-dropdown__button.ui-selectmenu-button-open .ui-selectmenu-icon::after { - transform: rotate(225deg); - margin-top: 8px; -} -.contact-form .contact-form-dropdown__menu { - z-index: 1; -} - -.contact-form .contact-form-dropdown__menu ul.ui-menu { - border: var(--jetpack--contact-form--border); - border-color: var(--jetpack--contact-form--border-color); - border-style: var(--jetpack--contact-form--border-style); - border-width: var(--jetpack--contact-form--border-size); - border-radius: var(--jetpack--contact-form--border-radius); - background-color: var(--jetpack--contact-form--input-background-fallback); - color: var(--jetpack--contact-form--text-color); - font-size: var(--jetpack--contact-form--font-size); - font-family: var(--jetpack--contact-form--font-family); - max-height: 230px; - overflow: auto; - padding: 0; - line-height: normal; - box-shadow: 0 2px 6px rgb(0 0 0 / 5%); - list-style: none; - margin: 0; -} - -.contact-form .contact-form-dropdown__menu .ui-menu-item { - margin: 0; -} - -.contact-form .contact-form-dropdown__menu .ui-menu { - margin-top: 8px; -} - -.contact-form .contact-form-dropdown__menu .ui-menu .ui-menu-item-wrapper { - padding: var(--jetpack--contact-form--input-padding); -} - -.contact-form .contact-form-dropdown__menu .ui-menu .ui-menu-item-wrapper.ui-state-active { - position: relative; - border: none; - color: var(--jetpack--contact-form--input-background-fallback); - background-color: var(--jetpack--contact-form--text-color); -} - - -.contact-form .is-style-outlined .grunion-field-wrap:not(.grunion-field-checkbox-wrap):not(.grunion-field-consent-wrap), -.contact-form .is-style-animated .grunion-field-wrap:not(.grunion-field-checkbox-wrap):not(.grunion-field-consent-wrap) { - --notch-width: max(var(--jetpack--contact-form--input-padding-left, 16px), var(--jetpack--contact-form--border-radius)); - position: relative; - display: flex; - flex-direction: row-reverse; -} - -.contact-form .is-style-outlined .grunion-field-checkbox-multiple-wrap, -.contact-form .is-style-outlined .grunion-field-radio-wrap { - background-color: var(--jetpack--contact-form--input-background); -} - -.contact-form .is-style-outlined .grunion-field-wrap .grunion-checkbox-multiple-options, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-radio-options -{ - padding: var(--jetpack--contact-form--input-padding, 16px); - padding-top: calc(var(--jetpack--contact-form--input-padding-top, 16px) + 4px); - flex-grow: 1; -} - -.contact-form .is-style-outlined .grunion-field-wrap .notched-label { - position: absolute; - right: 0; - left: 0; - width: 100%; - max-width: 100%; - height: 100%; - display: flex; - box-sizing: border-box; - text-align: left; - pointer-events: none; -} - -.contact-form .is-style-outlined .grunion-field-wrap .notched-label .notched-label__leading { - width: var(--notch-width); - border-radius: var(--jetpack--contact-form--border-radius); - border: var(--jetpack--contact-form--border); - border-color: var(--jetpack--contact-form--border-color); - border-style: var(--jetpack--contact-form--border-style); - border-width: var(--jetpack--contact-form--border-size); - border-right: none; - border-top-right-radius: unset; - border-bottom-right-radius: unset; -} - -.contact-form .is-style-outlined .grunion-field-wrap .notched-label .notched-label__notch { - border-radius: unset; - border: var(--jetpack--contact-form--border); - border-color: var(--jetpack--contact-form--border-color); - border-style: var(--jetpack--contact-form--border-style); - border-width: var(--jetpack--contact-form--border-size); - padding: 0 4px; - transition: border 150ms linear; -} - -/* -For some reason, when keeping the rule below together with the above selector, -on production builds, the attributes are being reordered, causing side-effects -*/ -.contact-form .is-style-outlined .grunion-field-wrap .notched-label .notched-label__notch { - border-left: none; - border-right: none; -} - -.contact-form .is-style-outlined .grunion-field-wrap.no-label .notched-label__notch { - padding: 0; -} - -.contact-form .is-style-outlined .grunion-field-wrap .notched-label .notched-label__label { - position: relative; - top: 50%; - transform: translateY(-50%); - pointer-events: none; - will-change: transform; - transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); - margin: 0; - font-weight: 300; -} - -.contact-form .is-style-outlined .grunion-field-textarea-wrap .notched-label .notched-label__label { - top: var(--jetpack--contact-form--input-padding-top, 16px); - transform: unset; -} - -.contact-form .is-style-outlined .grunion-field-wrap .notched-label .notched-label__trailing { - flex-grow: 1; - border-radius: var(--jetpack--contact-form--border-radius); - border: var(--jetpack--contact-form--border); - border-color: var(--jetpack--contact-form--border-color); - border-style: var(--jetpack--contact-form--border-style); - border-width: var(--jetpack--contact-form--border-size); - border-left: none; - border-top-left-radius: unset; - border-bottom-left-radius: unset; -} - -.contact-form .is-style-outlined .grunion-field-wrap .grunion-field:focus ~ .notched-label .notched-label__notch, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-field:not(:placeholder-shown) ~ .notched-label .notched-label__notch, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-field.has-placeholder ~ .notched-label .notched-label__notch, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-checkbox-multiple-options ~ .notched-label .notched-label__notch, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-radio-options ~ .notched-label .notched-label__notch -{ - border-top-color: transparent; -} - -.contact-form .is-style-outlined .grunion-field-wrap .grunion-field:focus ~ .notched-label .notched-label__label, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-field:not(:placeholder-shown) ~ .notched-label .notched-label__label, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-field.has-placeholder ~ .notched-label .notched-label__label, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-checkbox-multiple-options ~ .notched-label .notched-label__label, -.contact-form .is-style-outlined .grunion-field-wrap .grunion-radio-options ~ .notched-label .notched-label__label -{ - top: calc(var(--jetpack--contact-form--border-size) * -1); - transform: translateY(-50%); - font-size: 0.8em; -} - -.contact-form .is-style-outlined .grunion-field-wrap > input, -.contact-form .is-style-outlined .grunion-field-wrap > textarea, -.contact-form .is-style-outlined .grunion-field-wrap .contact-form-dropdown__button -{ - border-color: transparent !important; /* Need to override styles coming from the style attribute*/ - outline: none; - padding-left: calc(var(--notch-width) + 4px); - padding-right: calc(var(--notch-width) + 4px); -} - -.contact-form .is-style-outlined .grunion-field-wrap textarea { - padding: var(--jetpack--contact-form--input-padding, 16px); - padding-left: calc(var(--notch-width) + 4px); - padding-right: calc(var(--notch-width) + 4px); -} - -.contact-form .is-style-outlined .contact-form-dropdown__menu .ui-menu-item-wrapper { - padding-left: calc(var(--notch-width) + 4px); - padding-right: calc(var(--notch-width) + 4px); -} - -.contact-form .is-style-animated .grunion-field-wrap { - --left-offset: calc(var(--jetpack--contact-form--input-padding-left, 16px) + var(--jetpack--contact-form--border-size)); - --label-left: max(var(--left-offset), var(--jetpack--contact-form--border-radius)); - --field-padding: calc(var(--label-left) - var(--jetpack--contact-form--border-size)); -} - -.contact-form .is-style-animated .grunion-field-wrap input { - outline: none; -} - -.contact-form .is-style-animated .grunion-field-wrap textarea { - padding: var(--jetpack--contact-form--input-padding, 16px); - outline: none; -} - -.contact-form .is-style-animated .grunion-field-wrap:not(.no-label) > input, -.contact-form .is-style-animated .grunion-field-wrap:not(.no-label) > textarea, -.contact-form .is-style-animated .grunion-field-wrap:not(.no-label) .contact-form-dropdown__button -{ - padding-top: 1.4em; - padding-left: var(--field-padding); - padding-right: var(--field-padding); -} - -.contact-form .is-style-animated .grunion-field-wrap .contact-form-dropdown__menu .ui-menu-item-wrapper { - padding-left: var(--field-padding); - padding-right: var(--field-padding); -} - -.contact-form .is-style-animated .grunion-field-checkbox-multiple-wrap, -.contact-form .is-style-animated .grunion-field-radio-wrap { - background-color: var(--jetpack--contact-form--input-background); -} - -.contact-form .is-style-animated .grunion-field-checkbox-multiple-wrap .grunion-checkbox-multiple-options, -.contact-form .is-style-animated .grunion-field-radio-wrap .grunion-radio-options { - padding-bottom: var(--jetpack--contact-form--input-padding, 16px); - padding-top: 1.8em; - flex-grow: 1 -} - -.contact-form .is-style-animated .grunion-field-wrap .animated-label__label { - position: absolute; - top: 50%; - left: var(--label-left); - width: 100%; - max-width: 100%; - box-sizing: border-box; - pointer-events: none; - margin: 0; - transform: translateY(-50%); - transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); -} - -.contact-form .is-style-animated .grunion-field-textarea-wrap .animated-label__label { - transform: unset; - top: var(--jetpack--contact-form--input-padding-top, 16px); -} - -.contact-form .is-style-animated .grunion-field-wrap .grunion-field:focus ~ .animated-label__label, -.contact-form .is-style-animated .grunion-field-wrap .grunion-field:not(:placeholder-shown) ~ .animated-label__label, -.contact-form .is-style-animated .grunion-field-wrap .grunion-field.has-placeholder ~ .animated-label__label -{ - font-size: 0.75em; - transform: translateY(0); - top: calc(2px + var(--jetpack--contact-form--border-size)); -} - -.contact-form .is-style-animated .grunion-field-wrap .grunion-checkbox-multiple-options ~ .animated-label__label, -.contact-form .is-style-animated .grunion-field-wrap .grunion-radio-options ~ .animated-label__label { - top: 0; - left: 0; - transform: translateY(0); -} - -.contact-form .is-style-below .grunion-field-wrap .below-label__label { - margin-left: var(--jetpack--contact-form--border-size); -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/jquery-ui-datepicker.css b/projects/plugins/jetpack/modules/contact-form/css/jquery-ui-datepicker.css deleted file mode 100644 index 10024b6feade7..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/jquery-ui-datepicker.css +++ /dev/null @@ -1,160 +0,0 @@ -.ui-datepicker { - padding: 0; - margin: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - background-color: #fff; - border: 1px solid #dcdcde; - border-top: none; - -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075); - width: auto; -} - -.ui-datepicker * { - padding: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.ui-datepicker table { - width: auto; - margin: 0; - border: none; - border-collapse: collapse; -} - -.ui-datepicker .ui-widget-header, -.ui-datepicker .ui-datepicker-header { - background-image: none; - border: none; - font-weight: normal; -} - -.ui-datepicker .ui-datepicker-header .ui-state-hover { - background: transparent; - border-color: transparent; - cursor: pointer; -} - -.ui-datepicker .ui-datepicker-title { - margin: 0; - padding: 10px 0; - font-size: 14px; - line-height: 14px; - text-align: center; -} - -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-next { - position: relative; - top: 0; - height: 34px; - width: 34px; -} - -.ui-datepicker .ui-state-hover.ui-datepicker-prev, -.ui-datepicker .ui-state-hover.ui-datepicker-next { - border: none; -} - -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-prev-hover { - left: 0; -} - -.ui-datepicker .ui-datepicker-next, -.ui-datepicker .ui-datepicker-next-hover { - right: 0; -} - -.ui-datepicker .ui-datepicker-next span, -.ui-datepicker .ui-datepicker-prev span { - display: none; -} - -.ui-datepicker .ui-datepicker-prev { - float: left; -} - -.ui-datepicker .ui-datepicker-next { - float: right; -} - -.ui-datepicker .ui-datepicker-prev:before, -.ui-datepicker .ui-datepicker-next:before { - font: normal 20px/34px 'dashicons'; - padding-left: 7px; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - width: 34px; - height: 34px; -} - -.ui-datepicker .ui-datepicker-prev:before { - content: '\f341'; -} - -.ui-datepicker .ui-datepicker-next:before { - content: '\f345'; -} - -.ui-datepicker .ui-datepicker-prev-hover:before, -.ui-datepicker .ui-datepicker-next-hover:before { - opacity: 0.7; -} - -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { - width: 33%; -} - -.ui-datepicker thead { - font-weight: 600; -} - -.ui-datepicker th { - padding: 10px; - border-width: 1px; -} - -.ui-datepicker td { - padding: 0; - border: 1px solid #f4f4f4; -} - -.ui-datepicker td.ui-datepicker-other-month { - border: transparent; -} - -.ui-datepicker td.ui-datepicker-week-end { - background-color: #f4f4f4; - border: 1px solid #f4f4f4; -} - -.ui-datepicker td.ui-datepicker-today { - background-color: #f0f0c0; -} - -.ui-datepicker td.ui-datepicker-current-day { - background: #bbdd88; -} - -.ui-datepicker td .ui-state-default { - background: transparent; - border: none; - text-align: center; - text-decoration: none; - width: auto; - display: block; - padding: 5px 10px; - font-weight: normal; - color: #444; -} - -.ui-datepicker td.ui-state-disabled .ui-state-default { - opacity: 0.5; -} diff --git a/projects/plugins/jetpack/modules/contact-form/css/jquery-ui-selectmenu.css b/projects/plugins/jetpack/modules/contact-form/css/jquery-ui-selectmenu.css deleted file mode 100644 index bffb2a5f418a8..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/css/jquery-ui-selectmenu.css +++ /dev/null @@ -1,40 +0,0 @@ -.ui-selectmenu-menu { - padding: 0; - margin: 0; - position: absolute; - top: 0; - left: 0; - display: none; -} -.ui-selectmenu-menu .ui-menu { - overflow: auto; - overflow-x: hidden; - padding-bottom: 1px; -} -.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { - font-size: 1em; - font-weight: bold; - line-height: 1.5; - padding: 2px 0.4em; - margin: 0.5em 0 0 0; - height: auto; - border: 0; -} -.ui-selectmenu-open { - display: block; -} -.ui-selectmenu-text { - display: block; - margin-right: 20px; - overflow: hidden; - text-overflow: ellipsis; -} -.ui-selectmenu-button.ui-button { - text-align: left; - white-space: nowrap; - width: 14em; -} -.ui-selectmenu-icon.ui-icon { - float: right; - margin-top: 0; -} diff --git a/projects/plugins/jetpack/modules/contact-form/grunion-contact-form.php b/projects/plugins/jetpack/modules/contact-form/grunion-contact-form.php deleted file mode 100644 index 36b0b1792386f..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/grunion-contact-form.php +++ /dev/null @@ -1,2247 +0,0 @@ -daily_akismet_meta_cleanup - */ - public function daily_akismet_meta_cleanup() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->daily_akismet_meta_cleanup' ); - - return self::$instance->daily_akismet_meta_cleanup(); - } - - /** - * Strips HTML tags from input. Output is NOT HTML safe. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::strip_tags - * @param mixed $data_with_tags - data we're stripping HTML tags from. - * @return mixed - */ - public static function strip_tags( $data_with_tags ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::strip_tags' ); - - return Contact_Form_Plugin::strip_tags( $data_with_tags ); - } - - /** - * Prevent 'contact-form-styles' script from being concatenated. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm - * @param array $do_concat - the concatenation flag. - * @param string $handle - script name. - */ - public static function disable_forms_style_script_concat( $do_concat, $handle ) { - _deprecated_function( __METHOD__, 'jetpack-13.3' ); - - if ( 'jetpack-block-contact-form' === $handle ) { - $do_concat = false; - } - return $do_concat; - } - - /** - * Register the contact form block. - */ - private static function register_contact_form_blocks() { - Contact_Form_Block::register_child_blocks(); - } - - /** - * Render the gutenblock form. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\ontact_Form_Block::gutenblock_render_form - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string - */ - public static function gutenblock_render_form( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Block::gutenblock_render_form' ); - - return Contact_Form_Block::gutenblock_render_form( $atts, $content ); - } - - /** - * Turn block attribute to shortcode attributes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::block_attributes_to_shortcode_attributes - * @param array $atts - the block attributes. - * @param string $type - the type. - * - * @return array - */ - public static function block_attributes_to_shortcode_attributes( $atts, $type ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::block_attributes_to_shortcode_attributes' ); - - return Contact_Form_Plugin::block_attributes_to_shortcode_attributes( $atts, $type ); - } - - /** - * Render the text field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_text - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_text( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_text' ); - - return Contact_Form_Plugin::gutenblock_render_field_text( $atts, $content ); - } - - /** - * Render the name field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_name - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_name( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_name' ); - - return Contact_Form_Plugin::gutenblock_render_field_name( $atts, $content ); - } - - /** - * Render the email field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_email - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_email( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_email' ); - - return Contact_Form_Plugin::gutenblock_render_field_email( $atts, $content ); - } - - /** - * Render the url field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_url - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_url( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_url' ); - - return Contact_Form_Plugin::gutenblock_render_field_url( $atts, $content ); - } - - /** - * Render the date field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_date - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_date( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_date' ); - - return Contact_Form_Plugin::gutenblock_render_field_date( $atts, $content ); - } - - /** - * Render the telephone field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_telephone - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_telephone( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_telephone' ); - - return Contact_Form_Plugin::gutenblock_render_field_telephone( $atts, $content ); - } - - /** - * Render the text area field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_textarea - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_textarea( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_textarea' ); - - return Contact_Form_Plugin::gutenblock_render_field_textarea( $atts, $content ); - } - - /** - * Render the checkbox field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_checkbox - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_checkbox( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_checkbox' ); - - return Contact_Form_Plugin::gutenblock_render_field_checkbox( $atts, $content ); - } - - /** - * Render the multiple checkbox field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::Contact_Form_Plugin::gutenblock_render_field_checkbox_multiple - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_checkbox_multiple( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::Contact_Form_Plugin::gutenblock_render_field_checkbox_multiple' ); - - return Contact_Form_Plugin::gutenblock_render_field_checkbox_multiple( $atts, $content ); - } - - /** - * Render the multiple choice field option. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_option - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_option( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_option' ); - - return Contact_Form_Plugin::gutenblock_render_field_option( $atts, $content ); - } - - /** - * Render the radio button field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_radio - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_radio( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_radio' ); - - return Contact_Form_Plugin::gutenblock_render_field_radio( $atts, $content ); - } - - /** - * Render the select field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_select - * @param array $atts - the block attributes. - * @param string $content - html content. - * - * @return string HTML for the contact form field. - */ - public static function gutenblock_render_field_select( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_select' ); - - return Contact_Form_Plugin::gutenblock_render_field_select( $atts, $content ); - } - - /** - * Render the consent field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_consent - * @param string $atts consent attributes. - * @param string $content html content. - */ - public static function gutenblock_render_field_consent( $atts, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::gutenblock_render_field_consent' ); - - return Contact_Form_Plugin::gutenblock_render_field_consent( $atts, $content ); - } - - /** - * Add the 'Form Responses' menu item as a submenu of Feedback. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->admin_menu - */ - public function admin_menu() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->admin_menu' ); - - return self::$instance->admin_menu(); - } - - /** - * Add to REST API post type allowed list. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->allow_feedback_rest_api_type - * @param array $post_types - the post types. - */ - public function allow_feedback_rest_api_type( $post_types ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->allow_feedback_rest_api_type' ); - - return self::$instance->allow_feedback_rest_api_type( $post_types ); - } - - /** - * Display the count of new feedback entries received. It's reset when user visits the Feedback screen. - * - * @since 4.1.0 - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->unread_count - * @param object $screen Information about the current screen. - */ - public function unread_count( $screen ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->unread_count' ); - - return self::$instance->unread_count( $screen ); - } - - /** - * Handles all contact-form POST submissions - * - * Conditionally attached to `template_redirect` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->process_form_submission - */ - public function process_form_submission() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->process_form_submission' ); - - return self::$instance->process_form_submission(); - } - - /** - * Handle the ajax request. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->ajax_request - */ - public function ajax_request() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->ajax_request' ); - - return self::$instance->ajax_request(); - } - - /** - * Ensure the post author is always zero for contact-form feedbacks - * Attached to `wp_insert_post_data` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->insert_feedback_filter - * @see Grunion_Contact_Form::process_submission() - * @param array $data the data to insert. - * @param array $postarr the data sent to wp_insert_post(). - * @return array The filtered $data to insert. - */ - public function insert_feedback_filter( $data, $postarr ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->insert_feedback_filter' ); - - return self::$instance->insert_feedback_filter( $data, $postarr ); - } - - /** - * Adds our contact-form shortcode - * The "child" contact-field shortcode is enabled as needed by the contact-form shortcode handler - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->add_shortcode - */ - public function add_shortcode() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->add_shortcode' ); - - return self::$instance->add_shortcode(); - } - - /** - * Tokenize the label. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->tokenize_label - * @param string $label - the label. - * @return string - */ - public static function tokenize_label( $label ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->tokenize_label' ); - - return Contact_Form_Plugin::tokenize_label( $label ); - } - - /** - * Sanitize the value. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->sanitize_value - * @param string $value - the value to sanitize. - * @return string - */ - public static function sanitize_value( $value ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->sanitize_value' ); - - return Contact_Form_Plugin::sanitize_value( $value ); - } - - /** - * Replaces tokens like {city} or {City} (case insensitive) with the value - * of an input field of that name - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->replace_tokens_with_input - * @param string $subject - the subject. - * @param array $field_values Array with field label => field value associations. - * @return string The filtered $subject with the tokens replaced. - */ - public function replace_tokens_with_input( $subject, $field_values ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->replace_tokens_with_input' ); - - return self::$instance->replace_tokens_with_input( $subject, $field_values ); - } - - /** - * Tracks the widget currently being processed. - * Attached to `dynamic_sidebar` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->track_current_widget - * @see $current_widget_id - the current widget ID. - * @param array $widget The widget data. - */ - public function track_current_widget( $widget ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->track_current_widget' ); - - return self::$instance->track_current_widget( $widget ); - } - - /** - * Adds a "widget" attribute to every contact-form embedded in a text widget. - * Used to tell the difference between post-embedded contact-forms and widget-embedded contact-forms - * Attached to `widget_text` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->widget_atts - * @param string $text The widget text. - * @return string The filtered widget text. - */ - public function widget_atts( $text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->widget_atts' ); - - return self::$instance->widget_atts( $text ); - } - - /** - * For sites where text widgets are not processed for shortcodes, we add this hack to process just our shortcode - * Attached to `widget_text` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->widget_shortcode_hack - * @param string $text The widget text. - * @return string The contact-form filtered widget text - */ - public function widget_shortcode_hack( $text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->widget_shortcode_hack' ); - - return self::$instance->widget_shortcode_hack( $text ); - } - - /** - * Check if a submission matches the Comment Blocklist. - * The Comment Blocklist is a means to moderate discussion, and contact - * forms are 1:1 discussion forums, ripe for abuse by users who are being - * removed from the public discussion. - * Attached to `jetpack_contact_form_is_spam` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->is_spam_blocklist - * @param bool $is_spam - if the submission is spam. - * @param array $form - the form data. - * @return bool TRUE => spam, FALSE => not spam - */ - public function is_spam_blocklist( $is_spam, $form = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->is_spam_blocklist' ); - - return self::$instance->is_spam_blocklist( $is_spam, $form ); - } - - /** - * Check if a submission matches the comment disallowed list. - * Attached to `jetpack_contact_form_in_comment_disallowed_list`. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->is_in_disallowed_list - * @param boolean $in_disallowed_list Whether the feedback is in the disallowed list. - * @param array $form The form array. - * @return bool Returns true if the form submission matches the disallowed list and false if it doesn't. - */ - public function is_in_disallowed_list( $in_disallowed_list, $form = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->is_in_disallowed_list' ); - - return self::$instance->is_in_disallowed_list( $in_disallowed_list, $form ); - } - - /** - * Populate an array with all values necessary to submit a NEW contact-form feedback to Akismet. - * Note that this includes the current user_ip etc, so this should only be called when accepting a new item via $_POST - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->prepare_for_akismet - * @param array $form - contact form feedback array. - * @return array feedback array with additional data ready for submission to Akismet. - */ - public function prepare_for_akismet( $form ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->prepare_for_akismet' ); - - return self::$instance->prepare_for_akismet( $form ); - } - - /** - * Submit contact-form data to Akismet to check for spam. - * If you're accepting a new item via $_POST, run it Grunion_Contact_Form_Plugin::prepare_for_akismet() first - * Attached to `jetpack_contact_form_is_spam` - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->is_spam_akismet - * @param bool $is_spam - if the submission is spam. - * @param array $form - the form data. - * @return bool|WP_Error TRUE => spam, FALSE => not spam, WP_Error => stop processing entirely - */ - public function is_spam_akismet( $is_spam, $form = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->is_spam_akismet' ); - - return self::$instance->is_spam_akismet( $is_spam, $form ); - } - - /** - * Submit a feedback as either spam or ham - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->akismet_submit - * @param string $as - Either 'spam' or 'ham'. - * @param array $form - the contact-form data. - * @return bool|string - */ - public function akismet_submit( $as, $form ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->akismet_submit' ); - - return self::$instance->akismet_submit( $as, $form ); - } - - /** - * Prints a dropdown of posts with forms. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::form_posts_dropdown - * @param int $selected_id Currently selected post ID. - * @return void - */ - public static function form_posts_dropdown( $selected_id ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::form_posts_dropdown' ); - - Contact_Form_Plugin::form_posts_dropdown( $selected_id ); - } - - /** - * Fetch post content for a post and extract just the comment. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_post_content_for_csv_export - * @param int $post_id The post id to fetch the content for. - * @return string Trimmed post comment. - * - * @codeCoverageIgnore - */ - public function get_post_content_for_csv_export( $post_id ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_post_content_for_csv_export' ); - - return self::$instance->get_post_content_for_csv_export( $post_id ); - } - - /** - * Get `_feedback_extra_fields` field from post meta data. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_post_meta_for_csv_export - * @param int $post_id Id of the post to fetch meta data for. - * @return mixed - */ - public function get_post_meta_for_csv_export( $post_id ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_post_meta_for_csv_export' ); - - return self::$instance->get_post_meta_for_csv_export( $post_id ); - } - - /** - * Get parsed feedback post fields. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_parsed_field_contents_of_post - * @param int $post_id Id of the post to fetch parsed contents for. - * @return array - * - * @codeCoverageIgnore - No need to be covered. - */ - public function get_parsed_field_contents_of_post( $post_id ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_parsed_field_contents_of_post' ); - - return self::$instance->get_parsed_field_contents_of_post( $post_id ); - } - - /** - * Properly maps fields that are missing from the post meta data - * to names, that are similar to those of the post meta. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->map_parsed_field_contents_of_post_to_field_names - * @param array $parsed_post_content Parsed post content. - * @see parse_fields_from_content for how the input data is generated. - * @return array Mapped fields. - */ - public function map_parsed_field_contents_of_post_to_field_names( $parsed_post_content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->map_parsed_field_contents_of_post_to_field_names' ); - - return self::$instance->map_parsed_field_contents_of_post_to_field_names( $parsed_post_content ); - } - - /** - * Registers the personal data exporter. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->register_personal_data_exporter - * @since 6.1.1 - * @param array $exporters An array of personal data exporters. - * @return array $exporters An array of personal data exporters. - */ - public function register_personal_data_exporter( $exporters ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->register_personal_data_exporter' ); - - return self::$instance->register_personal_data_exporter( $exporters ); - } - - /** - * Registers the personal data eraser. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->register_personal_data_eraser - * @since 6.1.1 - * @param array $erasers An array of personal data erasers. - * @return array $erasers An array of personal data erasers. - */ - public function register_personal_data_eraser( $erasers ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->register_personal_data_eraser' ); - - return self::$instance->register_personal_data_eraser( $erasers ); - } - - /** - * Exports personal data. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_exporter - * @since 6.1.1 - * @param string $email Email address. - * @param int $page Page to export. - * @return array $return Associative array with keys expected by core. - */ - public function personal_data_exporter( $email, $page = 1 ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_exporter' ); - - return self::$instance->personal_data_exporter( $email, $page ); - } - - /** - * Internal method for exporting personal data. - * - * Allows us to have a different signature than core expects - * while protecting against future core API changes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->internal_personal_data_exporter - * @internal - * @since 6.5 - * @param string $email Email address. - * @param int $page Page to export. - * @param int $per_page Number of feedbacks to process per page. Internal use only (testing). - * @return array Associative array with keys expected by core. - */ - public function internal_personal_data_exporter( $email, $page = 1, $per_page = 250 ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->internal_personal_data_exporter' ); - - return self::$instance->internal_personal_data_exporter( $email, $page, $per_page ); - } - - /** - * Erases personal data. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_eraser - * @since 6.1.1 - * @param string $email Email address. - * @param int $page Page to erase. - * @return array Associative array with keys expected by core. - */ - public function personal_data_eraser( $email, $page = 1 ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_eraser' ); - - return self::$instance->personal_data_eraser( $email, $page ); - } - - /** - * Internal method for erasing personal data. - * - * Allows us to have a different signature than core expects - * while protecting against future core API changes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->_internal_personal_data_eraser - * @internal - * @since 6.5 - * @param string $email Email address. - * @param int $page Page to erase. - * @param int $per_page Number of feedbacks to process per page. Internal use only (testing). - * @return array Associative array with keys expected by core. - */ - public function _internal_personal_data_eraser( $email, $page = 1, $per_page = 250 ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore -- this is called in other files. - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->_internal_personal_data_eraser' ); - - return self::$instance->_internal_personal_data_eraser( $email, $page, $per_page ); - } - - /** - * Queries personal data by email address. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_post_ids_by_email - * @since 6.1.1 - * @param string $email Email address. - * @param int $per_page Post IDs per page. Default is `250`. - * @param int $page Page to query. Default is `1`. - * @param int $last_post_id Page to query. Default is `0`. If non-zero, used instead of $page. - * @return array An array of post IDs. - */ - public function personal_data_post_ids_by_email( $email, $per_page = 250, $page = 1, $last_post_id = 0 ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_post_ids_by_email' ); - - return self::$instance->personal_data_post_ids_by_email( $email, $per_page, $page, $last_post_id ); - } - - /** - * Filters searches by email address. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_search_filter - * @since 6.1.1 - * @param string $search SQL where clause. - * @return array Filtered SQL where clause. - */ - public function personal_data_search_filter( $search ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->personal_data_search_filter' ); - - return self::$instance->personal_data_search_filter( $search ); - } - - /** - * Prepares feedback post data for CSV export. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_export_data_for_posts - * @param array $post_ids Post IDs to fetch the data for. These need to be Feedback posts. - * @return array - */ - public function get_export_data_for_posts( $post_ids ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_export_data_for_posts' ); - - return self::$instance->get_export_data_for_posts( $post_ids ); - } - - /** - * Returns an array of [prefixed column name] => [translated column name], used on export. - * Prefix indicates the position in which the column will be rendered: - * - Negative numbers render BEFORE any form field/value column: -5, -3, -1... - * - Positive values render AFTER any form field/value column: 1, 30, 93... - * Mind using high numbering on these ones as the prefix is used on regular inputs: 1_Name, 2_Email, etc - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_well_known_column_names - * @return array - */ - public function get_well_known_column_names() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_well_known_column_names' ); - - return self::$instance->get_well_known_column_names(); - } - - /** - * Extracts feedback entries based on POST data. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_feedback_entries_from_post - */ - public function get_feedback_entries_from_post() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_feedback_entries_from_post' ); - - return self::$instance->get_feedback_entries_from_post(); - } - - /** - * Download exported data as CSV - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->download_feedback_as_csv - */ - public function download_feedback_as_csv() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->download_feedback_as_csv' ); - - return self::$instance->download_feedback_as_csv(); - } - - /** - * Send an event to Tracks - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->record_tracks_event - * @param string $event_name - the name of the event. - * @param array $event_props - event properties to send. - * @return null|void - */ - public function record_tracks_event( $event_name, $event_props ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->record_tracks_event' ); - - return self::$instance->record_tracks_event( $event_name, $event_props ); - } - - /** - * Escape a string to be used in a CSV context - * - * Malicious input can inject formulas into CSV files, opening up the possibility for phishing attacks and - * disclosure of sensitive information. - * - * Additionally, Excel exposes the ability to launch arbitrary commands through the DDE protocol. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->esc_csv - * @see https://www.contextis.com/en/blog/comma-separated-vulnerabilities - * @param string $field - the CSV field. - * @return string - */ - public function esc_csv( $field ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->esc_csv' ); - - return self::$instance->esc_csv( $field ); - } - - /** - * Parse the contact form fields. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->parse_fields_from_content - * @param int $post_id - the post ID. - * @return array Fields. - */ - public static function parse_fields_from_content( $post_id ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->parse_fields_from_content' ); - - return Contact_Form_Plugin::parse_fields_from_content( $post_id ); - } - - /** - * Get the IP address. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_ip_address - * @return string|null IP address. - */ - public static function get_ip_address() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->get_ip_address' ); - - return Contact_Form_Plugin::get_ip_address(); - } - - /** - * Disable Block Editor for feedbacks. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->use_block_editor_for_post_type - * @param bool $can_edit Whether the post type can be edited or not. - * @param string $post_type The post type being checked. - * @return bool - */ - public function use_block_editor_for_post_type( $can_edit, $post_type ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin->use_block_editor_for_post_type' ); - - return self::$instance->use_block_editor_for_post_type( $can_edit, $post_type ); - } - - /** - * Kludge method: reverses the output of a standard print_r( $array ). - * Sort of what unserialize does to a serialized object. - * This is here while we work on a better data storage inside the posts. See: - * - p1675781140892129-slack-C01CSBEN0QZ - * - https://www.php.net/manual/en/function.print-r.php#93529 - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::reverse_that_print - * @param string $print_r_output The array string to be reverted. Needs to being with 'Array'. - * @param bool $parse_html Whether to run html_entity_decode on each line. - * As strings are stored right now, they are all escaped, so '=>' are '>'. - * @return array|string Array when succesfully reconstructed, string otherwise. Output will always be esc_html'd. - */ - public static function reverse_that_print( $print_r_output, $parse_html = false ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::reverse_that_print' ); - - return Contact_Form_Plugin::reverse_that_print( $print_r_output, $parse_html ); - } -} - -/** - * Generic shortcode class. - * Does nothing other than store structured data and output the shortcode as a string - * - * Not very general - specific to Grunion. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * - * // phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound - */ -class Crunion_Contact_Form_Shortcode { - /** - * The name of the shortcode: [$shortcode_name /]. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * @var string - */ - private $shortcode_name; - - /** - * Key => value pairs for the shortcode's attributes: [$shortcode_name key="value" ... /] - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * @var array - */ - private $attributes; - - /** - * Key => value pair for attribute defaults. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * @var array - */ - private $defaults = array(); - - /** - * The inner content of otherwise: [$shortcode_name]$content[/$shortcode_name]. Null for selfclosing shortcodes. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * @var null|string - */ - private $content; - - /** - * Associative array of inner "child" shortcodes equivalent to the $content: [$shortcode_name][child 1/][child 2/][/$shortcode_name] - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * @var array - */ - private $fields; - - /** - * The HTML of the parsed inner "child" shortcodes". Null for selfclosing shortcodes. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - * @var null|string - */ - private $body; - - /** - * We're using object composition to call code from the `forms` package. - * This holds the reference to the Contact_Form_Shortcode instance. - * - * @var Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode - */ - private $shortcode; - - /** - * Constructor function. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->__construct - * @param array $attributes An associative array of shortcode attributes. @see shortcode_atts(). - * @param null|string $content Null for selfclosing shortcodes. The inner content otherwise. - */ - public function __construct( $attributes, $content = null ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->__construct' ); - - $this->shortcode = new Contact_Form_Shortcode( $attributes, $content ); - } - - /** - * Set properties on the Contact_Form_Shortcode instance. - * - * @param string $name Name of the property. - * @param mixed $value Value of the property. - */ - public function __set( $name, $value ) { - $this->shortcode->{ $name } = $value; - } - - /** - * Get properties from the Contact_Form_Shortcode instance. - * - * @param string $name Name of the property. - * @return mixed - */ - public function __get( $name ) { - return $this->shortcode->{ $name }; - } - - /** - * Processes the shortcode's inner content for "child" shortcodes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->parse_content - * @param string $content The shortcode's inner content: [shortcode]$content[/shortcode]. - */ - public function parse_content( $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->parse_content' ); - - return $this->shortcode->parse_content( $content ); - } - - /** - * Returns the value of the requested attribute. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->get_attribute - * @param string $key The attribute to retrieve. - * @return mixed - */ - public function get_attribute( $key ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->get_attribute' ); - - return $this->shortcode->get_attribute( $key ); - } - - /** - * Escape attributes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->esc_attr - * @param array $value - the value we're escaping. - * @return array - */ - public function esc_attr( $value ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->esc_attr' ); - - return $this->shortcode->esc_attr( $value ); - } - - /** - * Unescape attributes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->unesc_attr - * @param array $value - the value we're escaping. - * @return array - */ - public function unesc_attr( $value ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->unesc_attr' ); - - return $this->shortcode->unesc_attr( $value ); - } - - /** - * Generates the shortcode - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->__toString - */ - public function __toString() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Shortcode->__toString' ); - - return $this->shortcode->__toString(); - } -} - -/** - * Class for the contact-form shortcode. - * Parses shortcode to output the contact form as HTML - * Sends email and stores the contact form response (a.k.a. "feedback") - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form - */ -class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode { - - /** - * The shortcode name. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var string - */ - private $shortcode_name = 'contact-form'; - - /** - * - * Stores form submission errors. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var WP_Error - */ - private $errors; - - /** - * The SHA1 hash of the attributes that comprise the form. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var string - */ - private $hash; - - /** - * The most recent (inclusive) contact-form shortcode processed. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var Grunion_Contact_Form - */ - private static $last; - - /** - * Form we are currently looking at. If processed, will become $last - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var Grunion_Contact_Form - */ - private static $current_form; - - /** - * All found forms, indexed by hash. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var array - */ - private static $forms = array(); - - /** - * Whether to print the grunion.css style when processing the contact-form shortcode - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var bool - */ - private static $style = false; - - /** - * When printing the submit button, what tags are allowed - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form - * @var array - */ - private static $allowed_html_tags_for_submit_button = array( 'br' => array() ); - - /** - * We're using object composition to call code from the `forms` package. - * This holds the reference to the Contact_Form instance. - * - * @var Automattic\Jetpack\Forms\ContactForm\Contact_Form - */ - private $form; - - /** - * Construction function. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form->__construct - * @param array $attributes - the attributes. - * @param string $content - the content. - */ - public function __construct( $attributes, $content = null ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form->__construct' ); - - $this->form = new Contact_Form( $attributes, $content ); - } - - /** - * Set properties on the Contact_Form instance. - * - * @param string $name Name of the property. - * @param mixed $value Value of the property. - */ - public function __set( $name, $value ) { - $this->form->{ $name } = $value; - } - - /** - * Get properties from the Contact_Form instance. - * - * @param string $name Name of the property. - * @return mixed - */ - public function __get( $name ) { - return $this->form->{ $name }; - } - - /** - * Store shortcode content for recall later - * - used to receate shortcode when user uses do_shortcode - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::store_shortcode - * @param string $content - the content. - * @param array $attributes - the attributes. - * @param string $hash - the hash. - */ - public static function store_shortcode( $content = null, $attributes = null, $hash = null ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::store_shortcode' ); - - return Contact_Form::store_shortcode( $content, $attributes, $hash ); - } - - /** - * Toggle for printing the grunion.css stylesheet - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::style - * @param bool $style - the CSS style. - * @return bool - */ - public static function style( $style ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::style' ); - - return Contact_Form::style( $style ); - } - - /** - * Turn on printing of grunion.css stylesheet - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::style_on - * @see ::style() - * @internal - * @return bool - */ - public static function style_on() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::style_on' ); - - return Contact_Form::style_on(); - } - - /** - * The contact-form shortcode processor - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::parse - * @param array $attributes Key => Value pairs as parsed by shortcode_parse_atts(). - * @param string|null $content The shortcode's inner content: [contact-form]$content[/contact-form]. - * @return string HTML for the concat form. - */ - public static function parse( $attributes, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::parse' ); - - return Contact_Form::parse( $attributes, $content ); - } - - /** - * Returns a success message to be returned if the form is sent via AJAX. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::success_message - * @param int $feedback_id - the feedback ID. - * @param object Grunion_Contact_Form $form - the contact form. - * @return string $message - */ - public static function success_message( $feedback_id, $form ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::success_message' ); - - return Contact_Form::success_message( $feedback_id, $form ); - } - - /** - * Returns a script that disables the contact form button after a form submission. - * - * @return string The script. - */ - private static function get_script_for_form() { - return ""; - } - - /** - * Returns a compiled form with labels and values in a form of an array - * of lines. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_compiled_form - * @param int $feedback_id - the feedback ID. - * @param object Grunion_Contact_Form $form - the form. - * @return array $lines - */ - public static function get_compiled_form( $feedback_id, $form ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_compiled_form' ); - - return Contact_Form::get_compiled_form( $feedback_id, $form ); - } - - /** - * Returns a compiled form with labels and values formatted for the email response - * in a form of an array of lines. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_compiled_form_for_email - * @param int $feedback_id - the feedback ID. - * @param object Grunion_Contact_Form $form - the form. - * @return array $lines - */ - public static function get_compiled_form_for_email( $feedback_id, $form ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_compiled_form_for_email' ); - - return Contact_Form::get_compiled_form_for_email( $feedback_id, $form ); - } - - /** - * Escape and sanitize the field value. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::escape_and_sanitize_field_value - * @param string $value - the value we're escaping and sanitizing. - * @return string - */ - public static function escape_and_sanitize_field_value( $value ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::escape_and_sanitize_field_value' ); - - return Contact_Form::escape_and_sanitize_field_value( $value ); - } - - /** - * Only strip out empty string values and keep all the other values as they are. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::remove_empty - * @param string $single_value - the single value. - * @return bool - */ - public static function remove_empty( $single_value ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::remove_empty' ); - - return Contact_Form::remove_empty( $single_value ); - } - - /** - * Escape a shortcode value. - * - * Shortcode attribute values have a number of unfortunate restrictions, which fortunately we - * can get around by adding some extra HTML encoding. - * - * The output HTML will have a few extra escapes, but that makes no functional difference. - * - * @since 9.1.0 - * @param string $val Value to escape. - * @return string - */ - private static function esc_shortcode_val( $val ) { - return Contact_Form::esc_shortcode_val( $val ); - } - - /** - * The contact-field shortcode processor. - * We use an object method here instead of a static Grunion_Contact_Form_Field class method to parse contact-field shortcodes so that we can tie them to the contact-form object. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::parse_contact_field - * @param array $attributes Key => Value pairs as parsed by shortcode_parse_atts(). - * @param string|null $content The shortcode's inner content: [contact-field]$content[/contact-field]. - * @return string HTML for the contact form field - */ - public static function parse_contact_field( $attributes, $content ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::parse_contact_field' ); - - return Contact_Form::parse_contact_field( $attributes, $content ); - } - - /** - * Get the default label from type. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_default_label_from_type - * @param string $type - the type of label. - * @return string - */ - public static function get_default_label_from_type( $type ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_default_label_from_type' ); - - return Contact_Form::get_default_label_from_type( $type ); - } - - /** - * Loops through $this->fields to generate a (structured) list of field IDs. - * - * Important: Currently the allowed fields are defined as follows: - * `name`, `email`, `url`, `subject`, `textarea` - * - * If you need to add new fields to the Contact Form, please don't add them - * to the allowed fields and leave them as extra fields. - * - * The reasoning behind this is that both the admin Feedback view and the CSV - * export will not include any fields that are added to the list of - * allowed fields without taking proper care to add them to all the - * other places where they accessed/used/saved. - * - * The safest way to add new fields is to add them to the dropdown and the - * HTML list ( @see Grunion_Contact_Form_Field::render ) and don't add them - * to the list of allowed fields. This way they will become a part of the - * `extra fields` which are saved in the post meta and will be properly - * handled by the admin Feedback view and the CSV Export without any extra - * work. - * - * If there is need to add a field to the allowed fields, then please - * take proper care to add logic to handle the field in the following places: - * - * - Below in the switch statement - so the field is recognized as allowed. - * - * - Grunion_Contact_Form::process_submission - validation and logic. - * - * - Grunion_Contact_Form::process_submission - add the field as an additional - * field in the `post_content` when saving the feedback content. - * - * - Grunion_Contact_Form_Plugin::parse_fields_from_content - add mapping - * for the field, defined in the above method. - * - * - Grunion_Contact_Form_Plugin::map_parsed_field_contents_of_post_to_field_names - - * add mapping of the field for the CSV Export. Otherwise it will be missing - * from the exported data. - * - * - admin.php / grunion_manage_post_columns - add the field to the render logic. - * Otherwise it will be missing from the admin Feedback view. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form->get_field_ids - * @return array - */ - public function get_field_ids() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form->get_field_ids' ); - - return $this->form->get_field_ids(); - } - - /** - * Process the contact form's POST submission - * Stores feedback. Sends email. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form->process_submission - */ - public function process_submission() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form->process_submission' ); - - return $this->form->process_submission(); - } - - /** - * Wrapper for wp_mail() that enables HTML messages with text alternatives - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::wp_mail - * @param string|array $to Array or comma-separated list of email addresses to send message. - * @param string $subject Email subject. - * @param string $message Message contents. - * @param string|array $headers Optional. Additional headers. - * @param string|array $attachments Optional. Files to attach. - * @return bool Whether the email contents were sent successfully. - */ - public static function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::wp_mail' ); - - return Contact_Form::wp_mail( $to, $subject, $message, $headers, $attachments ); - } - - /** - * Add a display name part to an email address - * - * SpamAssassin doesn't like addresses in HTML messages that are missing display names (e.g., `foo@bar.org` - * instead of `Foo Bar `. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form->add_name_to_address - * @param string $address - the email address. - * @return string - */ - public function add_name_to_address( $address ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form->add_name_to_address' ); - - return $this->form->add_name_to_address( $address ); - } - - /** - * Get the content type that should be assigned to outbound emails - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_mail_content_type - * @return string - */ - public static function get_mail_content_type() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::get_mail_content_type' ); - - return Contact_Form::get_mail_content_type(); - } - - /** - * Wrap a message body with the appropriate in HTML tags - * - * This helps to ensure correct parsing by clients, and also helps avoid triggering spam filtering rules - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::wrap_message_in_html_tags - * @param string $title - title of the email. - * @param string $body - the message body. - * @param string $footer - the footer containing meta information. - * @return string - */ - public static function wrap_message_in_html_tags( $title, $body, $footer ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::wrap_message_in_html_tags' ); - - return Contact_Form::wrap_message_in_html_tags( $title, $body, $footer ); - } - - /** - * Add a plain-text alternative part to an outbound email - * - * This makes the message more accessible to mail clients that aren't HTML-aware, and decreases the likelihood - * that the message will be flagged as spam. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form::add_plain_text_alternative - * @param PHPMailer\PHPMailer\PHPMailer $phpmailer - the phpmailer. - */ - public static function add_plain_text_alternative( $phpmailer ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form::add_plain_text_alternative' ); - - return Contact_Form::add_plain_text_alternative( $phpmailer ); - } - - /** - * Add deepslashes. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Block->addslashes_deep - * @param array $value - the value. - * @return array The value, with slashes added. - */ - public function addslashes_deep( $value ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Block->addslashes_deep' ); - - return $this->form->addslashes_deep( $value ); - } - - /** - * Rough implementation of Gutenberg's align-attribute-to-css-class map. - * Only allowin "wide" and "full" as "center", "left" and "right" don't - * make much sense for the form. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Block::get_block_alignment_class - * @param array $attributes Block attributes. - * @return string The CSS alignment class: alignfull | alignwide. - */ - public static function get_block_alignment_class( $attributes = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Block::get_block_alignment_class' ); - - return Contact_Form::get_block_alignment_class( $attributes ); - } -} // end class Grunion_Contact_Form - -// phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound -- how many times I have to disable this? -/** - * Class for the contact-field shortcode. - * Parses shortcode to output the contact form field as HTML. - * Validates input. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - */ -class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode { - - /** - * The shortcode name. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var string - */ - private $shortcode_name = 'contact-field'; - - /** - * The parent form. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var Grunion_Contact_Form - */ - private $form; - - /** - * Default or POSTed value. - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var string - */ - private $value; - - /** - * Is the input valid? - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var bool - */ - private $error = false; - - /** - * Styles to be applied to the field - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var string - */ - private $block_styles = ''; - - /** - * Styles to be applied to the field - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var string - */ - private $field_styles = ''; - - /** - * Styles to be applied to the field option - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var string - */ - private $option_styles = ''; - - /** - * Styles to be applied to the field - * - * @deprecated 13.3 See Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field - * @var string - */ - private $label_styles = ''; - - /** - * We're using object composition to call code from the `forms` package. - * This holds the reference to the Contact_Form_Field instance. - * - * @var Contact_Form_Field - */ - private $field; - - /** - * Constructor function. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->__construct - * @param array $attributes An associative array of shortcode attributes. @see shortcode_atts(). - * @param null|string $content Null for selfclosing shortcodes. The inner content otherwise. - * @param Grunion_Contact_Form $form The parent form. - */ - public function __construct( $attributes, $content = null, $form = null ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->__construct' ); - - $this->field = new Contact_Form_Field( $attributes, $content, $form ); - } - - /** - * Set properties on the Contact_Form_Field instance. - * - * @param string $name Name of the property. - * @param mixed $value Value of the property. - */ - public function __set( $name, $value ) { - $this->field->{ $name } = $value; - } - - /** - * Get properties from the Contact_Form_Field instance. - * - * @param string $name Name of the property. - * @return mixed - */ - public function __get( $name ) { - return $this->field->{ $name }; - } - - /** - * This field's input is invalid. Flag as invalid and add an error to the parent form - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->add_error - * @param string $message The error message to display on the form. - */ - public function add_error( $message ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->add_error' ); - - return $this->field->add_error( $message ); - } - - /** - * Is the field input invalid? - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->is_error - * @see $error - * @return bool - */ - public function is_error() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->is_error' ); - - return $this->field->is_error(); - } - - /** - * Validates the form input - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->validate - */ - public function validate() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->validate' ); - - return $this->field->validate(); - } - - /** - * Check the default value for options field - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->get_option_value - * @param string $value - the value we're checking. - * @param int $index - the index. - * @param string $options - default field option. - * @return string - */ - public function get_option_value( $value, $index, $options ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->get_option_value' ); - - return $this->field->get_option_value( $value, $index, $options ); - } - - /** - * Outputs the HTML for this form field - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render - * @return string HTML - */ - public function render() { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render' ); - - return $this->field->render(); - } - - /** - * Return the HTML for the label. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_label - * @param string $type - the field type. - * @param int $id - the ID. - * @param string $label - the label. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param array $extra_attrs Array of key/value pairs to append as attributes to the element. - * @return string HTML - */ - public function render_label( $type, $id, $label, $required, $required_field_text, $extra_attrs = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_label' ); - - return $this->field->render_label( $type, $id, $label, $required, $required_field_text, $extra_attrs ); - } - - /** - * Return the HTML for the input field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_input_field - * @param string $type - the field type. - * @param int $id - the ID. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param string $placeholder - the field placeholder content. - * @param bool $required - if the field is marked as required. - * @param array $extra_attrs Array of key/value pairs to append as attributes to the element. - * @return string HTML - */ - public function render_input_field( $type, $id, $value, $class, $placeholder, $required, $extra_attrs = array() ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_input_field' ); - - return $this->field->render_input_field( $type, $id, $value, $class, $placeholder, $required, $extra_attrs ); - } - - /** - * Return the HTML for the email field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_email_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param string $placeholder - the field placeholder content. - * @return string HTML - */ - public function render_email_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_email_field' ); - - return $this->field->render_email_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ); - } - - /** - * Return the HTML for the telephone field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_telephone_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param string $placeholder - the field placeholder content. - * @return string HTML - */ - public function render_telephone_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_telephone_field' ); - - return $this->field->render_telephone_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ); - } - - /** - * Return the HTML for the URL field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_url_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param string $placeholder - the field placeholder content. - * @return string HTML - */ - public function render_url_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_url_field' ); - - return $this->field->render_url_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ); - } - - /** - * Return the HTML for the text area field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_textarea_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param string $placeholder - the field placeholder content. - * @return string HTML - */ - public function render_textarea_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_textarea_field' ); - - return $this->field->render_textarea_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ); - } - - /** - * Return the HTML for the radio field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_radio_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_radio_field( $id, $label, $value, $class, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_radio_field' ); - - return $this->field->render_radio_field( $id, $label, $value, $class, $required, $required_field_text ); - } - - /** - * Return the HTML for the checkbox field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_checkbox_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_checkbox_field( $id, $label, $value, $class, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_checkbox_field' ); - - return $this->field->render_checkbox_field( $id, $label, $value, $class, $required, $required_field_text ); - } - - /** - * Return the HTML for the consent field. - * - * @param string $id field id. - * @param string $class html classes (can be set by the admin). - */ - private function render_consent_field( $id, $class ) { - $consent_type = 'explicit' === $this->get_attribute( 'consenttype' ) ? 'explicit' : 'implicit'; - $consent_message = 'explicit' === $consent_type ? $this->get_attribute( 'explicitconsentmessage' ) : $this->get_attribute( 'implicitconsentmessage' ); - - $field = "\n"; - $field .= "
\n"; - return $field; - } - - /** - * Return the HTML for the multiple checkbox field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_checkbox_multiple_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_checkbox_multiple_field( $id, $label, $value, $class, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_checkbox_multiple_field' ); - - return $this->field->render_checkbox_multiple_field( $id, $label, $value, $class, $required, $required_field_text ); - } - - /** - * Return the HTML for the select field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_select_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_select_field( $id, $label, $value, $class, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_select_field' ); - - return $this->field->render_select_field( $id, $label, $value, $class, $required, $required_field_text ); - } - - /** - * Return the HTML for the email field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_date_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param string $placeholder - the field placeholder content. - * @return string HTML - */ - public function render_date_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_date_field' ); - - return $this->field->render_date_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ); - } - - /** - * Return the HTML for the default field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_default_field - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @param string $placeholder - the field placeholder content. - * @param string $type - the type. - * @return string HTML - */ - public function render_default_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder, $type ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_default_field' ); - - return $this->field->render_default_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder, $type ); - } - - /** - * Return the HTML for the outlined label. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_outline_label - * @param int $id - the ID. - * @param string $label - the label. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_outline_label( $id, $label, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_outline_label' ); - - return $this->field->render_outline_label( $id, $label, $required, $required_field_text ); - } - - /** - * Return the HTML for the animated label. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_animated_label - * @param int $id - the ID. - * @param string $label - the label. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_animated_label( $id, $label, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_animated_label' ); - - return $this->field->render_animated_label( $id, $label, $required, $required_field_text ); - } - - /** - * Return the HTML for the below label. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_below_label - * @param int $id - the ID. - * @param string $label - the label. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text in the required text field. - * @return string HTML - */ - public function render_below_label( $id, $label, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_below_label' ); - - return $this->field->render_below_label( $id, $label, $required, $required_field_text ); - } - - /** - * Return the HTML for the email field. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_field - * @param string $type - the type. - * @param int $id - the ID. - * @param string $label - the label. - * @param string $value - the value of the field. - * @param string $class - the field class. - * @param string $placeholder - the field placeholder content. - * @param bool $required - if the field is marked as required. - * @param string $required_field_text - the text for a field marked as required. - * @return string HTML - */ - public function render_field( $type, $id, $label, $value, $class, $placeholder, $required, $required_field_text ) { - _deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field->render_field' ); - - return $this->field->render_field( $type, $id, $label, $value, $class, $placeholder, $required, $required_field_text ); - } - - /** - * Overrides input type (maybe). - * - * @module contact-form - * - * Custom input types, like URL, will rely on browser's implementation to validate - * the value. If the input carries a data-type-override, we allow to override - * the type at render/submit so it can be validated with custom patterns. - * This method will try to match the input's type to a custom data-type-override - * attribute and return it. Defaults to input's type. - * - * @return string The input's type attribute or the overriden type. - */ - private function maybe_override_type() { - // Define overridables-to-custom-type, extend as needed. - $overridable_types = array( 'text' => array( 'url' ) ); - $type = $this->get_attribute( 'type' ); - - if ( ! array_key_exists( $type, $overridable_types ) ) { - return $type; - } - - $override_type = $this->get_attribute( 'data-type-override' ); - - if ( in_array( $override_type, $overridable_types[ $type ], true ) ) { - return $override_type; - } - - return $type; - } - - /** - * Gets the form style based on its CSS class. - * - * @return string The form style type. - */ - private function get_form_style() { - $class_name = $this->form->get_attribute( 'className' ); - preg_match( '/is-style-([^\s]+)/i', $class_name, $matches ); - return count( $matches ) >= 2 ? $matches[1] : null; - } -} - -add_action( 'init', array( 'Grunion_Contact_Form_Plugin', 'init' ), 9 ); - -add_action( 'grunion_scheduled_delete', 'grunion_delete_old_spam' ); - -/** - * Deletes old spam feedbacks to keep the posts table size under control - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Util::grunion_delete_old_spam' - */ -function grunion_delete_old_spam() { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Util::grunion_delete_old_spam' ); - - return Util::grunion_delete_old_spam(); -} - -/** - * Send an event to Tracks on form submission. - * - * @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Util::jetpack_tracks_record_grunion_pre_message_sent - * @param int $post_id - the post_id for the CPT that is created. - * @return null|void - */ -function jetpack_tracks_record_grunion_pre_message_sent( $post_id ) { - _deprecated_function( __FUNCTION__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Util::jetpack_tracks_record_grunion_pre_message_sent' ); - - return Util::jetpack_tracks_record_grunion_pre_message_sent( $post_id ); -} -add_action( 'grunion_pre_message_sent', 'jetpack_tracks_record_grunion_pre_message_sent', 12 ); diff --git a/projects/plugins/jetpack/modules/contact-form/grunion-editor-view.php b/projects/plugins/jetpack/modules/contact-form/grunion-editor-view.php deleted file mode 100644 index 26ecc8ac7f116..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/grunion-editor-view.php +++ /dev/null @@ -1,102 +0,0 @@ - esc_attr( _x( 'Name', 'Label for HTML form "Name" field in contact form builder', 'jetpack' ) ), - 'emailLabel' => esc_attr( _x( 'Email', 'Label for HTML form "Email" field in contact form builder', 'jetpack' ) ), - 'urlLabel' => esc_attr( _x( 'Website', 'Label for HTML form "URL/Website" field in contact form builder', 'jetpack' ) ), - 'commentLabel' => esc_attr( _x( 'Comment', 'noun', 'jetpack' ) ), - 'newLabel' => esc_attr( _x( 'New Field', 'Default label for new HTML form field in contact form builder', 'jetpack' ) ), - 'optionsLabel' => esc_attr( _x( 'Options', 'Label for the set of options to be included in a user-created dropdown in contact form builder', 'jetpack' ) ), - 'optionLabel' => esc_attr( _x( 'Option', 'Label for an option to be included in a user-created dropdown in contact form builder', 'jetpack' ) ), - 'firstOptionLabel' => esc_attr( _x( 'First option', 'Default label for the first option to be included in a user-created dropdown in contact form builder', 'jetpack' ) ), - 'problemGeneratingForm' => esc_attr( _x( "Oops, there was a problem generating your form. You'll likely need to try again.", 'error message in contact form builder', 'jetpack' ) ), - 'moveInstructions' => esc_attr__( "Drag up or down\nto re-arrange", 'jetpack' ), - 'moveLabel' => esc_attr( _x( 'move', 'Label to drag HTML form fields around to change their order in contact form builder', 'jetpack' ) ), - 'editLabel' => esc_attr( _x( 'edit', 'Link to edit an HTML form field in contact form builder', 'jetpack' ) ), - 'savedMessage' => esc_attr__( 'Saved successfully', 'jetpack' ), - 'requiredLabel' => esc_attr( _x( '(required)', 'This HTML form field is marked as required by the user in contact form builder', 'jetpack' ) ), - 'exitConfirmMessage' => esc_attr__( 'Are you sure you want to exit the form editor without saving? Any changes you have made will be lost.', 'jetpack' ), - 'maxNewFields' => (int) $max_new_fields, - ) -); - -?> - - - - -<?php esc_html_e( 'Contact Form', 'jetpack' ); ?> - - - - - - - -> -
- -
    -
  • -
  • -
-
-
-
-

-

-

-

- ' . esc_html__( 'Click here', 'jetpack' ) . '' - ); - ?> -

-

-

- ' . esc_html__( 'Feedback', 'jetpack' ) . '' - ); - ?> -

-
-
- - -
-
-
-

-
- -
- - -
- -
- -
- - diff --git a/projects/plugins/jetpack/modules/contact-form/grunion-response-email-template.php b/projects/plugins/jetpack/modules/contact-form/grunion-response-email-template.php deleted file mode 100644 index e54893ff4dc02..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/grunion-response-email-template.php +++ /dev/null @@ -1,30 +0,0 @@ - - - - -%1$s - - -

%2$s

-%3$s -%4$s - -

%5$s

- - -'; diff --git a/projects/plugins/jetpack/modules/contact-form/images/blank-screen-akismet.png b/projects/plugins/jetpack/modules/contact-form/images/blank-screen-akismet.png deleted file mode 100644 index a4ba1e2d68b34ccfdfe5ae6468ae9c1390f147d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2270 zcmV<42qE{0P)S2 z0A{vkw*S>mOwHxxIsiIZGc)gMLo=WZe4#QEy^`TzghGj*?%lau-R**XAbwq^j3+yD8* za^~jdhen5_XlT`LmettY;f z^QcVKjJc(yXT5zh^!NNTSeKGjGwu1==jX7gnVI0><3@*xTO!|Hg^K`G-b{ z_y7MheZA)9v$D6mvgNW$N{llzc^_L)3jhEHL`g(JRCwC$oR3o!Wf;fL3IQ==*;Y?; zuY40sEbA;Tpa3;sl`XEw5(@jVsgziabd0V204>7EW-f0Wvn-~J&Z~5aoe>?+nzHHd z>UrOHckkW3h1&y_yPNkJ=6&|vckki--1B{({lyT_O4I@xDoNvD9E^i;Fb>ASI2Z@x zU>wXZSaLK1?Uv(4zJclonpev5>K@qKes%yMvsXW09q{z0)>dyQ6zb~F9T3%%5IB-7 z4`d?E4=gsSLKDds?7-)(*zLO?X0-Yfa}LmJe)v5%*rm|A$xET#xdS$T*@}K{B)#o- z^<*N=4@}-7qjW50pmalnj8L$lA!4@4QL+vDW3uWP#tej|dF4Q+Lwog&*5%j3damBrs%Sf1O&WOwMNw>Fb4-!c9?#n@Fl-4 z4`e1~_Q*(<6ubKS0jLjkQcd=Tb^};nXDHOt3wtvkJMa~C-?5SA38u!&YN3g0xW;eo%T)bq!ln*w^UDSfiH|JE3q;us+aWA6DaMp*|NF{+PL9 zX_dVJQY5v}Kw33u4L35PEfkMII2m9;!a>Zi$%4x=P8bwvsM25v=Ysr27@QQSE!1Qgngm|7$XF1Kz4=gL- z0#DHVT9JcsFb>ASI2Z@xU>uBt6$hA>FpO|cGZLB)Fhvs<%{1rTkT9Ks9a1if$CcEy zkPA%HOwpx9H9eCvL(A)vnlUGsc1!bB?KYU-Jh>!E5a$9D zZfSn1v-{Rs5yZTsi9!K^>8!C}(~ zEbORor<#_(fY9)cmntipY&Z1%&KZObKEpg74*QYf-U^8YyZ2a!ojyPutEx3K#(V)) zOOH%^dn6BSR!d3NW&<1kYwF;GGiZ2KlXUIQ8Osfw{u*dcor~uMMyAh#J!|T(yBt(!Pcw*6d+p0xXn$Qo7jiczSbBlCOp&j zy`~f)O<;rpbV#MxcFZ9~3(R+=q+ltNiv<&zS$*&Z9C~flnc-Du5J=K;Ln}a>Yo=Hh z(QmnjMBQN(kFl!tI2S~b-LROTc$7n(a1;*$Mn`;tC5Q#6W6xtEldwOD9uGY?^hjmp zIVgvwTY*K&PF~as=LDT#jlJ>+XS68M@^E>0=plTMVmc%NGp>snC58*=%0pz01xt%r zw~i!7wxc4Avk6NV!$mMMQdwk@!-4f*W=2y+aoo0`pqkfHgjBFtZZwf0>i%CxitdB6 z9}O%jmvdbNMM2SXn<9uop`ah;2<}(gni$OekSZJ${XC`O&lNcs2jgHIjDvA74tC4H z7WInihQ4ca-L@q45-}&3qUfawRyqlDfeCu4f+b7FI2Z>jY_J$>r2wXw7GrkCl%lkN z;tlo|wd>O*2S(l#s6vnhd*YQS*ggA;9c))R4S&hQg8dd9fw$Pn;s)Eb3;rBU5nW)< zWB(!KZL9Lyo8b0rAg=H-IUCq@HLc-G;*<-FAYF-Gc>6r)awPt8bn8DCqkrEQjgGtv z14RJ#t3WUHg={IF2e3bq%IzC}zgu}{p55(ERuB#S8oKcAc4OLA6evPU8i$?WdHyG07*qoM6N<$f-aMk+5i9m diff --git a/projects/plugins/jetpack/modules/contact-form/images/blank-screen-button.png b/projects/plugins/jetpack/modules/contact-form/images/blank-screen-button.png deleted file mode 100644 index 58dfa26b6c96f73534e0dd5d9d7c6d33d417f12f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1823 zcmV+)2jKXLP)oI_R#O=c|_W=HcPEtJ<@s!Gmw5jDz?0_wdrl?7*_^!?pMD?%tw~-q+RL z(9GYhoawcr^4!(fppEa(#P#Rn;k~i(*3Im`ulL^G?#H{Zb6)1&-sa}!-rnBh#k=L! z(b=t@=GfFS)W~oE00sX^L_t(|+U=PQd!j}V$I&*tSy?QEld^7O?ySkB#f#S_Iq#B7 zA2w~j|0n9~^0p|*Moc0;%wt4n{|xhEh6OiD|42>ghev50SO?aDbzmLXp@O-+)%C-4 zdcEo`j|gnCy1mG4x>z0u*yX2-HJd+9+7ITg<_XP^S@PxLyzO9<2hK5Eq&51w8gkFW zq}5;(esN8|7o5E*cTQRi#<}JTciq2W9XV|=7@Ib3FUuwrMttqI6>Pz-uJVri%4&As zQm`c?KfkOP?7`sevTa}jQ4g0b5MwlC^9$$+u#5; zKv!O|L1NNiaWjfu)z-t1x~{JM3R8zrS^$gVWa|00ORxqEfW}4?1`H)c@D6{GF)nXK z*G<7(_Zh8-J<%JT=@GNgg6E52xTRw38vN7{EHV_R-5A@DuVEiVq|B8it z6B$7chGVxlPr?O~82^&bpMq^(V}sd10K=B2$1RC}`@3+B0odj>cHRsOI+3*^>&UDX zVTK&9f$4$;1;3ZR1b0G&k&DDSns~+oSc7|UR^$~cf;E~IpCi{qFs2m5JqS21`u z7w!hF{5|%yeCcY~;@@NOFX&;fqFxt|?OhsJK9sI`#7lAy%l3k$t5kO)ntLCwQtiGT z3}E!F?azOIWcKCiuf*}g)feu$8a0Tj(CF>$r_;~xxt%ggKR@-G#8jd~un*r(-xuxl z+lOW$4+AWU`cF5XbF7(uvU)|YcBGhXn z^T=c{-EUtVrz#Vw)ZO`xA`_urBbi4gtG_{0I0-&&atD@)P_L29BbC*InQ#tNv(dAK zL@WS*oDg z%yP7W!&GowoSn@?mV(h3%nm5qU=IbfEG-)n$NS#iWU@LiUuEmXY6CKv2=yAtJaSpxDiw;?_R;RER5B6jHIjK`vP1Z%#LJjM zJFpI{1AAF8{U{A)#SW|k>%cm&4y*&~z&fxFtOM)7ICAMnI61TqKq&$+rHM}{HId8)+4i(lJ;b}@Lm`njxgN@xNAA9FOD diff --git a/projects/plugins/jetpack/modules/contact-form/images/grunion-form.png b/projects/plugins/jetpack/modules/contact-form/images/grunion-form.png deleted file mode 100644 index f4a0cc1d64f873e8603518e186e19154a55a85c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 188 zcmeAS@N?(olHy`uVBq!ia0vp@K+MC!3?#j0YP|wdx&b~RuK&T{$B!Q$K74ra;K9|a zSI?X|vu@qG<;#~(m@uKCp`oUxrn0g!H#aveEp6)5RB50_FHaZ85RU7~626WLt$aX86~OkucO{l4h{ i8(Zr2En7m;nHf6z)WUgpx7-Ap%HZkh=d#Wzp$PzWKue$i diff --git a/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-2x.png b/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-2x.png deleted file mode 100644 index bfbca5edfde9b1bf48530f6c4b5eafd36a6c3c31..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^8bGYa!VDx=bh7*n7y#-H&cbqcZ;}z7iDtwEvO53(#*+RE!t%EB$bbA!Lo=G?we(eblE&V0>({}$p y+5hVE1?O3x4Jr$KW3a2@{ft-NGLApayT^0>yIIsgCw diff --git a/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-hover.gif b/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-field-hover.gif deleted file mode 100644 index 20d9e7128d5168e33be5b8e0f39efdfdcde79517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 144 zcmZ?wbhEHb6k!l&Sj50^#+c#%|NoC3J$nEC{kL!5o;`a8zopr0N3{&?f?J) diff --git a/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-hover-2x.png b/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-hover-2x.png deleted file mode 100644 index 210de1b315e95f84d4c2bbdc37b844fe147caac3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94 zcmeAS@N?(olHy`uVBq!ia0vp^8bGYa$P6SCGEW)bP0l+XkK2jUs# diff --git a/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-hover.gif b/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option-hover.gif deleted file mode 100644 index 9098b0656b758962cb72fb95811b1102df0895ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73 zcmZ?wbhEHb6k!l&n8?6z#+czh7%(s}DE?$&WM^Pv&;ha;K=KSsQd9a@o_@=}c+Qqv XT$`@t|9)3^-DBFb&SkGc7#OSpW!@V1 diff --git a/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option.gif b/projects/plugins/jetpack/modules/contact-form/images/grunion-remove-option.gif deleted file mode 100644 index ec4916634a0dbaf0ee3b91bbcab8f32f713499ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73 zcmZ?wbhEHb6k!l&n8?6TQ&aOF3>X*~6o0ZXvNJF-=m6OaAbAERsVV&{Prv0~JZH-- Xu1(kSf4?id?lJ9I=dxEJ3=Gx)fC(FH diff --git a/projects/plugins/jetpack/modules/contact-form/images/twitter-dark.png b/projects/plugins/jetpack/modules/contact-form/images/twitter-dark.png deleted file mode 100644 index 0bab6b4f8b7ad40e0340e6ec614226c26a9901b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 985 zcmV;~119{5P)(&#Ii>#9?dh2J9S;>0eM ztZ{RQ?#XP+vMFMWWb%-t*yn$TkCJDkYq@TL)#7TkJ-oYWS8nz@f+kW~yzm*F2NZ>X z{Gq#go?H!%$D-Ge~rwY99e4M4Bn+_nb@c@#$2*6y5A7^KMAze`6(DwU>3G95uxL*{!13c4gs9QZlt zgMzMI6Km-C6!Cov8s%ePLyk>t=uk-+7T)-XMFbHtrN)~Sj&=2Y212s3TtTfNFPJz6 zc_WcLg#ae`p(%r$%i*v_>1os5Q6*@rF~T*8EVO&=OJGeH6orti$x5Zzp0@K)ocNfb zCGc9F4aT>YgCd31ZyO!=bl*6JQu#opO0eV8H@gbRk z$}ecv2>Nc9Z!+CoN~6lM1q?^00<^Rn+6RV34jQ+!_2LnRq@D6sl4Ddn(4<+R4GQWQ z)58NlaIK!ts7bTrQ55^T9QOo>qrsej&{^p3>$oSxR+0w7d!r@P%fDE)E*i>Ohp#`#T!-yC3m)E59Ht$L#RoFc9L*E|)wtI*>i7lB7~P zqqj>N@MoOuTQn`C_qH>!fgU&jgvDEA=*DzPKNo1z!`fX2w;sfoSC+`BS*C|Bw!O}# zi+AG835uBJmW$lDN@D2dsub=C<%yhdl!8K#fP5M^Y-lN>R*2*kGo90Pn{3;F5WVqH|SzDYk8wDi#GqC~XPdN&6+&I}%}2aQKX->~(3~e9$v-Zc6wH zM&RygBCZH&n@+pWxpC>4rMuCpow8W|4uyjw%sICCIIMs!p2nok=igeIG%dqdku?4o zKrk*JNmS0dlkENDI00000NkvXX Hu0mjf6e-DJ diff --git a/projects/plugins/jetpack/modules/contact-form/js/dropdown.js b/projects/plugins/jetpack/modules/contact-form/js/dropdown.js deleted file mode 100644 index e6ec7f2c54483..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/js/dropdown.js +++ /dev/null @@ -1,26 +0,0 @@ -jQuery( function ( $ ) { - $( document ).ready( function () { - initializeSelectMenu(); - - const observer = new MutationObserver( () => { - initializeSelectMenu(); - } ); - - observer.observe( document.querySelector( 'body' ), { - childList: true, - subtree: true, - } ); - } ); - - function initializeSelectMenu() { - $( '.contact-form .contact-form-dropdown' ) - .selectmenu( { - classes: { - 'ui-selectmenu-button': 'contact-form-dropdown__button', - 'ui-selectmenu-menu': 'contact-form-dropdown__menu', - }, - } ) - .attr( 'aria-hidden', true ) - .prop( 'tabindex', -1 ); - } -} ); diff --git a/projects/plugins/jetpack/modules/contact-form/js/editor-view.js b/projects/plugins/jetpack/modules/contact-form/js/editor-view.js deleted file mode 100644 index cac8fc0812ab3..0000000000000 --- a/projects/plugins/jetpack/modules/contact-form/js/editor-view.js +++ /dev/null @@ -1,248 +0,0 @@ -/* global grunionEditorView, tinyMCE, QTags, wp */ -( function ( $, wp, grunionEditorView ) { - wp.mce = wp.mce || {}; - if ( 'undefined' === typeof wp.mce.views ) { - return; - } - - wp.mce.grunion_wp_view_renderer = { - shortcode_string: 'contact-form', - template: wp.template( 'grunion-contact-form' ), - field_templates: { - email: wp.template( 'grunion-field-email' ), - telephone: wp.template( 'grunion-field-telephone' ), - textarea: wp.template( 'grunion-field-textarea' ), - radio: wp.template( 'grunion-field-radio' ), - checkbox: wp.template( 'grunion-field-checkbox' ), - 'checkbox-multiple': wp.template( 'grunion-field-checkbox-multiple' ), - select: wp.template( 'grunion-field-select' ), - date: wp.template( 'grunion-field-date' ), - text: wp.template( 'grunion-field-text' ), - name: wp.template( 'grunion-field-text' ), - url: wp.template( 'grunion-field-url' ), - }, - edit_template: wp.template( 'grunion-field-edit' ), - editor_inline: wp.template( 'grunion-editor-inline' ), - editor_option: wp.template( 'grunion-field-edit-option' ), - getContent: function () { - var content = this.shortcode.content, - index = 0, - field, - named, - body = ''; - - // If it's the legacy `[contact-form /]` syntax, populate default fields. - if ( ! content ) { - content = grunionEditorView.default_form; - } - - // Render the fields. - while ( ( field = wp.shortcode.next( 'contact-field', content, index ) ) ) { - index = field.index + field.content.length; - named = field.shortcode.attrs.named; - if ( ! named.type || ! this.field_templates[ named.type ] ) { - named.type = 'text'; - } - if ( named.required ) { - named.required = grunionEditorView.labels.required_field_text; - } - if ( named.options && 'string' === typeof named.options ) { - named.options = named.options.split( ',' ); - } - body += this.field_templates[ named.type ]( named ); - } - - var options = { - body: body, - submit_button_text: grunionEditorView.labels.submit_button_text, - }; - - return this.template( options ); - }, - edit: function ( data, update_callback ) { - var shortcode_data = wp.shortcode.next( this.shortcode_string, data ), - shortcode = shortcode_data.shortcode, - $tinyMCE_document = $( tinyMCE.activeEditor.getDoc() ), - $view = $tinyMCE_document.find( '.wpview.wpview-wrap' ).filter( function () { - return $( this ).attr( 'data-mce-selected' ); - } ), - $editframe = $( '