Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
pre_get_shortlink - 过滤预先为给定文章生成的短链接 - WordPress钩子 - WordPress动力
当前浏览:首页 / WordPress钩子 / pre_get_shortlink

apply_filters( 'pre_get_shortlink', false|string $return, int $id, string $context, bool $allow_slugs )

过滤预先为给定文章生成的短链接


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 3 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "422b96c784344dc1934ab28b50af8ac0" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "f8b06689c7b7b3654ab7334b701e45b3" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

premore...

shortlink


描述

从过滤器返回真实(truthy)值将有效地缩短短链接生成过程,而不是返回该值。


参数

$return

(false|string) 短路返回值。false或URL字符串。

$id

(int) 文章ID或0表示当前文章。

$context

(string) 链接的上下文。'post'或'query'中的一个,

$allow_slugs

(bool) 是否允许短链接中的文章slug。



源码

查看源码 官方文档


更新日志

版本描述
3.0.0开始引入

Warning: Undefined variable $o in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference.php on line 194