2
<a href="skype:sitspak?call">
을 내 WordPress 설치 바닥 글에 배치하려고합니다.WordPress에 프로토콜 추가
skype
프로토콜을 wp_allowed
에 추가하려고합니다.
functions.php
function wp_allowed_protocols() {
static $protocols = array();
if (empty($protocols)) {
$protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal');
/**
* Filters the list of protocols allowed in HTML attributes.
*
* @since 3.0.0
*
* @param array $protocols Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.
*/
$protocols = apply_filters('kses_allowed_protocols', $protocols);
}
return $protocols;
내가 코드를 다음 배치 오전 코드의 조각이되어 다음 내 자식 테마의 function.php
//
// Your code goes below
//
function ss_allow_skype_protocol($protocols){
array_push($protocols, 'skype');
return $protocols;
}
add_filter('kses_allowed_protocols' , 'ss_allow_skype_protocol');
그러나 어떤 이유로이 작동하지 않습니다 ; 어떻게 성공적으로 달성 할 수 있습니까?
첫 번째 부분은 wp-included/functions.php입니다. – Suleman
두 번째 부분은 하위 테마의 functions.php입니다. – Suleman
핵심 'functions.php'는 수정하지 않았으므로 권장하지 않습니다. – Suleman