[wp-trac] [WordPress Trac] #41498: Why are global functions not wrapped in function_exists?

WordPress Trac noreply at wordpress.org
Mon Jul 31 23:30:40 UTC 2017


#41498: Why are global functions not wrapped in function_exists?
-----------------------------+------------------------------
 Reporter:  doecode          |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  I18N             |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Old description:

> Some time ago I've written a guide about integrating Laravel into
> WordPress, https://nehalist.io/integrating-laravel-into-wordpress/. Since
> Laravel now uses it's own `__` function this integration has become
> impossible, because WordPress does not wrap global functions within
> `function_exists`.
>

>
> Cannot redeclare __() (previously declared in
> /var/www/test.dev/public_html/wp-laravel-
> integration/app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:821)

New description:

 Some time ago I've written a guide about integrating Laravel into
 WordPress, https://nehalist.io/integrating-laravel-into-wordpress/. Since
 Laravel now uses it's own `__` function this integration has become
 impossible, because WordPress does not wrap global functions within
 `function_exists`.

 {{{
 Cannot redeclare __() (previously declared in
 /var/www/test.dev/public_html/wp-laravel-
 integration/app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:821)
 }}}

--

Comment (by SergeyBiryukov):

 Related: #17268

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41498#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list