• Welcome to the all-new Kolakube support, the official place to get help for Marketers Delight, XFtoWP, CryptoWP, and other WordPress products! Please login with your account details to access members-only support forums.

Editing terms

artreus

Active member
XFtoWP
Messages
36
Reaction score
2
I want to edit some of the terms in XFWP/lib/strings.php (eg "Join the...")

How can I do this but without it being over-written when plugin is updated?
 
You can edit all strings that appear on the frontend via WP admin > XFtoWP > Edit Strings.

Otherwise I recommend you follow this guide for other options:

 
Comment
It would be simple to have a filter function to override existing strings. The Poedit route is thorough but a simple override filter for changing phrases might be nice. :)
 
Comment
Hi @Alex when will you be fixing the HTML parsing thingee in the strings?
Should be fixed in XFtoWP 1.5.2 beta!

Version 1.5.2 has been out for nearly a week so I am going to mark it stable either later today or this weekend. Based on the lack of bug reports and multiple successful use cases for the new features, there are no pending differences between XFtoWP 1.5.2 beta (current) and the impending stable release.

If you want to use it now you can install the 1.5.2 beta version to be able to properly save the HTML into text strings. Once marked stable it will be available through the one-click plugin updater.

By the way, I mentioned this a few posts ago:

It would be simple to have a filter function to override existing strings. The Poedit route is thorough but a simple override filter for changing phrases might be nice. :)
...instead of using a translation plugin, the xfwp_strings filter has now been updated so you can override text strings on the fly from a child theme or anywhere you place your PHP code snippets.

A translation plugin may offer a more guided experience, but this filter is fast and easy to use. An example if you wanted to translate the create_thread_success and custom_fields strings from the strings.php file:

PHP:
/**
 * Modify XFtoWP Plugin strings.
 *
 * @since 1.0
 */

function child_theme_xftowp_strings( $strings ) {
    $strings['create_thread_success'] = 'Edited translation';
    $strings['custom_fields'] = 'Edited translation';
    return $strings;
}

add_filter( 'xfwp_strings', 'child_theme_xftowp_strings' );

Hope this is useful. :D
 
Comment
If you made any edits to the plugin they will be lost during updates as all XFtoWP files are overwritten. The standard way is to add your code into a child theme functions.php file, and an accompanying style.css file for any CSS edits you make.
 
Comment
Back
Top