默认情况下,WordPress 将从内容中生成 55 个单词的自动摘要,如果数量大于该数量,则字符串 ‘[…]’ 将附加到摘要中。如果字符串少于 55 个单词,则内容将按原样返回。在其他情况下,如果将手动摘要添加到帖子中,它将按原样使用,而不是创建 55 个单词。
标签: PHP
php 用trait 解决单继承问题实例

用实例来了解php的trait,Trait的声明使用trait关键词,trait不能实例化,通过在其他类中使用use 关键字,声明要组合的Trait名称。爽快。
将 WordPress的SMTP 配置 添加到Comment Reply Email Notification插件中

为了实现评论回复的邮件提醒,除了安装Comment Reply Email Notification插件之外,还需要另外设置SMTP,不用代码的话还需要安装另外的插件。
WordPress related post code from ‘chaplin’ theme by Anders Norén

这是是一段Wordpress 相关文章的代码片段,来自chaplin 主题中的相关文章代码,但其中有一个小bug,需要注意。
WordPress function to get top level category of a post
How to find the top most category of a post in wordpress?
Build PHP Development Environment on Mac OSX
完整的步骤——Steps::