GithubHelp home page GithubHelp logo

onthegosystems / wpml-page-builders-elementor Goto Github PK

View Code? Open in Web Editor NEW
15.0 27.0 6.0 330 KB

A library used by WPML to handle Elementor

PHP 94.84% Shell 1.00% JavaScript 3.21% Makefile 0.94%
elementor wpml page-builder

wpml-page-builders-elementor's Introduction

This package has been merged into the WPML Page Builders addon.


wpml-page-builders-elementor

A library used by WPML for handling Elementor.

Code Quality

Coverage

Build

Packagist

Total Downloads

License

Latest Stable Version

Latest Unstable Version

composer.lock

Monthly Downloads

Monthly Downloads

Daily Downloads

Daily Downloads

wpml-page-builders-elementor's People

Contributors

adrianosferreira avatar amelnagdy avatar andreasciamanna avatar bruceonthego avatar brucepearson avatar dgwatkins avatar dimitrismitsis avatar georgebotsev avatar igor-wpml avatar izzi-hassan avatar kkarpieszuk avatar lxbdr avatar phdenis63 avatar srdjan-jcc avatar strategio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wpml-page-builders-elementor's Issues

Elementor Pro - missing modules when using Translation Editor

In the translation editor there seems to be missing the ability to translate:
-Animated modules - You can add a highlighted animation to a text. You can translate this manually via Elementor editor in the second language
image

-Post listing widget words for "Read more" - Can be translated as well via Elementor editor in the second language.
image

-Global modules for Elementor - they can be set as local and unlinked from the global module and this allows you to translate them.

[New feature] Add "field html" in class-wpml-elementor-form.php

Hello,

Could you add "field-html" in class-wpml-elementor-form.php to enable the possibility to translate html form fields.

Best Regards.


public function get_fields() {
return array( 'field_label', 'placeholder', 'field_options', 'field_html' );
}


protected function get_title( $field ) {
switch( $field ) {
.....
case 'field_html':
return esc_html_( 'Form: Field html', 'wpml-string-translation' );_


protected function get_editor_type( $field ) {
switch( $field ) {
.....
case 'field_html':
return 'VISUAL';

Multiple URL fields not working

Related to: elementor/elementor#6786

We found out an issue where multiple URL fields cannot be translated.

Example code that is not working:

add_filter('wpml_elementor_widgets_to_translate', function($widgets) {
    $widgets['example_name] = [
        'conditions' => ['widgetType' => 'example_name'],
        'fields' => [
            'url_field_1' => [
                'field' => 'url',
                'type' => __('Example URL Field 1', 'trailactive'),
                'editor_type' => 'LINE', // or 'LINK' but relative links not possible that way
            ],
            'url_field_2' => [
                'field' => 'url',
                'type' => __('Example URL Field 2', 'trailactive'),
                'editor_type' => 'LINE', // or 'LINK' but relative links not possible that way
            ],
        ],
    ];
    return $widgets;
});

I have found the issue to be inside of the class-wpml-elementor-translatable-nodes.phpfile.

To fix the issue, we can set $field['field'] to something like "{$key}_{$field_key}" before calling the get_string_name() function in get() and update() (only when !is_numeric($key)). I have tested this change and it seems to work fine now!

I can create a Pull Request if that would be helpful?

Elementor image-box -> description - adds an extra paragraph tag

The Elementor element image-box has two fields - title and description.
The title is set to "Line" type, but the description is set to "Visual" type.
Because it is set to "Visual", when translated, in the translation there is an extra paragraph (

) tag and the element contents are actually outside of the proper tag.
image
If we change the element type to "Line" for the description - there is no issue, but then you miss the fine controls in the translation editor - which is a minus.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.