WPML Compatibility
-
After days of struggling with a multilingual project including WPML and GigPress, I came with a fix that could be included in future releases of your plugin.
This fix will allow to translate the strings in the input fields in GigPress’s settings page. By adding some code, GigPress input fields will be scanned by WPML
Here is what could be done :
1- Open gigpress.php in /wp-content/plugins/gigpress/2- Below the line #243
global $wpdb, $gp_countries, $gpo;, add the following code$test = get_option('gigpress_settings'); $buy_tickets_label = $test['buy_tickets_label'];3- Then go to line #325 and change the following code
case 'active': $showdata['ticket_link'] = ($show->show_tix_url && $show->show_expire >= GIGPRESS_NOW) ? '<a href="' . esc_url($show->show_tix_url) . '"' . gigpress_target($show->show_tix_url) . ' class="gigpress-tickets-link">' . wptexturize($gpo['buy_tickets_label']) . '</a>' : '';
tocase 'active': $showdata['ticket_link'] = ($show->show_tix_url && $show->show_expire >= GIGPRESS_NOW) ? '<a href="' . esc_url($show->show_tix_url) . '"' . gigpress_target($show->show_tix_url) . ' class="gigpress-tickets-link">' . wptexturize($buy_tickets_label) . '</a>' : '';4- Go to WPML and translate.
The topic ‘WPML Compatibility’ is closed to new replies.