首页 > 后端开发 > php教程 > 各位php高手帮小弟我看看这段代码是什么意思

各位php高手帮小弟我看看这段代码是什么意思

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
发布: 2016-06-13 12:47:09
原创
967 人浏览过

各位php高手帮我看看这段代码是什么意思

<br />
function apply_filters($tag, $value) {<br />
	global $wp_filter, $merged_filters, $wp_current_filter;<br />
<br />
	$args = array();<br />
<br />
	if ( isset($wp_filter['all']) ) {<br />
		$wp_current_filter[] = $tag;<br />
		$args = func_get_args();<br />
		_wp_call_all_hook($args);<br />
	}<br />
<br />
	if ( !isset($wp_filter[$tag]) ) {<br />
		if ( isset($wp_filter['all']) )<br />
			array_pop($wp_current_filter);<br />
		return $value;<br />
	}<br />
<br />
	if ( !isset($wp_filter['all']) )<br />
		$wp_current_filter[] = $tag;<br />
<br />
	if ( !isset( $merged_filters[ $tag ] ) ) {<br />
		ksort($wp_filter[$tag]);<br />
		$merged_filters[ $tag ] = true;<br />
	}<br />
<br />
	reset( $wp_filter[ $tag ] );<br />
<br />
	if ( empty($args) )<br />
		$args = func_get_args();<br />
<br />
	do {<br />
		foreach( (array) current($wp_filter[$tag]) as $the_ )<br />
			if ( !is_null($the_['function']) ){<br />
				$args[1] = $value;<br />
				$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));<br />
			}<br />
<br />
	} while ( next($wp_filter[$tag]) !== false );<br />
<br />
	array_pop( $wp_current_filter );<br />
<br />
	return $value;<br />
}<br />
登录后复制


<br />
function the_permalink() {<br />
	echo apply_filters('the_permalink', get_permalink());<br />
}<br />
登录后复制

相关标签:
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板