Abbreviations for Wordress _e() function

Hi!

I would like to make an Abbreviation, when i select a text it will convert it to use with Wordpress _e() function.

So if i have a text and select it this will happen:
This is a text

<?php _e('This is a text'); ?>

Thank you!
Peter

When creating a snippet simply hit the shortcut button, there is an option there for using the current selection:

So your snippet would probably look like this:

<?php _e('[[%s]]'); ?>
1 Like

Hi Peter, simply add a new snippet with the following text:

<?php _e('[[%s]]'); ?>

In the snippet editor, there is a button with a right arrow on it that shows you a list of variables you can use in snippets like [[%s]] for the currently selected text.

@nathanr and @mitchell:
Thank you very much, it works like a charm! Than i can understand this section, i will make some more. :slight_smile: