Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add more functions missing from lists #87

Merged

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Oct 13, 2020

Looking at the Brain\Monkey\Functions\stubTranslationFunctions() function, the _e() and _ex() functions are actually also stubbed.

BrainMonkey/inc/api.php

Lines 134 to 157 in dbb41d3

/**
* Stub translation functions.
*
* @see EscapeHelper
*/
function stubTranslationFunctions()
{
stubs(
[
'__',
'_x',
'translate',
'esc_html__' => [EscapeHelper::class, 'esc'],
'esc_html_x' => [EscapeHelper::class, 'esc'],
'esc_attr__' => [EscapeHelper::class, 'esc'],
'esc_attr_x' => [EscapeHelper::class, 'esc'],
'esc_html_e' => [EscapeHelper::class, 'escAndEcho'],
'esc_attr_e' => [EscapeHelper::class, 'escAndEcho'],
]
);
when('_e')->echoArg();
when('_ex')->echoArg();
}

@gmazzap
Copy link
Collaborator

gmazzap commented Oct 13, 2020

👍 💯

@gmazzap gmazzap merged commit 7042140 into Brain-WP:master Oct 13, 2020
@jrfnl jrfnl deleted the feature/docs-add-more-missing-functions branch October 13, 2020 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants