28 reputation
7
bio website
location
age
visits member for 3 years, 6 months
seen Aug 24 at 17:00

Feb
28
revised Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
I noticed some missing words in my sentence.
Feb
28
revised Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
I decided to remove the semicolons after "home_url()" because I realized that the semicolons are not needed in all PHP expressions.
Feb
28
comment Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
Wow, you certainly delivered a test case. Not only did you prove the performance difference between Method A and Method B was only about 23 microseconds. You also provided a plugin, in case I wanted to test the performance difference on my own server. === Thanks for the extra effort. I have marked your answer as accepted.
Feb
28
accepted Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
Feb
27
comment Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
Haha, thank you for your reassuring and technical answer. Given how often I use the home_url() function, I wanted to be sure that using it more often would not slow down the page loading time of my code. === If you are willing, I would certainly appreciate a test case to prove your hypothesis.
Feb
27
comment Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
Thank you for your answer. It was helpful to know that the get_option function is cached in memory, since that was my technical motivation for storing the output of home_url in a variable. === However, though the performance difference would be negligible in a small group of home_url function calls, would that performance difference become more significant as I added more function calls? === For example, if my frontpage, header, sidebar and footer all contained groups of home_url function calls.
Feb
27
comment Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
Thank you for including the lines of code for get_home_url, since I had a feeling that the home_url function was more complex than it appeared. === However, boscho mentioned that the performance difference between Method A and B is negligible. And if the performance is not significant, than perhaps storing the output in a variable is not worth the extra code. === Would you mind sharing your response to boscho's point?
Feb
27
asked Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
Jan
9
awarded  Supporter
Dec
5
awarded  Informed
Jan
16
revised How To Remove The Author(s) From Certain Posts
deleted 446 characters in body
Jan
15
awarded  Teacher
Jan
15
revised How To Remove The Author(s) From Certain Posts
deleted 1 characters in body
Dec
5
revised How To Remove The Author(s) From Certain Posts
Co Authors Plus no longer requires their own function name. Also, I realized that I shouldn't strictly define which page template need to be included, that's up to the developer to decide.
Dec
4
awarded  Popular Question
Jul
18
revised How To Remove The Author(s) From Certain Posts
deleted 5 characters in body
Jul
18
awarded  Student
Jul
18
revised How To Remove The Author(s) From Certain Posts
edited tags
Jul
18
revised How To Remove The Author(s) From Certain Posts
edited tags
Jul
18
revised How To Remove The Author(s) From Certain Posts
edited body