Re: include() and duplicate function definition

From: Date: Wed, 03 Nov 2010 16:27:14 +0000
Subject: Re: include() and duplicate function definition
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-309274@lists.php.net to get a copy of this message
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@mnsi.net> 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

« previous php.general (#309274) next »