Re: include() and duplicate function definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys, :-)

Just FYI, I got this answer from the theme dev:

"David,
You don't need the include statement. If you create your function in
wp-content/themes/suffusion-child/functions.php it will get
automatically included.

Secondly, using the same function name wouldn't work, because it would
require me to encase the original function definition in actions.php
in a "function_exists" clause. I would suggest using a different
function name, then using remove_action to remove the older action and
add_action to add the new action."

(http://www.aquoid.com/forum/viewtopic.php?f=4&t=3070)

I'm not yet confident about how to actually implement this in code...
Any tips or advice would be gratefully heard.


On Thu, Nov 4, 2010 at 00:13, Steve Staples <sstaples@xxxxxxxx> wrote:
> I am curious on how this would work, if for some reason they were using
> a different template?   the function you want to "overwrite", wont be
> used, and therefore, wouldn't your app/template/whatever be updated
> improperly than waht you expect it to be?

Steve, maybe the above informs? In any case, the function to be
overwritten is likely to remain fairly stable...

All the best, :-)

David Nelson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux