Created
May 16, 2023 12:23
-
-
Save idokd/76fec96e518dd144359674a6fe49bae0 to your computer and use it in GitHub Desktop.
acfe - autosync php file with text domain for i10n
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // acf-extended/includes/modules/autosync.php: line 450, in function save_file | |
| if ( $l10n_textdomain = apply_filters( 'acfe/settings/php/l10n_textdomain', $l10n_textdomain ) ) { | |
| $keys = apply_filters( 'acfe/settings/php/i10n_keys', [ | |
| 'title', | |
| 'label', | |
| 'instructions', | |
| 'message', | |
| 'button_label', | |
| 'placeholder', | |
| 'prepend', | |
| 'append', | |
| 'message', | |
| 'default_value', | |
| 'acfe_display_title', | |
| 'description' | |
| ] ); | |
| $code = preg_replace('/(\\\'(?:' . join( '|', $keys ) . ')\\\').*(\\\'.*\\\')/', '$1 => __( $2, \'' . $l10n_textdomain . '\' )', $code ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment