Daily Archives: 2010-02-08
解读PHP开源项目中列表和hook方法:while(has_items()): thme_ite();和apply_filters
在wordpress,lilina等开源项目中,常常会看到一些莫名的代码,来无影去无踪,看上去很有意味,特地拿来分析分析,看看一般的作法。 part 1 列表 循环显示 先看代码: <?php $num = 0; if(has_items()) { while(has_items()): the_item(); } ?> 以上代码,出自某开源项目。。。 再进入the_item()函数内部,可以看到一个关键的函数: * Returns the current item * * @since 1.0 * * @return bool|stdClass False if item doesn’t exist, otherwise returns the specified …
54chen,人人网分布式研究人员,曾饭于金山、雅虎、淘宝,暂居北京,情绪稳定。
SEARCH
Tag
Update
- 54chen Twitter memo 2010-08-29
- [演稿分享]人人网开发一站式体验
- [54chen原创]简单好用的土办法抗击洋鬼子对wordpress系统的广告灌入
- [54chen开发日记]注解和拦截器实现权限通用模型的设计实践
- 54chen Twitter memo 2010-08-22
- 54chen Twitter memo 2010-08-15
- rose pipe–一次对http技术的伟大革新实现(54chen乱弹版)
- 54chen Twitter memo 2010-08-08
- 使用maven的profiles自动设置log4j线上环境和测试环境区别
- 54chen Twitter memo 2010-08-01
- sphinx安装配置手记(中文分词54chen支持版)
- 54chen Twitter memo 2010-07-25
- 由php的call_user_func传reference引发的思考
- 54chen Twitter memo 2010-07-18
- 用sphinx轻松搞定方便管理的多节点过亿级数据搜索
