Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save montrealist/b5f96ee3b2fe7f5f4889f2de52a0d2af to your computer and use it in GitHub Desktop.
Save montrealist/b5f96ee3b2fe7f5f4889f2de52a0d2af to your computer and use it in GitHub Desktop.
<?php
// 'EAE - Price Table' widget from https://wordpress.org/plugins/addon-elements-for-elementor-page-builder/
add_action('init', function () {
add_filter('wpml_elementor_widgets_to_translate', 'wpml_translate_widget_price_table_20200714');
});
function wpml_translate_widget_price_table_20200714($widgets)
{
$widgets['eae-pricetable'] = array(
'conditions' => array('widgetType' => 'eae-pricetable'),
'fields' => array(),
'integration-class' => array(
'feature_list_registration'
)
);
return $widgets;
}
class feature_list_registration extends WPML_Elementor_Module_With_Items
{
public function get_items_field()
{
return 'feature-list';
}
public function get_fields()
{
return array(
'text',
);
}
protected function get_title($field)
{
switch ($field) {
case 'text':
return __( 'Text', 'wts-eae' );
default:
return '';
}
}
protected function get_editor_type($field)
{
switch ($field) {
case 'text':
return 'LINE';
default:
return '';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment