Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Returning and echoing
#1
I see that there are separate template tags for returning and echoing the same stuff. Instead of that, why don't we build the functions to echo OR return the stuff with an argument?

For example, instead of get_page_slug() and return_page_slug(), another template tag could be created named page_slug() and an argument called "echo" could be added. The default value would be "1" (or "true") and if someone wants to return the value of the function, he would simply change the argument's value to "0" (or "false").
Reply
#2
that would have been the way to start things off, but now its a little late to change things. Maybe eventually I can start to discontinue certain functions and create new ones, but right now probably not.

Where were you 10 months ago when I was starting to build them!!!! haha
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#3
Smile Actually it's not too late since there aren't much template tags for now. Think about it: The more GetSimple evolves, the more t-tags the core will have. It should be easy to deprecate a function but support it until 3.0 for example.
Reply
#4
i agree... maybe when I get some time I will do that. Thanks for bringing it up.. i have always thought about it, but decided to always to leave it go for the time being....
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply




Users browsing this thread: 1 Guest(s)