admin管理员组文章数量:1415476
I am reading the conversation about WP_USE_THEMES and I don't understand the term 'URL parsing'.
Can someone please explain that to me in the context of Wordpress ?
Google didn't produce significant results.
I am reading the conversation about WP_USE_THEMES and I don't understand the term 'URL parsing'.
Can someone please explain that to me in the context of Wordpress ?
Google didn't produce significant results.
Share Improve this question asked Sep 12, 2019 at 14:13 Rebecca JohnsonRebecca Johnson 111 bronze badge 1- Welcome to WordPress Development. I hope you find the answer(s) you are looking for. Our site is different from most - if you have not done so yet, consider checking out the tour and help center to find out how things work. – Matthew Brown aka Lord Matt Commented Sep 12, 2019 at 18:20
1 Answer
Reset to default 4Parsing means to analyze (a string or text) into logical syntactic components.
Taking WordPress URLs into the question is something like this:
// Get array of URL 'scheme', 'host', and 'path'.
$url_parse = wp_parse_url( 'https://developer.wordpress/reference/functions/wp_parse_url/' );
// Output URL's path.
echo $url_parse['path'];
/*
Array
(
[scheme] => https
[host] => developer.wordpress
[path] => /reference/functions/wp_parse_url/
)
*/
Another way to consider is in your WP settings. It breaks it down too:
https://www.example.coom/2019/09/12/sample-post/
is the same as
%scheme%//:%host%/%year%/%monthnum%/%day%/%postname%/
There are other uses for this too. In using the Wordpress API you'll need to know parts of the url (endpoint, version, etc).
Parsing is breaking the url down so you know what the parts are when you're working with it.
本文标签: site urlURL parsingwhat is it
版权声明:本文标题:site url - URL parsing - what is it? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745163640a2645568.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论