From fa95f7e9d633a7b40763840787b113032bd16929 Mon Sep 17 00:00:00 2001 From: HerrVigg Date: Thu, 30 Mar 2023 23:52:27 +0200 Subject: [PATCH] Deprecate ACF-qTranslate text/textarea/wysiwyg fields Follow-up of #1186 and #1300. Since the standard ACF fields are better supported, those should be preferred over the qTranslate extended fields. In particular: text, textarea, wysiwyg are covered by the ACF standard fields, while others only exist as qTranslate extended fields. Deprecate softly these "duplicated" extended fields in their labels. --- src/modules/acf/admin.php | 4 ++-- src/modules/acf/fields/text.php | 2 +- src/modules/acf/fields/textarea.php | 2 +- src/modules/acf/fields/wysiwyg.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/acf/admin.php b/src/modules/acf/admin.php index b4f6ead7..43da809c 100644 --- a/src/modules/acf/admin.php +++ b/src/modules/acf/admin.php @@ -282,13 +282,13 @@ public function admin_init() { 'section-acf-extended', __( 'Extended qTranslate fields', 'qtranslate' ), function () { - _e( 'Additional types with a specific handling and rendering for qTranslate. Prefer the standard ACF fields as much as possible.', 'qtranslate' ); + _e( 'Additional types specific to qTranslate. Prefer the standard ACF fields.', 'qtranslate' ); }, 'settings-qtranslate-acf' ); add_settings_field( 'select_qtranslate_fields', - __( 'Active types', 'qtranslate' ), + __( 'Types enabled for selection', 'qtranslate' ), array( $this, 'render_setting_qtranslate_fields' ), 'settings-qtranslate-acf', 'section-acf-extended' diff --git a/src/modules/acf/fields/text.php b/src/modules/acf/fields/text.php index d9803ff3..3bce66bb 100644 --- a/src/modules/acf/fields/text.php +++ b/src/modules/acf/fields/text.php @@ -28,7 +28,7 @@ function initialize() { parent::initialize(); $this->name = 'qtranslate_text'; $this->category = QTX_Module_Acf_Register::ACF_CATEGORY_QTX; - $this->label .= ' [' . $this->category . ']'; + $this->label .= ' [' . $this->category . ']' . ' - ' . __( 'Deprecated', 'qtranslate' ); } /** diff --git a/src/modules/acf/fields/textarea.php b/src/modules/acf/fields/textarea.php index 43dad405..4fa40c35 100644 --- a/src/modules/acf/fields/textarea.php +++ b/src/modules/acf/fields/textarea.php @@ -28,7 +28,7 @@ function initialize() { parent::initialize(); $this->name = 'qtranslate_textarea'; $this->category = QTX_Module_Acf_Register::ACF_CATEGORY_QTX; - $this->label .= ' [' . $this->category . ']'; + $this->label .= ' [' . $this->category . ']' . ' - ' . __( 'Deprecated', 'qtranslate' ); } /** diff --git a/src/modules/acf/fields/wysiwyg.php b/src/modules/acf/fields/wysiwyg.php index 191b457a..2a03a6ab 100644 --- a/src/modules/acf/fields/wysiwyg.php +++ b/src/modules/acf/fields/wysiwyg.php @@ -28,7 +28,7 @@ function initialize() { parent::initialize(); $this->name = 'qtranslate_wysiwyg'; $this->category = QTX_Module_Acf_Register::ACF_CATEGORY_QTX; - $this->label .= ' [' . $this->category . ']'; + $this->label .= ' [' . $this->category . ']' . ' - ' . __( 'Deprecated', 'qtranslate' ); } /**