Opened 14 years ago
Closed 14 years ago
#2524 closed defect (bug) (fixed)
replace deprecated _c() with _x()
Reported by: | cnorris23 | Owned by: | |
---|---|---|---|
Milestone: | 1.2.6 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | has-patch |
Cc: |
Description
The function _c() was deprecated in WP 2.9. It's recommended replacement is _x(). This helps cut down on WP_DEBUG notices.
Attachments (2)
Change History (9)
#2
@
14 years ago
Can you review this one? I don't think that _c and _x are exactly alike. They output differently from what I can tell.
#3
@
14 years ago
_c() - http://phpdoc.wordpress.org/trunk/WordPress/Deprecated/_wp-includes---deprecated.php.html#function_c
_x() - http://phpdoc.wordpress.org/trunk/WordPress/i18n/_wp-includes---l10n.php.html#function_x
According to the docs they output the same thing.
#4
@
14 years ago
I just found the issue. Props to r-a-y for making me look at the docs a little harder this time. They output the same, but the parameters have changed. _x() accepts four parameters, while _c() only accepted two. The issue here is that the $domain parameter got bumped to slot three in _x(), rather than slot two as it was in _c(). Slot two for _x() now allows for a context for translators. I'll get the patch updated later tonight.
Related #1728