From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../wp-includes/widgets/class-wp-widget-text.php | 566 --------------------- 1 file changed, 566 deletions(-) delete mode 100644 srcs/wordpress/wp-includes/widgets/class-wp-widget-text.php (limited to 'srcs/wordpress/wp-includes/widgets/class-wp-widget-text.php') diff --git a/srcs/wordpress/wp-includes/widgets/class-wp-widget-text.php b/srcs/wordpress/wp-includes/widgets/class-wp-widget-text.php deleted file mode 100644 index 642556c..0000000 --- a/srcs/wordpress/wp-includes/widgets/class-wp-widget-text.php +++ /dev/null @@ -1,566 +0,0 @@ - 'widget_text', - 'description' => __( 'Arbitrary text.' ), - 'customize_selective_refresh' => true, - ); - $control_ops = array( - 'width' => 400, - 'height' => 350, - ); - parent::__construct( 'text', __( 'Text' ), $widget_ops, $control_ops ); - } - - /** - * Add hooks for enqueueing assets when registering all widget instances of this widget class. - * - * @param integer $number Optional. The unique order number of this widget instance - * compared to other instances of the same class. Default -1. - */ - public function _register_one( $number = -1 ) { - parent::_register_one( $number ); - if ( $this->registered ) { - return; - } - $this->registered = true; - - wp_add_inline_script( 'text-widgets', sprintf( 'wp.textWidgets.idBases.push( %s );', wp_json_encode( $this->id_base ) ) ); - - if ( $this->is_preview() ) { - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_preview_scripts' ) ); - } - - // Note that the widgets component in the customizer will also do the 'admin_print_scripts-widgets.php' action in WP_Customize_Widgets::print_scripts(). - add_action( 'admin_print_scripts-widgets.php', array( $this, 'enqueue_admin_scripts' ) ); - - // Note that the widgets component in the customizer will also do the 'admin_footer-widgets.php' action in WP_Customize_Widgets::print_footer_scripts(). - add_action( 'admin_footer-widgets.php', array( 'WP_Widget_Text', 'render_control_template_scripts' ) ); - } - - /** - * Determines whether a given instance is legacy and should bypass using TinyMCE. - * - * @since 4.8.1 - * - * @param array $instance { - * Instance data. - * - * @type string $text Content. - * @type bool|string $filter Whether autop or content filters should apply. - * @type bool $legacy Whether widget is in legacy mode. - * } - * @return bool Whether Text widget instance contains legacy data. - */ - public function is_legacy_instance( $instance ) { - - // Legacy mode when not in visual mode. - if ( isset( $instance['visual'] ) ) { - return ! $instance['visual']; - } - - // Or, the widget has been added/updated in 4.8.0 then filter prop is 'content' and it is no longer legacy. - if ( isset( $instance['filter'] ) && 'content' === $instance['filter'] ) { - return false; - } - - // If the text is empty, then nothing is preventing migration to TinyMCE. - if ( empty( $instance['text'] ) ) { - return false; - } - - $wpautop = ! empty( $instance['filter'] ); - $has_line_breaks = ( false !== strpos( trim( $instance['text'] ), "\n" ) ); - - // If auto-paragraphs are not enabled and there are line breaks, then ensure legacy mode. - if ( ! $wpautop && $has_line_breaks ) { - return true; - } - - // If an HTML comment is present, assume legacy mode. - if ( false !== strpos( $instance['text'], '