kollapsminoriteten/wp-content/plugins/jetpack/modules/contact-form/grunion-editor-view.php

103 lines
3.2 KiB
PHP
Raw Normal View History

2022-12-15 17:41:53 +01:00
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2019-11-15 23:26:29 +01:00
2024-04-17 11:32:24 +02:00
use Automattic\Jetpack\Forms\ContactForm\Editor_View;
2019-11-15 23:26:29 +01:00
/*
* A prototype to allow inline editing / editor views for contact forms.\
*
* Originally developed in: https://github.com/automattic/gm2016-grunion-editor
* Authors: Michael Arestad, Andrew Ozz, and George Stephanis
*/
2022-12-15 17:41:53 +01:00
/**
* Grunion editor view class.
2024-04-17 11:32:24 +02:00
*
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View
2022-12-15 17:41:53 +01:00
*/
2019-11-15 23:26:29 +01:00
class Grunion_Editor_View {
/**
* Add hooks according to screen.
*
2024-04-17 11:32:24 +02:00
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::add_hooks
2019-11-15 23:26:29 +01:00
* @param WP_Screen $screen Data about current screen.
*/
public static function add_hooks( $screen ) {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::add_hooks' );
return Editor_View::add_hooks( $screen );
2019-11-15 23:26:29 +01:00
}
2022-12-15 17:41:53 +01:00
/**
* Admin header.
2024-04-17 11:32:24 +02:00
*
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::admin_head
2022-12-15 17:41:53 +01:00
*/
2019-11-15 23:26:29 +01:00
public static function admin_head() {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::admin_head' );
return Editor_View::admin_head();
2019-11-15 23:26:29 +01:00
}
2022-12-15 17:41:53 +01:00
/**
* Render the grunion media button.
2024-04-17 11:32:24 +02:00
*
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::grunion_media_button
2022-12-15 17:41:53 +01:00
*/
2019-11-15 23:26:29 +01:00
public static function grunion_media_button() {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::grunion_media_button' );
2019-11-15 23:26:29 +01:00
2024-04-17 11:32:24 +02:00
return Editor_View::grunion_media_button();
2019-11-15 23:26:29 +01:00
}
2022-12-15 17:41:53 +01:00
/**
* Get external plugins.
*
2024-04-17 11:32:24 +02:00
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::mce_external_plugins
2022-12-15 17:41:53 +01:00
* @param array $plugin_array - the plugin array.
* @return array
*/
2019-11-15 23:26:29 +01:00
public static function mce_external_plugins( $plugin_array ) {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::mce_external_plugins' );
return Editor_View::mce_external_plugins( $plugin_array );
2019-11-15 23:26:29 +01:00
}
2022-12-15 17:41:53 +01:00
/**
* MCE buttons.
*
2024-04-17 11:32:24 +02:00
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::mce_buttons
2022-12-15 17:41:53 +01:00
* @param array $buttons - the buttons.
* @return array
*/
2019-11-15 23:26:29 +01:00
public static function mce_buttons( $buttons ) {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::mce_buttons' );
return Editor_View::mce_buttons( $buttons );
2019-11-15 23:26:29 +01:00
}
/**
* WordPress Shortcode Editor View JS Code
2024-04-17 11:32:24 +02:00
*
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::handle_editor_view_js
2019-11-15 23:26:29 +01:00
*/
public static function handle_editor_view_js() {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::handle_editor_view_js' );
2019-11-15 23:26:29 +01:00
2024-04-17 11:32:24 +02:00
return Editor_View::handle_editor_view_js();
2019-11-15 23:26:29 +01:00
}
/**
* JS Templates.
2024-04-17 11:32:24 +02:00
*
* @deprecated 13.3 Use Automattic\Jetpack\Forms\ContactForm\Editor_View::editor_view_js_templates
2019-11-15 23:26:29 +01:00
*/
public static function editor_view_js_templates() {
2024-04-17 11:32:24 +02:00
_deprecated_function( __METHOD__, 'jetpack-13.3', 'Automattic\Jetpack\Forms\ContactForm\Editor_View::editor_view_js_templates' );
2019-11-15 23:26:29 +01:00
2024-04-17 11:32:24 +02:00
return Editor_View::editor_view_js_templates();
2019-11-15 23:26:29 +01:00
}
}
add_action( 'current_screen', array( 'Grunion_Editor_View', 'add_hooks' ) );