Josh23french
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: actions not being removed when told too…If you don’t want users editing “core files”, don’t put things in them they want to change. Make an options page: use the Settings API
If you must have users editing files, anything would work as long as it’s in the proper order… if custom-functions.php is loaded after or from functions.php, it’ll work.
Does switching the placement of the functions work as expected?
Forum: Fixing WordPress
In reply to: actions not being removed when told too…functions.php gets called: it adds the custom action and removes nothing.
404.php gets called: it adds the default action and does the actionThe custom text is shown, then the default, right?
You should put the default action in functions.php and the custom one in 404.php.
So:
# functions.php function set_aisis_404_default_err_message(){ _e('cannot find what you want'); } add_action('aisis_404_err_message_banner', 'set_aisis_404_default_err_message' );# 404.php function set_new_aisis_404_err_message(){ _e('booboo occured'); } add_action('aisis_404_err_message_banner','set_new_aisis_404_err_message'); remove_action('aisis_404_err_message_banner', 'set_aisis_404_default_err_message' );After that point in 404.php, whenever you call
do_action('aisis_404_err_message_banner');you’ll get what you want.Forum: Fixing WordPress
In reply to: actions not being removed when told too…functions.php loads before anything.
Forum: Fixing WordPress
In reply to: actions not being removed when told too…Where exactly do you add the default message? It seems as if you add it after your call to remove it.
Forum: Fixing WordPress
In reply to: actions not being removed when told too…You’re missing quotes around the second argument to remove_action… that would explain the default message not being removed.
Forum: Everything else WordPress
In reply to: WordPress Conection with WordPress.org ServerWordPress will work perfectly fine without any external connections.