File Editor
Directories:
.. (Back)
admin-pages
core-api
debugger
markdown
Files:
class-jetpack-ai-helper.php
class-jetpack-currencies.php
class-jetpack-instagram-gallery-helper.php
class-jetpack-mapbox-helper.php
class-jetpack-podcast-feed-locator.php
class-jetpack-podcast-helper.php
class-jetpack-recommendations.php
class-jetpack-top-posts-helper.php
class-unauth-file-upload-handler.php
class.color.php
class.core-rest-api-endpoints.php
class.jetpack-automatic-install-skin.php
class.jetpack-iframe-embed.php
class.jetpack-password-checker.php
class.jetpack-search-performance-logger.php
class.media-extractor.php
class.media-summary.php
class.media.php
components.php
debugger.php
forms-integration.php
functions.wp-notify.php
icalendar-reader.php
jp-simplepie-alias-new.php
jp-simplepie-alias-old.php
jp-simplepie-alias.php
markdown.php
plans.php
plugins.php
tonesque.php
widgets.php
Create New File
Create
Edit File: forms-integration.php
<?php /** * File that sets up Jetpack integration with the Forms package. * * @package automattic/jetpack */ /** * Registers filters for integration with Forms package. */ function jetpack_forms_integration_init() { // Only add the hook if we have the forms package if ( ! class_exists( 'Automattic\Jetpack\Forms\ContactForm\Contact_Form_Field' ) ) { return; } // Add filter to provide the upload token add_filter( 'jetpack_forms_file_upload_token', 'jetpack_forms_provide_upload_token' ); } add_action( 'init', 'jetpack_forms_integration_init' ); /** * Provides an upload token using the Unauth_File_Upload_Handler. * * @return string The generated upload token. */ function jetpack_forms_provide_upload_token() { require_once JETPACK__PLUGIN_DIR . '/_inc/lib/class-unauth-file-upload-handler.php'; $handler = new Automattic\Jetpack\Unauth_File_Upload_Handler(); return $handler->generate_upload_token(); }
Save Changes
Rename File
Rename