知识点滴

专注于php应用开发

标签

Annotation array_merge composer Debugbar git gitlab indexer json message server nfs nginx opcache pack php php-fpm php_doc php_session rabbitmq redis Reflection safe sphinx squid statis swoole twig Vagrant varnish vue vue_dom wordpress plug xcache yield 异步io

分类

  • git
  • go
  • javascript
  • linux sa
  • php
  • safe
  • search
  • service
  • 未分类

归档

  • 2018 年 7 月
  • 2017 年 12 月
  • 2017 年 9 月
  • 2017 年 7 月
  • 2017 年 6 月
  • 2017 年 4 月
  • 2017 年 3 月
  • 2016 年 12 月
  • 2016 年 11 月
  • 2016 年 9 月
  • 2016 年 6 月
  • 2016 年 5 月
  • 2016 年 4 月
  • 2016 年 3 月
  • 2016 年 2 月
  • 2016 年 1 月
  • 2015 年 12 月
  • 2015 年 11 月
  • 2015 年 10 月
  • 2015 年 9 月
  • 2015 年 7 月
  • 2015 年 6 月
  • 2015 年 5 月

其他操作

  • 登录
  • 条目 feed
  • 评论 feed
  • WordPress.org
蜀ICP备15000937号-1

标签: wordpress plug

wordpress对输出的内容替换

2016年3月18日 by admin·wordpress对输出的内容替换已关闭评论

PHP
1
2
3
4
5
6
7
8
9
10
11
12
function igeekLab_cdn_avatar($avatar) {
    $buffer = str_replace("http://1.gravatar.com/", "https://1.gravatar.com/", $avatar);
return $avatar;
}
function igeeklab_avatar_start() {
ob_start("igeeklab_cdn_avatar");
}
function igeeklab_avatar_end() {
ob_end_flush();
}
add_action('init', 'igeeklab_avatar_start');
add_action('shutdown', 'igeeklab_avatar_end');

 

由WordPress自豪地提供. 主题:Flat 1.7.8 by Themeisle