@tom,
I think you are going down the right lines, if you edit the plugin code to achieve these changes you will lose your changes whenever there is an update so creating a .PO and .MO file that sets “Your email:” to null and changes the string in the text box is probably the best way, and it will be easier to preserve between updates.
Thread Starter
Tom
(@tomasz_b)
I edited the .pot with Poedit, saved as .po and .mo, which I uploaded to the plugin’s directory. I cleared all the caches but see no changes…
Is there any chance the “Your email:” line could be made optional, and the string in the box editable from the widget (just like the Pre-Content and Post-Content lines)?
@tom,
Rather than create another option version 9.1 will create a filter that runs on the form code, this could be user to str_replace() the “Your email:” with ” and achieve the result you are after.
Bear in mind that if you have replaced “Your email:” with an empty string in the .PO file the original string will get used so you should probably translate it to a space (” “). Also, have you set a WP_LANG in the wp-config.php file and loaded the .MO file to the Subscribe2 plugin folder on your server?
Thread Starter
Tom
(@tomasz_b)
> you should probably translate it to a space (” “)
Yes, I thought about this, although the resulting extra empty line would not be ideal.
> set a WP_LANG in the wp-config.php file
Oh, this must have been the reason. But I do not really want to change the language of WordPress.
> version 9.1 will create a filter that runs on the form code
Wonderful, thank you! I am looking forward to that filter.
@tom,
>Oh, this must have been the reason. But I do not really want to change the language of WordPress.
Thinking about the way WordPress automatically updates since version 3.7 this could actually be more of a problem now.
You can access 9.1 in development for now if you wish, it seems pretty stable on my sites but of course I may make other changes before official release.
http://downloads.wordpress.org/plugin/subscribe2.zip
Thread Starter
Tom
(@tomasz_b)
I used this filter to replace “Your Email:” with another text and it worked nice. Thanks!
But I would also like to change the text *in the box* (“Enter email address…” to “Enter your email address…”). Can it be done with a filter?
@tom,
You can changed that with the same ‘s2_form’ hook I think you are using to replace the “Your Email:” text.
Thread Starter
Tom
(@tomasz_b)
Aha! I did not realize I could simply duplicate the “$form = str_replace” line.
I got it now. Thank you!