From f75f3e3f8cb8418f613b01bf6bc906f41c2d59c8 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 2 Jan 2017 22:46:33 -0800 Subject: [PATCH] Move title_tags_invalid form args to base class --- php/class-wp-adapter-js-widget.php | 18 ------------------ php/class-wp-js-widget.php | 8 +++++++- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/php/class-wp-adapter-js-widget.php b/php/class-wp-adapter-js-widget.php index ae63add..164a5fa 100644 --- a/php/class-wp-adapter-js-widget.php +++ b/php/class-wp-adapter-js-widget.php @@ -80,24 +80,6 @@ public function enqueue_control_scripts() { wp_enqueue_script( "customize-widget-form-{$this->id_base}" ); } - /** - * Get configuration data for the form. - * - * @return array - */ - public function get_form_args() { - return array_merge( - parent::get_form_args(), - array( - 'l10n' => array( - - // @todo Move this to the component level. - 'title_tags_invalid' => __( 'Tags will be stripped from the title.', 'js-widgets' ), - ), - ) - ); - } - /** * Sanitize instance data. * diff --git a/php/class-wp-js-widget.php b/php/class-wp-js-widget.php index 381cde4..eed9b73 100644 --- a/php/class-wp-js-widget.php +++ b/php/class-wp-js-widget.php @@ -553,6 +553,12 @@ public function form_template() { * @return array */ public function get_form_args() { - return array(); + return array( + 'l10n' => array( + + // @todo Move this to the component level. + 'title_tags_invalid' => __( 'Tags will be stripped from the title.', 'js-widgets' ), + ), + ); } }