[theme-reviewers] Question: Why it is not allowed to use function_exists check ?

Chip Bennett chip at chipbennett.net
Wed Jan 29 00:43:39 UTC 2014


Please link the ticket, so that we have context.

There are (at least) two different uses for function_exists(), one of which
is perfectly fine, and the other that has restrictions:

1) Pluggable functions: a function *defined* by the Theme, and intended to
be overridden by a Child Theme. This use is perfectly fine, and left up to
developer's prerogative

2) Backward compatibility: wrapping a *core-defined* function in a if (
function_exists() ) wrapper, to provide backward compatibility for newer
core functions. Themes may only support backward compatibility for
functions introduced in the two most recent major core WordPress versions.
Right now, the current core version is 3.8, so developers may use
function_exists() conditional wrappers for functions defined in WordPress
3.8, 3.7, or 3.6, but not for any functions introduced in WordPress 3.5 or
earlier.


On Tue, Jan 28, 2014 at 7:23 PM, Kharis Sulistiyono
<kharisblank at gmail.com>wrote:

> I want to know why it is not allowed to use function check
> (function_exists). I updated my theme with the function check but
> rejected. My goal was the users able to create a child theme.
>
> All the best.
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140128/420b1e88/attachment.html>


More information about the theme-reviewers mailing list