\u2197<\/sup><\/a>\u63d2\u4ef6\u3002<\/p>\n<\/div><\/div>\n\n\n\n\u96c6\u6210\u4ee3\u7801<\/h2>\n\n\n\n
\u60a8\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u4e3a WordPress \u96c6\u6210 Cravatar \u5934\u50cf\u670d\u52a1\uff0c\u53ea\u9700\u8981\u5c06\u4ee5\u4e0b\u4ee3\u7801\u52a0\u5165\u60a8\u7684\u63d2\u4ef6\u6216\u4e3b\u9898\u7684 functions.php \u91cc\u5373\u53ef\uff1a<\/p>\n\n\n\n
\nif ( ! function_exists( 'get_cravatar_url' ) ) {\n \/**\n * \u66ff\u6362 Gravatar \u5934\u50cf\u4e3a Cravatar \u5934\u50cf\n *\n * Cravatar \u662f Gravatar \u5728\u4e2d\u56fd\u7684\u5b8c\u7f8e\u66ff\u4ee3\u65b9\u6848\uff0c\u60a8\u53ef\u4ee5\u5728 https:\/\/cravatar.com \u66f4\u65b0\u60a8\u7684\u5934\u50cf\n *\/\n function get_cravatar_url( $url ) {\n $sources = array(\n 'www.gravatar.com',\n '0.gravatar.com',\n '1.gravatar.com',\n '2.gravatar.com',\n 'secure.gravatar.com',\n 'cn.gravatar.com',\n 'gravatar.com',\n );\n return str_replace( $sources, 'cravatar.cn', $url );\n }\n add_filter( 'um_user_avatar_url_filter', 'get_cravatar_url', 1 );\n add_filter( 'bp_gravatar_url', 'get_cravatar_url', 1 );\n add_filter( 'get_avatar_url', 'get_cravatar_url', 1 );\n}\nif ( ! function_exists( 'set_defaults_for_cravatar' ) ) {\n \/**\n * \u66ff\u6362 WordPress \u8ba8\u8bba\u8bbe\u7f6e\u4e2d\u7684\u9ed8\u8ba4\u5934\u50cf\n *\/\n function set_defaults_for_cravatar( $avatar_defaults ) {\n $avatar_defaults['gravatar_default'] = 'Cravatar \u6807\u5fd7';\n return $avatar_defaults;\n }\n add_filter( 'avatar_defaults', 'set_defaults_for_cravatar', 1 );\n}\nif ( ! function_exists( 'set_user_profile_picture_for_cravatar' ) ) {\n \/**\n * \u66ff\u6362\u4e2a\u4eba\u8d44\u6599\u5361\u4e2d\u7684\u5934\u50cf\u4e0a\u4f20\u5730\u5740\n *\/\n function set_user_profile_picture_for_cravatar() {\n return '<a href="https:\/\/cravatar.com" target="_blank">\u60a8\u53ef\u4ee5\u5728 Cravatar \u4fee\u6539\u60a8\u7684\u8d44\u6599\u56fe\u7247<\/a>';\n }\n add_filter( 'user_profile_picture_description', 'set_user_profile_picture_for_cravatar', 1 );\n}\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"1\u3001\u6ce8\u610f\uff0c\u4ee5\u4e0b\u4e3b\u9898\u56e0\u4e3a\u4f7f\u7528\u81ea\u6709\u7684\u5934\u50cf\u65b9\u6848\uff0c\u5b8c\u5168\u5c4f\u853d\u4e86 Gravatar\uff0c\u6240\u4ee5\u4e5f\u4e0d\u652f\u6301 Cravatar\uff1a 2\u3001\u5bf9\u4e8e\u6b64\u7c7b\u4e3b\u9898\u3001\u63d2\u4ef6\u4ecd ... <\/p>\n
\u7ee7\u7eed\u9605\u8bfb<\/a><\/p>\n","protected":false},"author":18731,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[25,29,30,26],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-integration","tag-cms","tag-wordpress","tag-wpavatar","tag-26","no-featured-image-padding"],"_links":{"self":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/users\/18731"}],"replies":[{"embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":0,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"wp:attachment":[{"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cravatar.com\/developer\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}