WPML

نظرة عامة على المشكلة

حالياً، عند استخدام ودجت أيقونات التواصل الاجتماعي لـ Elementor ، لا يمكن ترجمة روابطها وسماتها.

حل بديل مؤقت

تم إصلاح هذه المشكلة في WPML Multilingual CMS 4.8. يحل التحديث المشكلة على موقعك، لذا لا تحتاج إلى هذا الحل البديل المؤقت إلا إذا لم تتمكن من التحديث بعد.

يُرجى التأكد من أخذ نسخة احتياطية كاملة لموقعك قبل المتابعة.

  • أضف كود PHP أدناه في ملف functions.php الخاص بقالبك:
    add_action('init', function () {
    	add_filter('wpml_elementor_widgets_to_translate', function ($widgets) {
    		$widgets['social-icons'] = [
    			'conditions' => ['widgetType' => 'social-icons'],
    			'fields'     => [],
    			'integration-class' => 'elementorSocialIcons'
    		];
    		return $widgets;
    	});
    
    	/**
    	 * Class to translate the Elementor social-icons widget. 
    	 * 
    	 * @see wpmltriage-481
    	 */
    	class elementorSocialIcons extends WPML_Elementor_Module_With_Items {
    
    		/**
    		 * @return string
    		 */
    		public function get_items_field() {
    			return 'social_icon_list';
    		}
    
    		/**
    		 * @return array
    		 */
    		public function get_fields() {
    			return [
    				'link' => [
    					'url',
    					'custom_attributes'
    				]
    			];
    		}
    
    		/**
    		 * @param string $field
    		 *
    		 * @return string
    		 */
    		protected function get_title($field) {
    			switch ($field) {
    				case 'url':
    					return esc_html__('Social Icon: URL', 'elementor');
    				case 'custom_attributes':
    					return esc_html__('Social Icon: Custom Attributes', 'elementor');
    				default:
    					return '';
    			}
    		}
    
    		/**
    		 * @param string $field
    		 *
    		 * @return string
    		 */
    		protected function get_editor_type($field) {
    			switch ($field) {
    				case 'custom_attributes':
    					return 'LINE';
    				case 'url':
    					return 'LINK';
    				default:
    					return '';
    			}
    		}
    	}
    });
  • حدّث صفحة Elementor الخاصة بك وترجمها مرة أخرى.

جميع المشكلات المعروفة

هل ما زلت تواجه هذه المشكلة؟

إذا لم يحل التحديث المشكلة، فاطرح استفسار الدعم وسنبحث في الأمر معك.